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

Forums / Set-up & Installation / Unable to attach sitefinity.mdf to SQL SERVER 2005

Unable to attach sitefinity.mdf to SQL SERVER 2005

6 posts, 0 answered
  1. Kalpana
    Kalpana avatar
    27 posts
    Registered:
    18 Dec 2008
    16 Jan 2009
    Link to this post
    Hi

    I am new to Sitefinity and I am trying to setup the app on my machine. I have SQL Server 2005 on my local machine and when I try to attach the mdf - it throws an error since it cannot find the log file. The error message is:

    TITLE: Microsoft SQL Server Management Studio
    ------------------------------

    Attach database failed for Server 'POLIAS\POLIAS_SQLSRV'.  (Microsoft.SqlServer.Smo)

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476

    ------------------------------
    ADDITIONAL INFORMATION:

    An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

    ------------------------------

    Directory lookup for the file "C:\Documents and Settings\vasilev\My Documents\Sitefinity\Sitefinity3.0\SitefinityWeb\App_Data\Sitefinity_log.LDF" failed with the operating system error 3(The system cannot find the path specified.). (Microsoft SQL Server, Error: 5133)

    -----------------------

    I am not sure why it looks for this in C:\Documents and Settings\vasilev - not sure where the vasilev is coming from.

    I would appreciate any help.

    Thanks,

    Kalpana

  2. Nikolai
    Nikolai avatar
    216 posts
    Registered:
    21 Nov 2016
    19 Jan 2009
    Link to this post
    Hi Kalpana,

    Could you please try something a little bit different:

    1. Create an empty database on your SQL Server.
    2. Create a new Sitefinity project and set it to use the database you created.

    Sitefinity will automatically create all the tables needed.

    All the best,
    Nikolai
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Kalpana
    Kalpana avatar
    27 posts
    Registered:
    18 Dec 2008
    19 Jan 2009
    Link to this post
    Thanks. I tried that but I get an error in my web config -

    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

    Parser Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed.

    Source Error:

    Line 88:     </roleManager>
    Line 89:     <membership defaultProvider="Sitefinity" userIsOnlineTimeWindow="15" hashAlgorithmType="">
    Line 90: <providers>Line 91:         <clear/>
    Line 92:         <add name="Sitefinity" connectionStringName="DefaultConnection" type="Telerik.DataAccess.AspnetProviders.TelerikMembershipProvider, Telerik.DataAccess" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" passwordAttemptWindow="10" passwordStrengthRegularExpression="" minRequiredPasswordLength="1" minRequiredNonalphanumericCharacters="0"/>

    Source File: C:\Program Files\telerik\Sitefinity3.5 Community\WebSites\emptyProject\web.config    Line: 90

    I am guessing I need to change the connection string for the membership role provider. Any help would be appreciated . Thanks.

    Kalpana
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    19 Jan 2009
    Link to this post
    Hello Kalpana,

    Try attaching the database without the error log.  To enable user instances you could use the following command:

    sp_configure 'user instances enabled','1'

    More information could be found at http://technet.microsoft.com/en-us/library/ms143684.aspx
    If the above does not help you could try changing the web.config file

    Example:
    <add name="Sitefinity" connectionString="Data Source=SERVER_NAME_HERE;Integrated Security=SSPI;initial Catalog=DB_NAME_HERE" providerName="System.Data.SqlClient" /> 

    You need to add  ASPNET or NT AUTHORITY\NETWORK SERVICE user under /YOUR_DB/Security/Users/ folder in your SQL server

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  5. Kalpana
    Kalpana avatar
    27 posts
    Registered:
    18 Dec 2008
    20 Jan 2009
    Link to this post
    Thanks for you help.

    It works now. This is what I did:

    1) I created an empty database as indicated by you. This changed my web.config to attach to the SQLServer 2005 instance.
    2) I rebuilt the project. This somehow got rid of the other errors it was throwing with regards to the membership/roles information in my web.config.

    Thanks.

    Kalpana

  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    20 Jan 2009
    Link to this post
    Hi Kalpana,

    I am glad to hear that everything is working now. Let us know if you need further assistance.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Register for webinar
6 posts, 0 answered