Microsoft KB Archive/932136

= How to migrate the Microsoft SoftGrid database from one computer that is running Microsoft SQL Server to another computer that is running SQL Server =

Article ID: 932136

Article Last Modified on 8/15/2007

-

APPLIES TO


 * Microsoft SoftGrid for Terminal Services
 * Microsoft SoftGrid for Windows Desktops

-



SUMMARY
This article discusses how to migrate the database that is used by Microsoft SoftGrid from one computer that is running Microsoft SQL Server to another computer that is running SQL Server.



Prerequisites
In this article, the computer that is running SQL Server and for which the SoftGrid Server is currently configured will be known as the &quot;source server.&quot; The computer that is running SQL Server to which the database will be migrated will be known as the &quot;target server.&quot;

We recommend that you follow these steps during a scheduled downtime.

Additionally, we recommend that you stop the SoftGrid Virtual Application Server service before you start the migration. If the SoftGrid Virtual Application Server service is not available to the SoftGrid Clients, the SoftGrid Clients will enter Minimal Disconnected Operation (MDO) mode. In this mode, the SoftGrid Clients will continue to stream applications that are completely loaded in cache. However, if the SoftGrid Virtual Application Server service is available but the migration is incomplete, the SoftGrid Clients may be unable to enter MDO. Therefore, the SoftGrid Clients will receive a &quot;launch failure&quot; notice.

Stopping the SoftGrid Virtual Application Server service

 * 1) On the SoftGrid Virtual Application Server, click Start, point to All Programs, point to Administrative Tools, and then click Services.
 * 2) Right-click the SoftGrid Virtual Application Server service. Then click Stop.



Backing up the SQL Server Desktop Engine database

 * 1) Start SQL Server Enterprise Manager.
 * 2) Connect to the source database server as the sa user by using password that was specified during the original installation of the SoftGrid Server.
 * 3) Expand , and then click Databases.
 * 4) Make a complete backup of the SOFTRICITY database



Documenting the SOFTRICITY database Users and Roles

 * 1) Start SQL Server Enterprise Manager.
 * 2) Connect to the source database server as the sa user by using the password that was specified during the original installation of the SoftGrid Server.
 * 3) Expand , expand Databases, expand SOFTRICITY, and then click Users.

Note In this step,  represents the actual name of the computer that is running SQL Server.
 * 1) Document the Name value, the Login Name value, and the Database Role Memberships values for each user. For example, document the information that is in the following table.

A typical installation has three users. The Database Role Membership value can be located in the Properties dialog box for each user.

Restoring the source database to the target SQL Server

 * 1) Start SQL Server Enterprise Manager.
 * 2) Connect to the computer that is running SQL Server.
 * 3) Expand  . Then click Databases.
 * 4) Create a database that is named &quot;SOFTRICITY.&quot;
 * 5) Restore the previously backed-up SOFTRICITY database to the newly created SOFTRICITY database



Registering Softricity Database Messages

 * 1) Log on to the computer that is running SQL Server.
 * 2) Open a Command Prompt window.
 * 3) Type osql.exe –S [server] –d [user database name] –U [login id] –P [password]

For example, type the following command:

osql.exe –S SGSQL –d SOFTRICITY –U sa –P password
 * 1) Type UPDATE db_messages. Then press ENTER.
 * 2) Type SET severity = severity. Then press ENTER.
 * 3) Type GO. Then press ENTER.
 * 4) Type exit. Then press ENTER.



Re-creating the SQL Server users and assigning the Database Role Memberships
 Start SQL Server Enterprise Manager. Connect to the computer that is running SQL Server. Expand, expand Databases, expand SOFTRICITY, and then click Users.

Note In this step,  represents the actual name of the server. Delete the  user.

Note In this step,  represents the domain name and group name. Delete the Softricity user. Add a database user. To do this, follow these steps:  Specify the following settings: <ul> Login name:  </li> Name: click the ellipsis button (...) to select and add the group name</li></ul> </li> Click OK.</li> Locate and then select the, add the   from step 4, and then click OK.</li> In the Database list, click SOFTRICITY. Then click OK.</li> Specify the following settings: <ul> '''The login ' ' has not been granted access to their default database: 'SOFTRICITY' and therefore will be unable to gain access to the default database. Continue?: Yes'''</li> Login name: </li></ul> </li> In the Database role membership window area, click to select the public check box and the SFTadmin check box in the Permit in Database Role column.</li> Click OK</li></ol> </li> Add a new database user. To do this, follow these steps: <ol style="list-style-type: lower-alpha;"> Specify the following settings: <ul> Login name:  </li> Name: softricity</li> Authentication: SQL Server Authentication</li> Password: the password that was specified during the original installation of the SoftGrid Server</li> <li>Database: SOFTRICITY</li></ul> </li> <li>Click OK.</li> <li>Specify the following settings: <ul> <li>'''The login ' ' has not been granted access to their default database: 'SOFTRICITY' and therefore will be unable to gain access to the default database. Continue?: Yes'''</li> <li>Confirm new password: the password that was specified during the original installation of the SoftGrid Server</li></ul> </li> <li>Click OK.</li> <li>Specify the following setting: <ul> <li>Login name: softricity</li></ul> </li> <li>In the Database role membership window area: click to select the public check box, the SFTadmin check box, and the SFTuser check box. Then click OK.</li></ol> </li></ol>



