views:

291

answers:

3

I have some servers in Europe and some in Asia.
I would like to be able to work out where the current server is by querying ... something.

Is there some global variable I can query or sp_xxx I can execute to find out the locale of the server?

+1  A: 

I'd go with a parameter in a table.

There can be multiple solutions to the problem, though, and they may or may not work depending on a number of factors. For example, is there any difference in the database server or operating system configuration which could tell one location from the other?

Romulo A. Ceccon
+1  A: 
sp_helpsort

http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.ase_15.0.sprocs/html/sprocs/sprocs143.htm

Will show you the sort order and character set of the system

Matt Rogish
A: 

If the dataserver is properly configured for XP calls, you can execute

 xp_cmdshell 'domainname'

which will allow you to get the output of the OS 'domainname' command. You can then parse that to determine your locale.