RE: Table owner

RE: Table owner

 

  




Thanks a lot saritha .......

Shibu


-----Original Message-----
From: Sarita Janjani [mailto:[Email Address Removed] Wednesday, February 19, 2003 2:49 PM
To: Shibu MB; Sarita Janjani; LazyDBA.com Discussion
Subject: RE: Table owner


select A.name,B.NAME,db_name() from sysobjects a, sysusers b
where a.uid = b.uid
and a.name ='AUTHORS'

what exactly is your requirement...

-----Original Message-----
From: Shibu MB [mailto:[Email Address Removed] Wednesday, February 19, 2003 2:57 PM
To: Sarita Janjani; LazyDBA.com Discussion
Subject: RE: Table owner




saritha .. the below query will give the table name and owner but how to
get
the dbname ?????


select A.name,B.NAME from sysobjects a, sysusers b
where a.uid = b.uid
and a.name ='AUTHORS'

Thanks
shibu






-----Original Message-----
From: Sarita Janjani [mailto:[Email Address Removed] Wednesday, February 19, 2003 2:24 PM
To: Shibu MB; LazyDBA.com Discussion
Subject: RE: Table owner


use sysusers to get uid and match uid from sysobjects to relate both the
tables
Thanks,
Sarita


-----Original Message-----
From: Shibu MB [mailto:[Email Address Removed] Wednesday, February 19, 2003 2:23 PM
To: LazyDBA.com Discussion
Subject: Table owner


Hi friends ....

How can i find the table owner and database name from the data dictionary
.For example from the query given below how will i get PGSD_TEST1 and DBO
from the system table ???? in sysobjects it's not there ....

SELECT Trans_Id ,Trans_Type , PS_Inv_Id,
Total_Deposit_Amt ,Location_Id ,load_date
FROM PGSD_TEST1.DBO.PG_TRANS_DET


Thanks
Shibu



DISCLAIMER:
This message (including attachment if any) is confidential and may be
privileged. Before opening attachments please check them for viruses and
defects. MindTree Consulting Private Limited (MindTree) will not be
responsible for any viruses or defects or any forwarded attachments
emanating either from within MindTree or outside. If you have received this
message by mistake please notify the sender by return e-mail and delete
this message from your system. Any unauthorized use or dissemination of this
message in whole or in part is strictly prohibited. Please note that
e-mails are susceptible to change and MindTree shall not be liable for any
improper, untimely or incomplete transmission.


DISCLAIMER:
This message (including attachment if any) is confidential and may be
privileged. Before opening attachments please check them for viruses and
defects. MindTree Consulting Private Limited (MindTree) will not be
responsible for any viruses or defects or any forwarded attachments
emanating either from within MindTree or outside. If you have received this
message by mistake please notify the sender by return e-mail and delete
this message from your system. Any unauthorized use or dissemination of this
message in whole or in part is strictly prohibited. Please note that
e-mails are susceptible to change and MindTree shall not be liable for any
improper, untimely or incomplete transmission.


DISCLAIMER:
This message (including attachment if any) is confidential and may be privileged. Before opening attachments please check them for viruses and defects. MindTree Consulting Private Limited (MindTree) will not be responsible for any viruses or defects or any forwarded attachments emanating either from within MindTree or outside. If you have received this message by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission.
MS Sql Server LazyDBA home page