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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Schema, owner and fully qualified name

Author  Topic 

Scott
Posting Yak Master

145 Posts

Posted - 2008-03-27 : 16:52:06
I have a database that has been upgraded from SQL 200 to 2005. The database was owned by 'Joe' and all objects were also owned by 'Joe'. In SQL 2000 when Joe logged in he could simply issue 'select * from table' and would get results.

The upgraded db now has a user Joe and a schema Joe. All objects now belong to the schema Joe. Joe the user has his default schema set to Joe and he is the owner of the schema. When Joe logs in and tries to 'select * from table' he gets an invalid object. He can 'select * from joe.table'.

How can I set it up so that the objects are still owned by the schema Joe and a simple 'select * from table' works when user Joe logs in? I was convinced that is he owned the schema and this was his default schema it should work.

Thanks
scott

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-03-27 : 20:20:03
Go Login- choose joe and make default schema joe.

Go schema- make sure joe owns all objects with joe schema.

Permission:choose joe schema and give permissions

Then you are ready to go.
Go to Top of Page
   

- Advertisement -