I recently registered my hosted database server on my pc. When I ran aspnet_regsql.exe the table created have dbo as schema, but when I create a news table throught stored procedure it has my username as schema.
When I buildt my site on my pc all tables have dbo as schema.
How do I make all tables on my hosted server db have same schema?
Thanks
The very Newbie
Thanks for your reply Iori_Jay.
Where and how in Management Studio do I make sure that default schema is MyUsername(current database user) instead of getting schema "dbo" for some tables and schema "MyUsername" for other tables?
When I ran aspnet_regsql.exe all tables and procedures have schema dbo allthough I use my username to create them.
Thanks again
The Very Newbie
We learn from masters
Thanks again Iori_Jay,
In the security folder of my database there are 2 users: dbo and myself. I need to transfer schema, but don´t know how to make it work. My hosted server uses sql server 2000.
Thanks
|||
In SQL 2000 SHCEMA is not a seperated object, it equals to the owner of the object. So you need to change to owner of the object using such command:
EXEC sp_changeobjectowner 'myself.tbl1', 'dbo'
|||Thanks a lotIori_Jay.
It works fine.
sql
No comments:
Post a Comment