Page 1 of 2 12 LastLast
Results 1 to 15 of 29

Thread: Database Name

  1. #1
    Join Date
    Dec 2005
    Posts
    39

    Unanswered: 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!

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    It depends on what DB2 version you are using. You can try the CURRENT SERVER special register.

    SELECT CURRENT SERVER from sysibm.sysdummy1

    Andy

  3. #3
    Join Date
    Dec 2005
    Posts
    39
    Thanks! It worked! I am using 8.1.10 (fixpak 10).

  4. #4
    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?

  5. #5
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    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

  6. #6
    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?

  7. #7
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    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

  8. #8
    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?

  9. #9
    Join Date
    Dec 2005
    Posts
    39
    Correction:

    "how can I find.. = 'where' can I find.."

  10. #10
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    run db2level on the server, that will give the DB2 version. Look in the other thread on where to download the FP.

    Andy

  11. #11
    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. #12
    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".

  13. #13
    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.

  14. #14
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    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

  15. #15
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •