Table of Contents
SQL Server Error: 16915
Severity: 16
Event Logged or not: No
Description:
A cursor with the name ‘%.*ls’ already exists.
Severity 16 Description:
Indicates general errors that can be corrected by the user.
Msg 16915, Level 16, State 1, Procedure client_myClientsProc, Line 46
A cursor with the name ‘cur_keywords’ already exists.
Msg 16905, Level 16, State 1, Procedure client_myClientsProc, Line 47
The cursor is already open.
Identifying SQL Server Error Log File used by SQL Server Database Engine can be done by reading SQL Server Error Logs. DBA can execute the XP_READERRORLOG extended stored procedure to read the SQL Server Error Log and search for its location used by the instance of SQL Server.
USE master
Go
xp_readerrorlog 0, 1, N'Logging SQL Server messages in file', NULL, NULL, N'asc'
Go
For other ways to read and find error log location please our article https://sqlserver-dba.co.uk/error-log/sql-server-identify-location-of-the-sql-server-error-log-file.html
Is the error encountered during running Stored procedure? Did the saved procedure previously fail?
It can be because there is no TRY…Catch, it appears that the CLOSE and DEALLOCATE instructions were not executed. This may happen if the code encountered a mistake. To ensure that the cursor has been correctly wiped off, use CATCH in your code or another approach. Try disconnecting and reconnecting (or manually running CLOSE and DEALLOCATE in the same connection).
The second inaccuracy is most likely due to a lack of clean-up. If a temporary table already exists when you run the stored method, the code DROPs it. However, the CREATE is in the ELSE section of that statement. If the table already exists, it will be DROPPETED and will not be rebuilt.
SQL Server Error: 16915
Severity: 16
Event Logged or not: No
Description:
A cursor with the name ‘%.*ls’ already exists.
Learn about SQL Server detecting logical consistency based issues and how to resolve them.
Learn about SQL Server error 1222 and how to resolve the lock request time out…
Discover the new features of Microsoft SQL Server 2022 and how they compare to previous…
SQL Server Error 1222 lock request time out period exceeded Lock request time out…
SQL Server Error : 427, Severity: 20. Could not load the definition for constraint ID…
SQL Server Error : 204, Severity: 20. Normalization error in node %ls.
This website uses cookies.