I'm deploying an example SQL CLR
stored procedure which has a SQL CLR
type as parameter using Visual Studio 2008 and menu Project -&g开发者_如何学运维t; Deploy
.
public partial class StoredProcedures
{
[Microsoft.SqlServer.Server.SqlProcedure]
public static void TakeTariff(TariffInfo tariffInfo) { }
}
public class TariffInfo
{
public SqlDecimal Amount { get; private set; }
}
but getting next strange error:
The default schema does not exist.
How can I fix that?
My user was created this way:
CREATE USER myUser FOR LOGIN myLogin_mod WITH DEFAULT_SCHEMA = mySchema
You'll need to run this to create the schema before you add objects to it...
CREATE SCHEMA mySchema AUTHORIZATION myUser --or dbo
CREATE USER
does not check this:
...DEFAULT_SCHEMA can be set to a schema that does not currently exist in the database...
精彩评论