| |
|
If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
|
 |
|

12-20-05, 17:07
|
|
Registered User
|
|
Join Date: Dec 2005
Posts: 39
|
|
|
Database Name
|
|
I am using DB2 UDB for LUW. I have been trying to search for a query that can retrieve the database name, but in vain. Does anyone have any idea about it? Thanks!
|
|

12-20-05, 17:11
|
|
Registered User
|
|
Join Date: Jan 2003
Posts: 3,575
|
|
It depends on what DB2 version you are using. You can try the CURRENT SERVER special register.
SELECT CURRENT SERVER from sysibm.sysdummy1
Andy
|
|

12-20-05, 17:22
|
|
Registered User
|
|
Join Date: Dec 2005
Posts: 39
|
|
|
|
Thanks! It worked! I am using 8.1.10 (fixpak 10).
|
|

12-20-05, 17:23
|
|
Registered User
|
|
Join Date: Dec 2005
Posts: 39
|
|
You have replied to my posts earlier regarding retrieval of hostname (servername). I am just wondering, is there any other query other than selecting from table(SYSPROC.ENV_GET_SYS_INFO()), to retrieve the hostname?
|
|

12-21-05, 08:57
|
|
Registered User
|
|
Join Date: Jan 2003
Posts: 3,575
|
|
No. If after all the advice you have gotten from this forum and the ibm.software.db2.udb usenet forum you are still unable to use that function, I suggest you contact IBM Support to determine why.
Andy
|
|

12-21-05, 11:25
|
|
Registered User
|
|
Join Date: Dec 2005
Posts: 39
|
|
This forum is better than ibm db2 forum. I used to post there, but it used to take ages before I got replies in the past. Yeah, I got all the advice. And I have been searching on google too. But I am getting the same info. And since I dont know anything about DB2 and its background functionality, implementation, its making my work to find the solution more harder.
I have this doubt in mind. Does the problem I have has something to do with the DB2 database version on server? Because, I installed the 8.1.8 version of DB2 Admin Client and I did all the necessary steps, but it didnt seem to work. So, is it like if the version of the actual database is different, even though we install the latest version on the client side, still it would be of no use?
|
|

12-21-05, 11:41
|
|
Registered User
|
|
Join Date: Jan 2003
Posts: 3,575
|
|
Yes, the server must be at FP 9 or higher to use that function. The client is irrelevant when issuing SQL that uses functions. The functions reside only on the server.
You need to upgrade the server to FP 10.
Andy
|
|

12-21-05, 11:44
|
|
Registered User
|
|
Join Date: Dec 2005
Posts: 39
|
|
Thanks a lot! How can I find the documentation to find out the version of the server and to upgrade the server to FP 10?
|
|

12-21-05, 11:45
|
|
Registered User
|
|
Join Date: Dec 2005
Posts: 39
|
|
Correction:
"how can I find.. = 'where' can I find.."
|
|

12-21-05, 11:47
|
|
Registered User
|
|
Join Date: Jan 2003
Posts: 3,575
|
|
run db2level on the server, that will give the DB2 version. Look in the other thread on where to download the FP.
Andy
|
|

12-21-05, 11:57
|
|
Registered User
|
|
Join Date: Dec 2005
Posts: 39
|
|
I ran db2level from the command window of the Control Center. It just gave the same info. as that of the db2 admin client. Guess I ran the command on the client. How to run it on the server?
|
|

12-21-05, 12:02
|
|
Registered User
|
|
Join Date: Dec 2005
Posts: 39
|
|
It gave the following info:
DB21085I Instance "DB2" uses "32" bits and DB2 code release "SQL08021" with
level identifier "03020106".
Informational tokens are "DB2 v8.1.8.762", "s041221", "WR21348", and FixPak
"8".
Product is installed at "C:\sqllib".
|
|

12-21-05, 12:04
|
|
Registered User
|
|
Join Date: Dec 2005
Posts: 39
|
|
Isnt it okay to use FixPak 8?? Because as far as I know, I believe, the upgradations have been done from FixPak 8.
|
|

12-21-05, 12:19
|
|
Registered User
|
|
Join Date: Jan 2003
Posts: 3,575
|
|
To get db2level info from server:
1) goto the server (forget the client pc)
2) from the db2 command window ON THE SERVER run db2level.
THE FUNCTION YOU ARE TRYING TO EXECUTE WAS NOT INTRODUCED UNTIL FP 9. IT DOES NOT EXIST PRIOR TO THAT.
Andy
|
|

12-21-05, 12:27
|
|
Registered User
|
|
Join Date: Dec 2005
Posts: 39
|
|
Ok. One more dumb doubt. I know I must be sounding like a fool  , but cant help it!! You said "go to server". But I dont know how to do that! I dont know how to go to the DB2 server and open it's command window.
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|