Create a database and a sql user and give it dbo permission to the database. Enter the connection string in the web.config then navigate to yoursiteroot/Setup/Default.aspx

Supports MS SQL 2005/2008 and SqlAzure

It is recommended that you configure your SQL server for Mixed Mode Authentication and use a SQL user rather than a Windows user for your connection string.

The connection string setting is in Web.config (or optionally but recommended in user.config as described in Web.config Guide)

<add key="MSSQLConnectionString" value="server=yourservername;UID=yourdatabaseusername;PWD=yourdatabaseuserpassword;database=yourdatabasename" />

Note that if using SQL Express, you typically get a "named" instance of SQL Server rather than a "default" instance. If you have a named instance, you have to put the instance name along with the server name like this example where the instance name is SQLExpress:

<add key="MSSQLConnectionString" value="server=localhost\SQLExpress;UID=user;PWD=secret;database=mojo1" />

So the format is hostname\instancename, in the above example localhost is the host name and SQLExpress is the instance name.

Moving From One Server To Another

There are only 2 ways to move an MS SQL database from one machine to another.

1. Create a database backup on the original server and restore it on the new server.

2. You "may" also be able to use this tool to script off all the objects and data into a script that can be run on the new machine.


Last Updated 2010-07-23 by Joe Audette

Rate this Content 34 Votes