Brian Madden Logo
Your independent source for application and desktop virtualization.
Marketplace

advertisement

Documentation - Data Store, in the Citrix XenApp / Presentation Server forum on BrianMadden.com

rated by 0 users
Not Answered This post has 0 verified answers | 4 Replies | 0 Followers

Not Ranked
Points 374
Carsen posted on 10-02-2007 1:02 PM
Hello,

I was just wondering if there was an easy way to determine how the servers in your farm connect to the data store (direct/indirect), what type of data store is used and where the data store is located?

I ask this as I am taking over a server farm I had no input in setting up and there is little to no documentation provided.

Thanks.

All Replies

Top 10 Contributor
Points 26,630
Dan Murray replied on 10-02-2007 2:12 PM
Try this script. Just copy and paste it into a .VBS file and run it from one of your servers. And don't forget to vote! :)


' Created by Dan Murray, August 26, 2005

' This script displays the current Farm, DataSourceName and database
' being used the current server.

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,strFarmName
strEntryName = "DataSourceName"
objReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strEntryName,strDataSourceName

' Display the current Farm name and DataSourceName

WScript.Echo "Current Farm: "& strFarmName
WScript.Echo "Current DataSourceName: "& strDataSourceName

Const ForReading = 1
Set 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 strLinetoParse
Loop
objTextFile.Close

DON'T FORGET TO VOTE!!!

Why is it called "Common Sense"? It doesn't seem all that common!
  • | Post Points: 44
Not Ranked
Points 374
Thanks for the response Dan.

I tried it out on a couple of farms and I had success on a farm that used a SQL DB for a data store and the servers connected with DSNs.

But on farms that use MSDE and where the servers are connected directly to the server with the MSDE data store on it it gives me a script error.

I am just trying to find a tool that will tell me what type of Data Store (Access/MSDE/SQL) is being used and where it resides.

Thanks again.
  • | Post Points: 5
Top 10 Contributor
Points 35,574
Gotta love when there is no design documentation.

Patrick Rouse
Microsoft MVP - Terminal Server
Systems Consultant
Quest Software, Provision Networks Division
Virtual Client Solutions
(619) 994-5507 mobile
http://www.provisionnetworks.com

Check out the Official Provision Networks Blog:
http://blogs.inside.quest.com/provision

  • | Post Points: 5
Not Ranked
Points 5
Thanks man, you just saved my day! Script works like a charm.
  • | Post Points: 5
Page 1 of 1 (5 items) | RSS
Copyright © 1997-2008 The Brian Madden Company, LLC | Disclosures | Privacy | Terms of Use | Contact Info