+1-888-365-2779
Try Now
More in this section

Forums / Set-up & Installation / MSSQL database - gaining permissions from SA User instead of Admin

MSSQL database - gaining permissions from SA User instead of Admin

5 posts, 0 answered
  1. martin
    martin avatar
    43 posts
    Registered:
    10 Feb 2009
    18 Feb 2013
    Link to this post

    Hi,

    I have a question, and I'll put it in layman's terms - as that's where I am with stuff of this nature.

    We have Sitefinity 3.7 (I believe) installed on a dedicated server, under the Administrator user account. Sitefinity was setup by a colleague of ours quite some time ago (hence still being 3.7).

    Last week the DServer became corrupt in some way, where the password for the Administrator account wasn't accepted and wasn't resetable. As far as I understand it, the Sitefinity databases use MSSQL to run and are set to use the Administrator username and password.

    Obviously, this means the sites are no longer running. I have been informed that MSSQL (on installation) creates a second user called "sa" which has equal administrative privileges. It has been suggested that if Sitefinity could be tweaked/amended/reset to use this user for authority, they should run fine.

    Unfortunately I have no idea how one might make this change - especially when Sitefinity isn't running (even the Admin back-end) because, I assume, of this Administrator password corruption.

    Any help greatly received.

    Regards,

    m.

  2. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    21 Feb 2013
    Link to this post
    Hi Martin,

    If you are about to change the user and the password for the user instance used for connecting to the website, you need to edit the webconfig file and find the connectionstring element. Once you find it you need to modify it accordingly, to match the new MS SQL user that you have created.

    Then you can restart the site and the new user credentials for the database will be used.

    Greetings,
    Victor Velev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. martin
    martin avatar
    43 posts
    Registered:
    10 Feb 2009
    22 Feb 2013 in reply to Victor Velev
    Link to this post

    Hello Victor,

    Thank you for your reply. 

    I have opened up a local backup copy of the webconfig file and done a "find" for "connectionstring"... It comes up in various locations, but none (that I am spotting) seem to contain an obvious username and password. Thus I am still unsure as what I'd need to amend. I know what the password for the server's Administrator account was (before this corruption) and I have done a "find" for that and it's nowhere within webconfig.

    Are you able to be more precise for me? Maybe show me an example of the element I would be looking for?

     

    Thank you.

    m.

  4. martin
    martin avatar
    43 posts
    Registered:
    10 Feb 2009
    22 Feb 2013 in reply to Victor Velev
    Link to this post

    This is my example of the first connectionstring element within webconfig:

    <connectionStrings>
        <add name="Sitefinity" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Sitefinity.mdf"
          providerName="System.Data.SqlClient" />
      </connectionStrings>

    I can see it pointing to SQLExpress, but beyond that my understanding quickly drops. I am a front-end designer attempting to understand back-end coding.

    Thanks,

    m.

  5. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    27 Feb 2013
    Link to this post
    Hi Martin,

    The connection string is indeed for SQLExpress instance. That means that the project database needs to be located under the App_Data folder of the project - the .mdf and log file. Also the SQLExpress instance needs to be running in order for the site to establish proper connection to the database.

    If you have however a SQL Server instance, you will need to restore a backup file of the database on that SQL Server instance. Then you can format the connection string as in the following article:

    http://www.connectionstrings.com/sql-server-2008


    Here is a sample SQL connection string for Sitefinity 3.7:

    <connectionStrings>
      <add name="Sitefinity" connectionString="data source=localhost;Integrated Security=SSPI;initial catalog=strad37" providerName="System.Data.SqlClient" />
    </connectionStrings>


    Regards,
    Victor Velev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
5 posts, 0 answered