I'm interested in configuring Visual Studio (2010) so that when deploying C# CLR Database projects, it puts stuff in schemas other than DBO. I understand I can update the function/procedure/etc... wrappers it creates manually to make this happen: CLR Stored Procedures: how to set the schema/owner?
However, I'd really like to automate the process somehow. If anybody knows, I'd really appreciate the answer!
A schema is a collection of database objects like tables, triggers, stored procedures, etc. A schema is connected with a user which is known as the schema owner. Database may have one or more schema. SQL Server have some built-in schema, for example: dbo, guest, sys, and INFORMATION_SCHEMA.
Schema refers to database tables and how them are related to each other. Stored procedures are also part of the database, but not of the schema. UPDATED: Stored procedures are incorrectly mentioned as not part of a database schema.
The stored procedures are compiled and stored in the database. The CLR stored procedures are the combination of the CLR and stored procedure. CLR SPs are the . Net objects which run in the SQL Server memory of the SQL Server database.
You can change stored procedure from one schema to another using
ALTER SCHEMA Org TRANSFER dbo.spUdpateCompany
It should be mentioned that this question is obsolete as of Visual Studio 2012 which has a "Default Schema" configuration field for the generated T-SQL wrapper objects. This has also been noted in the "Update" section at the top of the following answer ;-) :
CLR Stored Procedures: how to set the schema/owner?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With