Re-creating the Softricity SQL Server agent alerts and jobs
<ol> <li>Start SQL Server Enterprise Manager.</li> <li>Connect to the computer that is running SQL Server.</li> <li>Expand, expand Management, expand SQL Server Agent, and then click Jobs.</li> <li>Create a job. To do this, follow these steps: <ol style="list-style-type: lower-alpha;"> <li>Specify the following settings: <ul> <li>Name: Softricity Database (SOFTRICITY): Check Usage History</li> <li>Category: Database Maintenance</li> <li>Owner: sa</li> <li>Description: This job calls a stored procedure in the associated SoftGrid database to cleanup usage data on a monthly basis.

Note In this value, &quot;cleanup&quot; is spelled as one word.</li></ul> </li> <li>Click the Steps tab.</li> <li>Click New.</li> <li>Specify the following settings: <ul> <li>Step name: Check Usage History</li> <li>Type: Transact-SQL Script (TSQL)</li> <li>Database: SOFTRICITY</li> <li>Command: type EXEC sp_SFTcheckusagehistory </li></ul> </li> <li>Click the Advanced tab.</li> <li>Specify the following settings: <ul> <li>On success action: Quit the job reporting success</li> <li>Retry attempts: 4 </li> <li>Retry interval (minutes): 1440 </li> <li>Run as user: dbo.</li></ul> </li> <li>Click OK.</li> <li>Click the Schedules tab.</li> <li>Click New Schedule.</li> <li>Specify the following settings: <ul> <li>Name: Monthly Schedule</li> <li>Schedule Type: Recurring</li></ul> </li> <li>Click Change.</li> <li>Specify the following settings: <ul> <li>Occurs: Monthly</li> <li>Monthly: Day</li> <li>Day: 1</li> <li>Of every month(s): 1</li> <li>Daily frequencies: Occurs once at</li> <li>Occurs once at: 2:00:00 AM</li> <li>Start date: </li> <li>Duration end date select No end date then select OK</li></ul> </li> <li>Click OK two times.</li></ol> </li> <li>Create a job. To do this, follow these steps: <ol style="list-style-type: lower-alpha;"> <li>Specify the following settings: <ul> <li>Name: Softricity Database (SOFTRICITY): Enforce Size Limit</li> <li>Category: Database Maintenance</li> <li>For Owner: sa</li> <li>Description: '''This job calls a stored procedure in the associated SoftGrid database to cleanup usage data. An alert triggered by an increase in the database data file(s) size calls this job.

Note In this value, &quot;cleanup&quot; is spelled as one word.'''</li></ul> </li> <li>Click the Steps tab.</li> <li>Click New.</li> <li>Specify the following settings: <ul> <li>Step name: Enforce Size Limit</li> <li>Type: Transact-SQL Script (TSQL)</li> <li>Database: SOFTRICITY</li> <li>Command: EXEC sp_SFTenforcesizelimit </li></ul> </li> <li>Click the Advanced tab.</li> <li>Specify the following setting: <ul> <li>On success action: Quit the job reporting success</li> <li>Run as user: dbo</li></ul> </li> <li>Click OK.</li> <li>Click the Schedules tab.</li> <li>Click New Alert.</li> <li>Specify the following settings: <ul> <li>Name: Softricity Database (SOFTRICITY): Size Limit Reached</li> <li>Type: SQL Server performance condition alert</li> <li>Object: SQLServer:Databases</li> <li>Counter: Data File(s) Size (KB)</li> <li>Instance: SOFTRICITY</li> <li>Alert if counter: rises above</li> <li>Value: 849254 </li></ul> </li> <li>Click the Response tab.</li> <li>Clear the E-mail and Net send check box. Click OK.</li> <li>Click the Notifications tab.</li> <li>Specify the following setting: <ul> <li>Write to Windows application event log: Whenever the job completes</li></ul> </li> <li>Click OK.</li></ol> </li> <li>Create a job. To do this, follow these steps: <ol style="list-style-type: lower-alpha;"> <li>Specify the following settings: <ul> <li>Name: Softricity Database (SOFTRICITY): Monitor Alert/Job Status</li> <li>Category: Database Maintenance</li> <li>Owner: sa</li> <li>Description: '''This job refreshes the alerts and other jobs associated with the SoftGrid database based on configuration data stored in the database. The job is run on a daily basis.'''</li></ul> </li> <li>Click the Steps tab.</li> <li>Click New.</li> <li>Specify the following settings: <ul> <li>Step name: Refresh Database Jobs</li> <li>Type: Transact-SQL Script (TSQL)</li> <li>Database: SOFTRICITY</li> <li>Command: EXEC sp_SFTrefreshjobs N'REFRESH' </li></ul> </li> <li>Click OK.</li> <li>Click New.</li> <li>Specify the following settings: <ul> <li>Step name: Refresh Database Alerts</li> <li>Type: Transact-SQL Script (TSQL)</li> <li>Database: SOFTRICITY</li> <li>Command: EXEC sp_SFTrefreshalerts N'REFRESH' </li></ul> </li> <li>Click the Advanced tab.</li> <li>Specify the following setting: <ul> <li>On success action: Quit the job reporting success</li></ul> </li> <li>Click OK.</li> <li>Click the Schedules tab.</li> <li>Click New Schedule.</li> <li>Specify the following settings: <ul> <li>Name: Daily Schedule</li> <li>Schedule Type: Recurring</li></ul> </li> <li>Click Change. Then specify the following settings: <ul> <li>Occurs: Daily</li> <li>Every Day(s): 1</li> <li>Daily frequencies: Occurs once at</li> <li>Occurs once at: 1:00:00 AM</li> <li>Start date: </li> <li>Duration end date: No end date</li></ul> </li> <li>Click OK three times.</li></ol> </li></ol>



