Groups | Blog | Home
all groups > sql server new users > march 2006 >

sql server new users : Problem with table owners



david epsom dot com dot au
3/31/2006 12:00:00 AM
I am a naive user.

We have a database where some of the tables are duplicated.
One version of the table is owned by dbo, the other is owned by "test_admin"

How do you get a table owned by "test_admin".

When would you deliberately choose to have a table not owned by dbo?

Is it ever safe to assume that tables will be owned by dbo?

(david)

lara169
3/31/2006 12:00:00 AM
[quoted text, click to view]

SELECT TABLE_NAME
FROM INFORMATION_SCHMA.TABLES
WHERE TABLE_SCHEMA = 'test_admin'


[quoted text, click to view]
ever safe to assume that tables will be owned by dbo?
This depends on your application. If you login as some different user say
'user1' , and creates a table, by default its owner is 'user1'
Otherwise you need to explicitly specify the ownership of the table in the
create table statement

CREATE TABLE dbo.MyTable (

)



[quoted text, click to view]

david epsom dot com dot au
4/5/2006 12:00:00 AM
Thank you.




[quoted text, click to view]

AddThis Social Bookmark Button