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.

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

Reply
 
LinkBack Thread Tools 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: 4,006
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: 4,006
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
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

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