Copy SQLEXPRESS database to production SQL Server database
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?
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
>