Skip to main content

Questions tagged [error-handling]

0 votes
0 answers
85 views

Example code below populates a PhoneNumber table and associates those PhoneNumberId's with an OrderNumber. As written I am getting the error message: The current transaction cannot be committed and ...
Kirk Saunders's user avatar
5 votes
1 answer
427 views

I am trying to grant the [CONNECT ANY DATABASE] permission to a specific SQL account on multiple instances. However, one server is running SQL Server 2012 and that permission was not introduced until ...
AABCDS's user avatar
  • 119
2 votes
1 answer
302 views

Given the following SQL Server Agent job USE [msdb] GO BEGIN TRANSACTION DECLARE @ReturnCode INT SELECT @ReturnCode = 0 IF NOT EXISTS (SELECT name FROM msdb.dbo.syscategories WHERE name=N'[...
SE1986's user avatar
  • 2,256
0 votes
1 answer
137 views

I have an old, large (more than 140 lines), and complicated SQL query. It is joining many tables and has detailed WHERE conditions with values and a detailed GROUP BY part. Query Structure SELECT ...
Fevzi Kartal's user avatar
0 votes
1 answer
55 views

To improve our insights on the health of some of our services, we've decided to improve our logging practices. One thing I've always wanted to explore was whether it's possible to easily correlate a ...
nicholaswmin's user avatar
0 votes
2 answers
153 views

I'm working on enviorment SQL azure. I've got a stored procedure that runs from several AKS simultaneously and insert a message. So it's a race for who writes the message first and the rest fails. The ...
dexon's user avatar
  • 67
1 vote
1 answer
188 views

What happens when a client timeout occurs during the execution of a stored procedure that raises XACT_ABORT and wraps its body in TRY/CATCH blocks? I am looking at a bunch of procedures that generally ...
Betty Liv's user avatar
0 votes
0 answers
138 views

I know how I redirect rows on error or truncation. That works if you have an error while you insert a value into the column. Truncation: Say you have a string of 10 characters and you insert it into ...
questionto42's user avatar
2 votes
1 answer
2k views

I am just trying to see if I understand this correctly: By default, any error occurring in a PL/pgSQL function aborts execution of the function and the surrounding transaction I have a procedure ...
Lugoom485's user avatar
0 votes
3 answers
142 views

I have a Python script that glues together individual SQL scripts like: creating tables, creating views, creating functions, creating stored procedures... It produces the single installation SQL ...
pepr's user avatar
  • 143
0 votes
1 answer
1k views

I've got a stored procedure that call another stored procedure. And i sometime get an error : System.Data.SqlClient.SqlError: The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION. At ...
dexon's user avatar
  • 67
1 vote
1 answer
530 views

I am doing a batch update where I process records sequentially (User 1, User 2 etc). Each record has multiple update queries associated to it. I need to skip if there is a data issue for an individual ...
Nishant's user avatar
  • 899
3 votes
1 answer
496 views

I have created a stored procedure that uses dbcc checkdb on all userdatabases, if there are any errors detected it then collates the errors and formulates a html table and sends an html email to ...
BLoB's user avatar
  • 163
1 vote
1 answer
704 views

PROBLEM I recently encountered the error 2013 in MySql (Lost connection to MySQL server during query) while executing the COMMIT statement for a transaction (the previous update statements succeeded). ...
bruno-kakele's user avatar
0 votes
2 answers
2k views

I need to create an error-handling method for a couple of Stored Procedures. Proc1 CREATE PROCEDURE dbo.Proc1 AS BEGIN TRY BEGIN TRANSACTION EXEC Proc2 INSERT INTO tableA (col1, col2) ...
Semperfi89's user avatar

15 30 50 per page
1
2 3 4 5
11