Archive

Archive for the ‘SQL Errors’ Category

SQL Error – Unable to generate a temporary class (result=1), error CVT1108, error CS1583

August 14, 2015 2 comments

 
Few days back I got an email from one of this blog reader mentioning that he was facing issues while Installing SQL Server, and was getting following error:

SQL Server Setup has encountered the following error:

Unable to generate a temporary class (result=1).
error CVT1108: cannot open C:\Users\DELL\AppData\Local\Temp\RESAC3F.tmp for writing
error CS1583: ‘c:\Users\DELL\AppData\Local\Temp\CSCAC2F.tmp’ is not a valid Win32 resource file

 

By the above error its evident that the user does not have sufficient rights to the Temporary location mentioned above “C:\Users\DELL\AppData\Local\Temp”.

As the SQL Server installer EXE is trying to extract the compressed files to this Temp location before actually installing SQL Server on your machine. But it looks like due to some reason the use account does not have access to this location, thus throwing error mentioned above.
 

–> Now the resolution for this is to, either:

1. Re-extract the contents to an another drive where you have full permission.

– or –

2. To set proper rights for the User on the Temp location. Go to the above Temp location and Right-click on the Temp folder, and select Properties, go to Securities tab. Under the “Groups or user names:” section just check if your user name is there. Select the user name and make sure it should have “Full Control” selected under the “Permissions for Administrators”. If it’s not then click on the Edit button and provide Full rights to the user account.


Error Msg 8672, MERGE statement attempted to UPDATE or DELETE the same row more than once – MSDN TSQL forum

August 5, 2015 Leave a comment

–> Question:

I am trying to do update/insert operation using merge statement, but getting below error:

“The MERGE statement attempted to UPDATE or DELETE the same row more than once. This happens when a target row matches more than one source row. A MERGE statement cannot UPDATE/DELETE the same row of the target table multiple times. Refine the ON clause to ensure a target row matches at most one source row, or use the GROUP BY clause to group the source rows.”

I am using SQL Server 2014. I knew there was a bug in older version of SQL Server (like version 2008). Does this issue still persist in latest version of SQL Server?
 

–> My Answer:
There might be 2 reasons:

1. Your source/target tables might be having DUPLICATES.

2. There might NO DUPLICATES, but you might be using NOLOCK hint? If yes, then your source table might be very big and going through constant changes (INSERT/UPDATE/DELETE), which might be causing PAGE-SPLITS and causing to read single source row TWICE. Try removing NOLOCK and run your MERGE stmt.
 

–> Another Answer by Naomi:

You need to fix the source of the problem, not apply patches. If your source has duplicate rows for the same key used to update, when how would you know which row will be used to update? The simple solution is to eliminate duplicates by either using correct combinations of keys to join or creating an extra key with ROW_NUMBER() approach.
 

Ref Link.


SQL Error – Execution of user code in the .NET Framework is disabled. Enable “clr enabled” configuration option

June 26, 2015 Leave a comment

 
Error Message:

Executed as user: DOMAIN\Account. Execution of user code in the .NET Framework is disabled. Enable “clr enabled” configuration option. [SQLSTATE 42000] (Error 6263). The step failed.
 

–> Resolution:

-- show advanced options
EXEC sp_configure 'show advanced options', 1
GO
RECONFIGURE
GO

-- enable clr enabled
EXEC sp_configure 'clr enabled', 1
GO
RECONFIGURE
GO

-- check if it has been changed
EXEC sp_configure 'clr enabled'
GO

-- hide advanced options
EXEC sp_configure 'show advanced options', 0
GO
RECONFIGURE
GO

Categories: SQL Errors Tags:

SQL Error – SQL Server blocked access to procedure ‘dbo.sp_send_dbmail’ of component ‘Database Mail XPs’

June 25, 2015 2 comments

 
Error Message:

Executed as user: DOMAIN\Account. 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’, search for ‘Database Mail XPs’ in SQL Server Books Online. [SQLSTATE 42000] (Error 50000). The step failed.
 

–> Resolution:

-- show advanced options
EXEC sp_configure 'show advanced options', 1
GO
RECONFIGURE
GO

-- enable Database Mail XPs
EXEC sp_configure 'Database Mail XPs', 1
GO
RECONFIGURE
GO

-- check if it has been changed
EXEC sp_configure 'Database Mail XPs'
GO

-- hide advanced options
EXEC sp_configure 'show advanced options', 0
GO
RECONFIGURE
GO

Categories: SQL Errors Tags:

SQL Error – SQL Server blocked access to procedure ‘sys.xp_cmdshell’ of component ‘xp_cmdshell’

June 24, 2015 Leave a comment

 
Error Message:

Executed as user: DOMAIN\Account. SQL Server blocked access to procedure ‘sys.xp_cmdshell’ of component ‘xp_cmdshell’ because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of ‘xp_cmdshell’ by using sp_configure. For more information about enabling ‘xp_cmdshell’, search for ‘xp_cmdshell’ in SQL Server Books Online. [SQLSTATE 42000] (Error 50000). The step failed.
 

–> Resolution:

-- show advanced options
EXEC sp_configure 'show advanced options', 1
GO
RECONFIGURE
GO

-- enable xp_cmdshell
EXEC sp_configure 'xp_cmdshell', 1
GO
RECONFIGURE
GO

-- check if it has been changed
EXEC sp_configure 'xp_cmdshell'
GO

-- hide advanced options
EXEC sp_configure 'show advanced options', 0
GO
RECONFIGURE
GO

Categories: SQL Errors Tags: