Is there a way to see the location of my database? This particular farm was built before I got here, and there is no documentation. How can I see where it is located?
Bonus points:
is it possible to move the database to anouther server? Or do I have to rebuild the farm?
Yes, you can move the database (once you find out where it is). There is no need to rebuild. I've moved our database two or three times over the last three years and it's never been a problem. As for finding it, try running the following VBS script on one of your farm servers:
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
' Get the Farm name and DataSourceName environment variable for this server.
strKeyPath = "Software\Citrix\IMA"strEntryName = "Neighborhood"objReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strFarmNamestrEntryName = "DataSourceName"objReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strDataSourceName
' Display the current Farm name and DataSourceName
WScript.Echo "Current Farm: "& strFarmNameWScript.Echo "Current DataSourceName: "& strDataSourceName
Const ForReading = 1Set objFSO = CreateObject("Scripting.FileSystemObject")Set objTextFile = objFSO.OpenTextFile(strDataSourceName, ForReading)Do While objTextFile.AtEndOfStream <> True strLinetoParse = objTextFile.ReadLine if Left(strLinetoParse, 7) = "SERVER=" then Wscript.Echo strLinetoParse if Left(strLinetoParse, 9) = "DATABASE=" then Wscript.Echo strLinetoParseLoopobjTextFile.Close
It will display the DSN file you are currently using, what the conncetion strings are to your database (and therefore its location) and so on. Hope this helps!
Dan
Why is it called "Common Sense"? It doesn't seem all that common!
That did it. Thank you.
Is there a way I can do this without scripting it? Maybe looking in the registry or something?
If you look at the script, a lot of the information comes from the registry anyway. The script just pullsit all together more conveniently, since some of the data has to be extracted from the DSN file that the registry points to.
I did notice that. However, I dont see the locations in the registry. Would this be different for XenApp 5.0 on server 2008?
That's entirely possible. I have not yet had the opportunity to run this script against a XA5 server. The Base OS shouldn't matter, but who knows...