Creator of the table not "dbo" | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Creator of the table not "dbo"

Hi I have all tables whose creator is not dbo. Is there a way to create a select statement without specifing
owner of db. this didn’t work is guess because by default it’s dbo, if omited select * from database..table
Ideally, all tables to should be owned by DBO. This makes your job easier, and also slightly boosts performance. Only the owner of the object doesn’t have to specify the owner’s name, all others users have to, which in a sense, means that you need to always specify the owner of an object in a SELECT. You can change ownership of an object by using sp_changeobjectowner. —————————–
Brad M. McGehee, MVP
Webmaster
SQL-Server-Performance.Com
hi brad, is there any command to get all tables list whose owner is not only a dbo? what syntax or command should we use?
quote:Originally posted by bradmcgehee Ideally, all tables to should be owned by DBO. This makes your job easier, and also slightly boosts performance. Only the owner of the object doesn’t have to specify the owner’s name, all others users have to, which in a sense, means that you need to always specify the owner of an object in a SELECT. You can change ownership of an object by using sp_changeobjectowner. —————————–
Brad M. McGehee, MVP
Webmaster
SQL-Server-Performance.Com

here you go…
select TABLE_NAME from INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA<>’dbo’ Deepak Kumar
SQL Server MVP, MCDBA
[email protected] Disclaimer: This post is provided as is with no rights & warranty for accuracy, for the sake of knowledge sharing only.
thx for quick reply…
quote:Originally posted by deepakontheweb here you go…
select TABLE_NAME from INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA<>’dbo’ Deepak Kumar
SQL Server MVP, MCDBA
[email protected] Disclaimer: This post is provided as is with no rights & warranty for accuracy, for the sake of knowledge sharing only.

]]>