Monday, April 17, 2006

CTX: How to Migrate Server Farms and the Data Store

Document ID: CTX773628 (New Document ID: CTX677542)
This solution pertains to:

MetaFrame XP for Windows 2000
MetaFrame XP for Microsoft NT Server 4.0, Terminal Server

Use the dsmaint command to migrate a MetaFrame XP farm to a different type of data store (for example, from Access to Microsoft SQL Server, or from Microsoft SQL Server to Oracle).

The dsmaint command can migrate farm data between databases (dsmaint migrate) and reconfigure servers to use the new database (dsmaint config).
The syntax for the dsmaint migrate and dsmaint config commands is shown below (at a command prompt, type a command as one continuous string):

dsmaint migrate /srcdsn:dsnfilename /srcuser:username

/srcpwd:password /dstdsn:dsnfilename /dstuser:username
/dstpwd:password

dsmaint config /user:username /pwd:password /dsn:dsnfilename
Where:
dsnfilename = The DSN file for the database, including the full path.
username = The user name for the database.
password = The password for the database.

Migration can be performed with users logged on to the farm. Stopping and restarting the IMA Service does not affect currently connected sessions.
However, no new connections are allowed until the IMA Service is completely restarted.

IMPORTANT: Restarting the IMA Service on more than ten servers simultaneously can cause the database server to become a bottleneck, resulting in startup delays.

To migrate from Access to Microsoft SQL Server or Oracle

NOTE: Migration from an Access indirect database to a Microsoft SQL Server 2000 direct database using the dsmaint migrate command is not supported with MDAC 2.5 or MDAC 2.6 on all MetaFrame XP platforms. MDAC 2.5 SP1 for Terminal Server 4.0 and MDAC 2.5 SP1 or greater, not including MDAC 2.6, is supported on Windows 2000.

1. Create a new database on Oracle or Microsoft SQL server.
2. Create a new Mf20.dsn file pointing to the new database created in Step
1. By default, the DSN file is located in the following directory:

%ProgramFiles%\Citrix\Independent Management Architecture.

NOTE: Putting Mf20.dsn in the default location overwrites the existing file.

3. On the host server, execute the dsmaint migrate command, entering the current DSN file as the source and the new DSN file created in Step 2 as the destination. If the password for the new database was not changed, the default user name/password is citrix/citrix.

TIP: Enter the complete path (inside quotation marks if the path contains spaces) of the DSN file when required as a parameter for the dsmaint migrate command.

For example:

dsmaint migrate /srcdsn:"c:\program files\citrix\independent
management architecture\mf20.dsn" /srcuser:citrix /srcpwd:citrix
/dstdsn:"c:\NewLocation\New.dsn"
/dstuser:DB user /dstpwd:DB password
The migration was successful.

4. Execute dsmaint config on the original host server to point to the new DSN file.

For example: dsmaint config /user:DB user /pwd:DB password /dsn:"c:\New Location\New.dsn"

5. Stop and restart the IMA Service on the host server. When the IMA Service on the host server is restarted, the remaining indirect servers begin accessing the new data store indirectly through the host server..

IMPORTANT: Restarting the IMA Service instead of rebooting might cause the SNMP service to Dr. Watson if SNMP is enabled. This error is benign.

6. Copy the DSN file created in Step 2 to all remaining indirect servers in the farm.

7. Execute dsmaint config on all remaining indirect servers to establish a direct connection to the new database through the DSN copied in Step 6.

8. Stop and restart the IMA Service on all remaining indirect servers in the farm.

TIP: Steps 6 through 8 above can be executed on all the servers from a simple batch file placed in a central location.

No comments: