Solved

Help needed with -  dsmaint migrate......500pnts..

Posted on 2006-06-13
18
2,357 Views
Last Modified: 2008-01-09
Hi,

I want to move the DATA_STORE database from one server to another...

I must admit I am struggling with this...

How do I find out where the DATA_STORE database is stored...

And can I recover the username and password for the database as the consultant that installed can't remember what it was..

500 pnts...
0
Comment
Question by:ise438
  • 9
  • 8
18 Comments
 
LVL 2

Expert Comment

by:Avatar261
ID: 16894960
admin tools
data sources (odbc)
select file dsn
browse to where you existing metaframe dsn is (default is program files     then citrix    then indepentdent management architecture
hightlight the dsn click configure
select the server
click though and ensure you have the correct username and password and correct database selected

then use the dsmaint config command on each server

dsmaint config /user:username /pwd:password /dsn:complete path including file name

then run dsmaint recreatelhc on each server to resync the local host cache

hope this makes sense

If you need anymore help let me know, also have to say thanks to darrengp who helped me out on this same problem
0
 
LVL 19

Accepted Solution

by:
BLipman earned 500 total points
ID: 16897141
um, also restart the IMA service after you execute the Config on each server other than the data collector.  You should be running the Migrate on your Data Collector (the most preferred server in your Zone...check this under your Farm Properties).  

You should start off by figuring out what your data store IS.  Is it SQL, Oracle, or (likely) MS Access?  In your indepentdent management architecture folder, is there an MDB called IMA.mdb (not lhc, thats your local host cache).  If you have an Access datastore then your username is citrix and your password is citrix (defaults).  
0
 

Author Comment

by:ise438
ID: 16941023

Ok still struggling with this one...

I have followed the steps in the guide below...

Follow this procedure to install a backup of the data store or move an original data store to a new host server in the event of a hardware failure or upgrade:

1. Copy the backup database or the original database to the server that is to become the new host server. - DONE

2. On the new host server, create a new “File DSN” pointing to the new local database from Step 1. - DONE

3. On all servers in the farm, execute dsmaint failover to point to the new host server. - DONE

4. On the new host server, execute dsmaint config to point the IMA Service to the newly created DSN file from Step 2. If no security was set on the Access database, use the default user account and password information (citrix/citrix).

Note: Include the full path (in quotes) in the /dsn: switch to the file dsn. For example, /dsn:"C:\Program Files\Citrix\Independent Management Architecture\MF20.dsn"

This is where it fails...I get...

Failed to connect to data_store. The setting will be reverted to the previous configuration.
Unable to change configuration

This the command I entered...

Dsmaint config /user:citrix /pwd:citrix /dsn:”c:\program files\citrix\independent management architecture\mf20.dsn”

Is there a way to check the user name and password ?

Please help..500pnts...
0
 
LVL 19

Expert Comment

by:BLipman
ID: 16946423
I prefer to use the DSMAINT MIGRATE command since the datastore is currently intact.  Here's what I do in such a situation:

1) Create a new blank SQL database on the server that will host your datastore
2) Creata a SQL login who has db_owner and public rights to the database you just created
3) Create a new file DSN on your datacollector and call it MF20a.dsn, this will point to the new datastore and use the new login
4) Execute: DSMAINT MIGRATE /SRCDSN:"C:\Program Files\Citrix\Independent Management Architecture\MF20.dsn" /SRCUSER:OriginalUser /SRCPWD:OriginalPWD /DSTDSN:"C:\Program Files\Citrix\Independent Management Architecture\MF20a.dsn" /DSTUSER:NewUser /DSTPWD:NewPWD

The failover command is for switching from one direct server to another (Access datastore); you want to use migrate: "Migrate data from one data store to another. Use this command to move a data store to another server, rename a data store in the event of a server name change, or migrate the data store to an Oracle or SQL Server database"

After you have successfully migrated your datastore from one server to another you will need to copy your MF20a.dsn to every other citrix server in your farm and use DSMAINT CONFIG to use the new dsn.  Then bounce the IMA service on each box and you should be good to go.  
0
 
LVL 19

Expert Comment

by:BLipman
ID: 16946695
0
 

Author Comment

by:ise438
ID: 16949384
Thanks...

But how do I Create a new blank SQL database on the server that will host your datastore..

Many thanks in advance..
0
 
LVL 19

Expert Comment

by:BLipman
ID: 16953430
Ok, that part is not too bad:

1) open SQL Enterprise Manager, right click on databases, choose New Database, name the database CitrixDB or something like that.  
2) now find Security and create a new login (you want to choose SQL not Windows as the type), enter a password, and then go to the database access tab and give db_owner and public rights to the new Citrix database.  

now here's where I need to know what your current data store is, do you have a MF20.mdb in your citrix\independant management architecture folder?  If so then the migrate process will copy your data into the new store, if you are using another sql database we need to back it up, copy it to the new sql server, and restore it.  
0
 

Author Comment

by:ise438
ID: 16957938
Definately have MF20.mdb

We are on XPe FR2

As far as I know we are using the default username and password...

1.) My SQL server is not in the CITRIX Farm does that matter ?

2.) My current data_store server is called "Data_Store" my SQL server is called "wmanlee001"

What would be the procedure for to migrate my access MDB file to new SQL Dbase, including the command for the dsmaint migrate ?

Thanks for all you help points are your once we getthis to work..

Ian




0
 
LVL 19

Expert Comment

by:BLipman
ID: 16962719
Ok, you are doing Access to SQL, good stuff...I will type out your syntax and then the entire process below for reference, change the drive letters to reflect your server setup (C: vs M:).  Did you already create your new file dsn?  You can do that through Administrative Tools -> Data Sources (ODBC).  

First off, check your MDAC level because you must be at 2.5 or greater for this process to work (http://www.microsoft.com/downloads/details.aspx?FamilyID=8f0a8df6-4a21-4b43-bf53-14332ef092c9&DisplayLang=en).  You can run this program to check your current version of MDAC.

DSMAINT MIGRATE /SRCDSN:"C:\Program Files\Citrix\Independent Management Architecture\MF20.dsn" /SRCUSER:citrix /SRCPWD:citrix /DSTDSN:"C:\Program Files\Citrix\Independent Management Architecture\MF20a.dsn" /DSTUSER:NewUser /DSTPWD:NewPWD

This assumes you already created a new file DSN in your IMA folder called MF20a.dsn that points to your SQL server and the new database; let me know if you need help with that process though.  

Here is a summary of the entire process:

1. Create a new database on 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.

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 old database is 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.

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

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 restarting the server 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.
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:ise438
ID: 16982678
Hi,

Fantastic reply...

I am stuck on this bit now..

2) now find Security and create a new login (you want to choose SQL not Windows as the type), enter a password, and then go to the database access tab and give db_owner and public rights to the new Citrix database.

Is this security in SQL enterprise Manager or in active directory - I found users section in the data_bases in enterprise manager is that what you mean ?

Nearly there now

Ian...
0
 
LVL 19

Expert Comment

by:BLipman
ID: 16985407
You want to go into Security in Enterprise Manager, expand and right click on 'logins'.  Let me know how it works!
0
 

Author Comment

by:ise438
ID: 16990995
Nearly there -

This part below...

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.

where exactly do I create the DSN ?

On the SQL server - which isn't in the citrix farm

or on all the Citrix server ?

cheers

In advance...

Hopefully this is the last post and I can get it to work and give you your well deserved point..

Ta

Ian
0
 
LVL 19

Expert Comment

by:BLipman
ID: 16994173
Ok Ian, this part does happen on the Citrix server but you only need to create it on the Data Collector.  That will be the Citrix server that is "most preferred".  Go to your Citrix Management Console, right click on your Farm, go to Zones and see what the preference is set on the servers.  The one with the highest preference is your data collector.  

