Skip to content

Microsoft SQL Server

Joe Davis edited this page Mar 30, 2022 · 3 revisions

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 Microsoft SQL Server 2012 and higher.

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

The only way mojoPortal supports moving a MS-SQL database from one machine to another is:

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