Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
DURGESH
Posting Yak Master
105 Posts |
Posted - 2008-06-05 : 00:49:51
|
hi all,i have a question?i have two owner 1.dbo and 2.durgeshi wanna change the objects owned by dbo to durgeshhow to display the objects of a particular database ownerthe following sql statements displays only tables and views object SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'dbo'but i need all objects(procedures,functions,triggers etc) |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-06-05 : 01:42:19
|
SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'YourOwnerName' |
 |
|
pk_bohra
Master Smack Fu Yak Hacker
1182 Posts |
Posted - 2008-06-05 : 02:53:41
|
For how to display the objects of a particular database ownerSELECT * FROM sysobjects WHERE xtype IN ('U','TR','P','FN') AND uid = (select uid FROM sysusers WHERE name='durgesh')For : i wanna change the objects owned by dbo to durgeshsp_changeobjectowner [ @objname = ] 'object' , [ @newowner = ] 'owner' |
 |
|
DURGESH
Posting Yak Master
105 Posts |
Posted - 2008-06-05 : 03:02:35
|
HI ALL HERE IS THE ANSWER FOR STORED PROCEDURE AND FUNCTIONSselect routine_name from information_schema.routines where routine_schema='YOUR OWNER NAME' |
 |
|
|
|
|