Moving SQL and Intranet Connections to a new Server
Your first step is to move your SQL database from the old server to the new server. The following steps will walk you through how to accomplish this. Following the move of SQL, you will then need to bring over the Intranet directory and all of its subfolders and contents to the new server, which is outlined at the end of this document.
SQL Server Migration (from one SQL server to another)
- Install and Configure new SQL Server
- Create IntranetConnections database and login on New Server
- Backup existing production database and restore it to the new SQL database
- Create the SQL data source
- Install and Configure new SQL Server
- Install SQL Server as per the Microsoft installation instructions.
- Only note is to ensure that you have enabled Mixed Authentication (i.e. both SQL and Windows Authentication on the SQL server are enabled).
Creating the IntranetConnections SQL Database
- Open SQL Management Studio
- Right click Databases and select New Database…
- In the Database Name field type in IntranetConnections
- You can keep the rest of the default settings as per the screen below
- You should now have a database called IntranetConnections under the Databases heading in the left hand pane
- Create the IntranetConnections Login
- Right Click Logins (under Security) and select New Login…
- In the Name field type in IntranetConnections
- Change the default of Windows NT Authentication to SQL Server Authentication
- Enter a password or leave it blank. If entering a password, please note it down for later use when creating the datasource. If entering a password ensure that you uncheck the ‘Enforce Password Policy’, ‘Enforce Password Expiration’ and ‘User must change password at next login’ options. In the Database Field from the drop down box choose the database IntranetConnections (see image on next page)
- Now click on the User Mapping page
- Select the Database IntranetConnections by clicking in the checkbox
- Under Database Roles make sure public is checked and db_owner is checked
- Click on OK to finish creating the login
Moving your old SQL content to the new SQL IntranetConnections database
- First create a backup of your old production IntranetConnections database. You can do this via the SQL Management Studio.
- Right click the database name > Tasks (or All tasks) > Backup
- Backup the database to a location on Disk
- Copy the backup file (filename.bak) from the old server to the new server
- Open SQL Management Studio on the new server. Right click on the IntranetConnections database and choose Tasks Restore Database.
- Go to Options in the top left hand corner and choose ‘Overwrite the existing database’ from the Restore options menu. Click OK. Click OK again on the main backup screen to run the backup.
- Once the backup has completed, open a new query window pointing to the IntranetConnections database (you can select the database from the drop down). Enter the following into the query and execute it. If your SQL user created in the previous section is not called intranetconnections then replace the occurrence of that name in the query below with the appropriate name. This query repairs any orphaned user issues associated with the database transfer.
EXEC sp_change_users_login 'auto_fix', 'intranetconnections'
Create data source
Creating your IntranetConnections SQL Data source in the Railo Admin.
Now that you have created your IntranetConnections SQL database and the IntranetConnections Login, you need to set up the SQLFunctions data source in the Railo Administrator for your new SQL database.
The following steps will walk you through creating additional data source for SQL.
- Go to the Railo Administrator through the browser:
- Click on Data Sources
- Create a new Data source called: SQLFunctions
- Select MSSQL - Microsoft SQL Server (Vendor jTDS) from the drop down list
- Enter in the name of your server
- For Database, type in: IntranetConnections
- For Username, type in: IntranetConnections
- For password, enter the password defined in Step 10 of 'Creating the IntranetConnections SQL Database'
Create the Mapping
Copy the settings from Step Six on the following KB article -- https://support.intranetconnections.com/hc/en-us/articles/214747538-How-to-I-create-a-test-site-on-my-production-server-Railo-
Replace all instances of 'TestIntranet' with 'Intranet' while following the above steps.
- Bring over the Intranet directory and all of its subfolders and files to the inetpub/wwwroot of the new server.
- Bring up the intranet site through your browser
- Click on Site Settings / Administrator Info
- Change the drive and path field to point to where you placed the Intranet directory on the new server (if applicable)