So, from the Data Collector, go to Administrative Tools -> Data Sources (ODBC) -> click on the File DSN tab and then click Add.  From the wizard, scroll to the bottom and pick SQL Server, click next, from the Browse button navigate to your IMA folder and save the file as MF20a.dsn.  Click Next and then Finish and a new window pops up.  Use your dropdown to pick your SQL server, click Next and toggle to SQL Server Authentication, enter your Citrix Login (created earlier), click Next, check the box that says "Change the default database to:" and use the dropdown to find your new CitrixDB, click Next, click Finish, choose Test to make sure the DSN connects.  

So, you have now created a new file DSN in the same folder as your original MF20.dsn.  You will need to copy this new DSN to all remaining Citrix servers in the farm.  This is the DSN you specify when you execute your DSMAINT CONFIG on the remaining Citrix servers.  

So, to sum things up: You have created your Citrix user in SQL, your MetaFrame DB in SQL, your file DSN in the IMA folder on your Data Collector.  With this in place you should be ready for DSMAINT MIGRATE.  This only happens on the Data Collector.  This will copy your Access data store into your new SQL data store.  Then you will need to copy your new MF20a.dsn to the remaining Citrix servers and do the DSMAINT CONFIG to tell them to use the new DSN.  

I have struggled through each step in my own time so I know exactly how you feel and I am glad to be able to help!!
0
 

Author Comment

by:ise438
ID: 17010124
We seem to have two zones with one prefered server in each...

I have set up the DSN's

Ok this is the command I am typing on the DATA COLLECTORS and I get a Invalid DSN message returned...

DSMAINT MIGRATE /SRCDSN:"C:\Program Files\Citrix\Independent Management Architecture\MF20.DSN" /SRCUSER:citrix /SRCPWD:citrix /DSTDSN:"C:\Program Files\Citrix\Independent Management Architecture\MF20a.dsn" /DSTUSER:NewUser /DSTPWD:NewPWD

:-( - So close please help

Ian


0
 
LVL 19

Expert Comment

by:BLipman
ID: 17010981
Hmm, it sounds like your DSN is not happy.  Can I get you to open each DSN file with Notepad and post the contents?  Also, when you are typing out the DSMAINT stuff it is helpful to copy the path to your DSN from Windows Explorer and paste it into the Command prompt (Edit Menu -> paste).  Almost there!!
0
 

Author Comment

by:ise438
ID: 17016173
MF20 on Data Collector
[ODBC]
DRIVER=Driver do Microsoft Access (*.mdb)
UID=admin
UserCommitSync=Yes
Threads=3
SafeTransactions=0
PageTimeout=5
MaxScanRows=8
MaxBufferSize=2048
FIL=MS Access
DriverId=25
DefaultDir=C:\Program Files\Citrix\Independent Management Architecture
DBQ=C:\Program Files\Citrix\Independent Management Architecture\mf20.mdb


MF20a on Data Collector
[ODBC]
DRIVER=SQL Server
UID=NewUser
DATABASE=CitrixDB
WSID=DATA_STORE
APP=Microsoft(R) Windows (R) 2000 Operating System
SERVER=WMANLEE001
Description=CITRIX_DB

Cheers

Ian
0
 
LVL 19

Expert Comment

by:BLipman
ID: 17019102
Hmm, it seems like you have a Username and Password other than the default on your datastore, here is an Access DSN from a client of mine, notice the differences:

[ODBC]
DRIVER=Microsoft Access Driver (*.mdb)
PageTimeout=5
MaxBufferSize=2048
FIL=MS Access
DriverId=25
DBQ=M:\Program Files\Citrix\Independent Management Architecture\MF20.mdb

Let me do some research on this...
0
 

Author Comment

by:ise438
ID: 17201015
Thanks for all your help  BLipman - we pulled the plug on the Citrix server in the End - Points are yours..
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

After several days of searching and hunting for limited documentation, I wanted to share this guide to hopefully save someone the hassle of trying to figure this out on their own. I have tested this on Xendesktop 7.1 and PS 4.5 running simultaneous…
Citrix XenDesktop, gold image, VMware, vSphere.
How to install and configure Citrix XenApp 6.5 - Part 1. In this video tutorial we have explained step by step installation of Citrix XenApp 6.5 Server on Windows Server 2008 R2 is explained in this video. We have explained the difference between…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now