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

Forums / Deployment / Copy SQLEXPRESS database to production SQL Server database

Copy SQLEXPRESS database to production SQL Server database

2 posts, 1 answered
  1. Colleen
    Colleen avatar
    10 posts
    Registered:
    04 Nov 2010
    09 Sep 2013
    Link to this post
    How can I copy a SQLEXPRESS local database (used by Sitefinity CMS) to a production SQL Server database?

    I created a script file (using Tasks > Generate Script) which makes reference to the .mdf & .ldf SQLEXPRESS files.
    If I copy the Schema & Data, do the .mdf & .ldf SQLEXPRESS files also need to be placed on the production server before the script file is run?

    Can I backup this file & ask the hosting company to do a restore - does this work going from local SQLEXPRESS to a production SQL Server database?
    Answered
  2. Ivan D. Dimitrov
    Ivan D. Dimitrov avatar
    310 posts
    Registered:
    26 Mar 2015
    11 Sep 2013
    Link to this post
    Hi Colleen,

    The easiest way you can do that is to save a backup of your current database. After you do, restore it in your new SQL production server with SQL management studio. The important part here is your connection strings. In your project open App_data/Sitefinity/Configuration/Dataconfig.config. Change the current connection string to your database to the new one. The connection string should go as follows:
    <connectionStrings>
            <add connectionString="data source="Your SQL server name;Integrated Security=SSPI;initial catalog=Your Database Name" providerName="System.Data.SqlClient" dbType="MsSql" name="Sitefinity" />
        </connectionStrings>


    Regards,
    Ivan D. Dimitrov
    Telerik
    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
2 posts, 1 answered