Enabling the SQL Server Agent service

 * 1) On the computer that is running SQL Server, click Start, point to All Programs, point to Administrative Tools, and then click Services.
 * 2) Right-click the SQLSERVERAGENT service, and then click Properties.
 * 3) In the Startup type list, click Automatic. Then click OK.
 * 4) Right-click the SQLSERVERAGENT service. Then click Start.



Reconfigure the SoftGrid Virtual Application Server
<ol> <li>On the SoftGrid Virtual Application Server, right-click Start, and then click Explore.</li> <li>Locate the following folder:

C:\Program Files\Softricity\SoftGrid Server\conf

</li> <li>Locate the Server.conf file.</li> <li>Use a text editor to change the host name that is between the tag and the tag to the host name of the computer that is running SQL Server.</li> <li>Save the change, and then exit Windows Explorer.</li></ol>

Reconfigure the SoftGrid Management Server (if it is installed)
<ol> <li>On the SoftGrid Management Server, right-click Start, and then click Explore.</li> <li>Locate the following folder:

C:\Program Files\Softricity\SoftGrid Server\conf

</li> <li>Locate the Manager.conf file.</li> <li>Use a text editor to change the host name that is between the tag and the tag to the host name of the computer that is running SQL Server.</li> <li>Save the change, and then exit Windows Explorer.</li></ol>

Reconfigure the SoftGrid Management Web Service
<ol> <li>On the SoftGrid Management Web Service server, right-click Start, and then click Explore.</li> <li>Locate the following folder:

C:\Program Files\Softricity\SoftGrid Management Service

</li> <li>Locate the SftMgmt.udl file.</li> <li>Right-click the file, and then click Properties.</li> <li>Click the Connection tab.</li> <li>In the Select or enter a server name box, type the name of the computer that is running SQL Server. Then click OK.</li> <li>On the SoftGrid Management Web Service server, click Start, point to All Programs, point to Administrative Tools, and then click Data Sources (ODBC).</li> <li>Click the System DSN tab.</li> <li>Click SoftGridReporting System Data Source, and then click Configure.</li> <li>In the Server box, type the host name of the computer that is running SQL Server.</li> <li>Click Finish.</li> <li>In the window that appears and that contains the message, &quot;A new ODBC data source will be created with the following configuration,&quot; click OK.</li></ol>



Reset the SoftGrid Management Web Service

 * 1) On the SoftGrid Management Web Service server, click Start, point to All Programs, point to Administrative Tools, and then click Services.
 * 2) Stop and then start the World Wide Web Publishing service.



Reconfigure the database logging

 * 1) Start the SoftGrid Management Console, and then connect to the SoftGrid Management Web Service.
 * 2) Expand SoftGrid Systems, expand , and then click Server Groups.
 * 3) Right-click the name of the default server group, and then click Properties.
 * 4) Click the Logging tab.
 * 5) Modify the existing SQL database type by changing the name that is in the DNS Host Name box to the host name of the computer that is running SQL Server.
 * 6) Click OK two times.
 * 7) In the window that appears and that contains the message, &quot;You must restart the SoftGrid Virtual Application Server services in this group for them to reflect the changes made,&quot; click OK.

Repeat steps 1 through 7 of this procedure for each database logging that is currently configured to log to the source database server.

Resetting the SoftGrid services

 * 1) Restart the SoftGrid Virtual Application Server.

Note If the SoftGrid Management Server is the same server as the SoftGrid Virtual Application Server that was previously restarted, you can skip this step.
 * 1) On the SoftGrid Virtual Application Server, click Start, point to All Programs, point to Administrative Tools, and then click Services.
 * 2) Stop and then start the following services:
 * 3) * SNMP Brass Management Multiplexer Agent
 * 4) * SNMP EMANATE Master Agent
 * 5) * SoftGrid Management Server
 * 6) * SoftGrid SNMP Monitor
 * 7) * SoftGrid Management Server

Keywords: kbexpertiseinter kbhowto KB932136

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.