New answers tagged sql-clr
How can I grant execute permissions to sa user? You don't need to grant execute anything to sa as sa is in the sysadmin server role and can pretty much do anything. Hence, if you are getting an error executing xp_logevent, then you aren't logging in as sa. Is the connection string using context connection = true; or a regular / external connection? If ...
You need to have below permissions as per MSDN Requires membership in the db_owner fixed database role in the master database, or membership in the sysadmin fixed server role.
Why not just execute xp_logevent via SqlContext.Pipe.ExecuteAndSend() in your catch block?
The problem is a locale conflict between the Windows OS and SQL Server. You can run the following query to see what they are both set to: SELECT os_language_version, SERVERPROPERTY('LCID') AS 'SqlServerLCID' FROM sys.dm_os_windows_info; If they are different then you can definitely get some "odd" behavior, such as what you are seeing. The issue is that: ...
When you create a mirror of the database the "trustworthy" flag is set to false by default. And you need to sync the SID of the dbo on each side (I don't understand how this works for the SA user. Need to study more. To resolve the issue I failed the database over to the secondary node. Set Trustworthy to True. After that I attempted to run the Procedure ...
Updated.. The localization is different between the SQL Engine and the window Server as @srutzky points out: os_language_version SqlServerLCID 1033 1039 The following change to the code - setting the option RegexOptions.CultureInvariant gets around the error. The unchanged code will not crash SQL Server 2012 on Windows Server 2012R2 ...
Top 50 recent answers are included