Greetings,
In Sybase there are some functions for which i am not
able to find any equivalent in DB2.
1)
DESCRIPTION: To obtain the database name one is currently logged into.
QUERY
1> select db_name()
2> go
RESULT
pubs2
(1 row affected)
2)
DESCRIPTION: To obtain the database id one is currently logged into
QUERY
1> select db_id()
2> go
RESULT
------
4
(1 row affected)
3)
DESCRIPTION: To retrieve the host id on which the database server is
running
QUERY
1> select host_id()
2> go
RESULT
---------------------
8746
(1 row affected)
4)
DESCRIPTION: Retrieves the name of the database server
QUERY
1> select host_name()
2> go
RESULT
-----------------------
ps-server1
(1 row affected)
Any help would be greatly appreciated
TIA