Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / December 2005

Tip: Looking for answers? Try searching our database.

query to determine the Instance Name?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
PaulR - 21 Dec 2005 17:22 GMT
Hi,
(V8.2 LUW)

I'd like a Stored Procedure to self discover the Instance Name in which
it is executing?

any ideas?
e.g Catalog view? snapshot table function ? etc ....

Thanks.

PaulR
m0002a@yahoo.com - 21 Dec 2005 20:09 GMT
SELECT * FROM TABLE(SYSPROC.ENV_GET_INST_INFO()) AS SYSTEMINFO;

You can select just the INST_NAME column if that is all you want.

Other usefull information is are in these UDF's:

SYSPROC.ENV_GET_SYS_INFO
SYSPROC.ENV_GET_PROD_INFO

The above funcitons require V8.2 FP9+
PaulR - 22 Dec 2005 13:19 GMT
Thanks,

Unfortunately, we are only on fp8, for now I am using the definer in
SYSCAT.PACKAGES, but this is not ideal going forward.

So, when we go to 9+ I'll take up your suggestion.

Many thanks.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.