Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create CLR procedure in C# that will be deployed in schema other than DBO

I would like to create an SQL function that will be deployed in a schema other than DBO.

I found a post where a workaround with post build script is explained.

How to force dbo schema name?

I could use the above mentioned solution, but i kinda feel there should be something more civilized that that. Some parameter settings maybe, or attribute.

Thank you

like image 285
To Ka Avatar asked Nov 05 '22 16:11

To Ka


1 Answers

There are two options to achieve what you want:

  • you can configure the owner of the Procedure in the project settings/tab database
  • otherwise the default schema of the connection you use in VS is the one getting used

So if you want it put in a different schema you either use a connection with your target schema as default schema or configure the project settings accordingly...

like image 121
Yahia Avatar answered Nov 15 '22 05:11

Yahia