March 5, 2012 at 3:11 pm
You have to first have your new schema created. Then you need to alter that schema and transfer the object(s).
http://msdn.microsoft.com/en-us/library/ms190387.aspx
http://msdn.microsoft.com/en-us/library/ms173423.aspx
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
March 5, 2012 at 5:42 pm
You don't really "name" then the schema. I guess you reference them that way, but really you are grouping them, just like a role.
Objects have an owner, separate from the schema.
As Sean mentioned, you create a schema, which is an empty container. Then you move objects into this schema, if you find a need, and grant rights for the schema.
However you don't need to do this. You can grant rights on the objects, or use a role to grant rights. Schemas offer some other value, like the same named object in a new schema (for ETL or auditing).
Viewing 2 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply