Common SQL Errors and Solutions

Error : Msg 7411, Level 16, State 1, Line 1 Server ‘DEVSQLDEV2008’ is not configured for RPC. Solution :

Error : 2014-09-11 16:14:23.410 Logon SSPI handshake failed with error code 0x8009030c while establishing a connection with integrated security; the connection has been closed. [CLIENT: 192.168.63.109] 2014-09-11 16:14:23.430 Logon Error: 18452, Severity: 14, State: 1. Solution : Most of the times Flushing the DNS helps me resolve this issue.

SQL Error : Msg 10314, Level 16, State 11, Line 130 An error occurred in the Microsoft .NET Framework while trying to load assembly id 65549. The server may be running out of resources, or the assembly may not be trusted with PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE. Run the query again, or check documentation to see how to solve the assembly trust issues. For more information about this error: System.IO.FileLoadException: Could not load file or assembly ‘lighthouseclr, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. An error relating to security occurred. (Exception from HRESULT: 0x8013150A) System.IO.FileLoadException: at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.Load(String assemblyString)

Solution:
When you encounter this error , change the database owner to sa and then set the trustworthy on for the Database.

Error :
Msg 15281, Level 16, State 1, Procedure sp_send_dbmail, Line 0
SQL Server blocked access to procedure ‘dbo.sp_send_dbmail’ of component ‘Database Mail XPs’ because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of ‘Database Mail XPs’ by using sp_configure. For more information about enabling ‘Database Mail XPs’, see “Surface Area Configuration” in SQL Server Books Online.

——————————————-
—START RAPID DEVELOPEMENT SQL SCRIPT—–
—SQL COMPILED BY: Raju Venkataraman
—SCRIPT RAN ON DB: master
—SCRIPT START TIME: 2014-10-28 18:51:45.043
—Application : Microsoft SQL Server Management Studio – Query
—TranCount : 0
——————————————-
Msg 5315, Level 16, State 1, Line 301
The target of a MERGE statement cannot be a remote table, a remote view, or a view over remote tables.

Solution:
https://msdn.microsoft.com/en-us/library/bb933783.aspx
This error can occur if you are querying metadata under snapshot isolation and there is a concurrent DDL statement that updates the metadata that is being accessed under snapshot isolation. SQL Server does not support versioning of metadata. For this reason, there are restrictions on what DDL operations can be performed within an explicit transaction running under snapshot isolation. An implicit transaction, by definition, is a single statement which makes it possible to enforce the semantics of snapshot isolation even with DDL statements. The following DDL statements are not permitted under snapshot isolation after a BEGIN TRANSACTION statement: ALTER TABLE, CREATE INDEX, CREATE XML INDEX, ALTER INDEX, DROP INDEX, DBCC REINDEX, ALTER PARTITION FUNCTION, ALTER PARTITION SCHEME, or any common language runtime (CLR) DDL statement. These statements are permitted when you are using snapshot isolation within implicit transactions. An implicit transaction, by definition, is a single statement which makes it possible to enforce the semantics of snapshot isolation even with DDL statements.

Solution:
Open the Internet Explorer as Administrator and access the URL. It will work.

Solution:
Download the latest DACFramework and Install it. It fixed problem for me.
http://www.microsoft.com/en-us/download/confirmation.aspx?id=39976

Solution:
Append Double Quotes around the search string.

Communication Buffer Resources ( Memory Issues Deadlock )

clr enabled Configuration Error

Msg 6263, Level 16, State 1, Line 277
Execution of user code in the .NET Framework is disabled. Enable “clr enabled” configuration option.

Error Solution
EXECUTE AS USER = ‘Login’;
SELECT * FROM fn_my_permissions(NULL, ‘DATABASE’);
REVERT;/*
The database owner SID recorded in the master database differs from the database owner SID recorded in database ”.
You should correct this situation by resetting the owner of database ” using the ALTER AUTHORIZATION statement.
*/
EXEC sp_changedbowner ‘sa’

Table Level Change Tracking Error

Msg 22105, Level 16, State 1, Procedure xxxxxxxxxxxx, Line 96 [Batch Start Line 4]
Change tracking is not enabled on table ‘dbo.SampleTable’.

Leave a Reply

Your email address will not be published. Required fields are marked *

*