Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Database Server Software > DB2 > Database creator name

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-17-02, 01:20
abhijitbhosale abhijitbhosale is offline
Registered User
 
Join Date: May 2002
Posts: 7
Database creator name

Hi I want to find out the name of the database creator or owner.
One way I tried is following query

"SELECT grantee FROM syscat.dbauth WHERE grantor='SYSIBM' and dbadmauth='Y' "

But sometimes it returns more than one users.
So this query is not returing correct owners.

I found that sysibm.sysversions contains AUTHID column.
Is it the name of the database creator or owner?

Thanks,
Abhijit
Reply With Quote
  #2 (permalink)  
Old 11-17-02, 21:03
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 3,768
Re: Database creator name

Though I'm not 100% sure, looks like you are on the right track with SYSVERSIONS catalog table ...

I have checked over 15 databases which I have access over and they seem to be pointing towards your assumption

Cheers

Sathyaram

Quote:
Originally posted by abhijitbhosale
Hi I want to find out the name of the database creator or owner.
One way I tried is following query

"SELECT grantee FROM syscat.dbauth WHERE grantor='SYSIBM' and dbadmauth='Y' "

But sometimes it returns more than one users.
So this query is not returing correct owners.

I found that sysibm.sysversions contains AUTHID column.
Is it the name of the database creator or owner?

Thanks,
Abhijit
Reply With Quote
  #3 (permalink)  
Old 11-18-02, 11:45
mmainguy mmainguy is offline
Registered User
 
Join Date: Nov 2002
Posts: 9
Re: Database creator name

Quote:
Originally posted by sathyaram_s
Though I'm not 100% sure, looks like you are on the right track with SYSVERSIONS catalog table ...

I have checked over 15 databases which I have access over and they seem to be pointing towards your assumption

Cheers

Sathyaram

try select creator, name from sysibm.sysdatabase;
for version 6 MVS at least.
Reply With Quote
  #4 (permalink)  
Old 11-18-02, 11:58
abhijitbhosale abhijitbhosale is offline
Registered User
 
Join Date: May 2002
Posts: 7
Re: Database creator name

Quote:
Originally posted by mmainguy
try select creator, name from sysibm.sysdatabase;
for version 6 MVS at least.

Hi,
could you please explain me what is "version 6 MVS".
I am working for DB2 UDB 6.1, 7.1 and 7.2.
Is it related to DB2 UDB or what ?

Please give me some pointer also if you have regarding this.

Thanks,
Abhijit
Reply With Quote
  #5 (permalink)  
Old 11-18-02, 13:14
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 3,768
Re: Database creator name

mmainguy has told about db2 on mainframe....

Quote:
Originally posted by abhijitbhosale
Hi,
could you please explain me what is "version 6 MVS".
I am working for DB2 UDB 6.1, 7.1 and 7.2.
Is it related to DB2 UDB or what ?

Please give me some pointer also if you have regarding this.

Thanks,
Abhijit
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On