Skip to main content

Questions tagged [error-handling]

The tag has no usage guidance.

0 votes
1 answer
27 views

Passing contextual information to Postgres statements

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
101 views

Performance issue - using try catch to return data to service & how to use partition table with unique index

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
  • 47
0 votes
1 answer
73 views

Does client timeout send the execution of a stored procedure from the TRY block to the CATCH block?

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
51 views

Can I redirect rows on error in SSIS if the error happens within an "if condition", not while writing the column value?

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
305 views

Catching exceptions and rolling back transactions

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
82 views

How to exit the Azure SQL script to skip all remaining batches?

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
258 views

Error handling - stored procedure nested in another stored procedure

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
  • 47
0 votes
0 answers
105 views

MySQL 8: show deprecated error only as warning

I'm migrating MySQL from 5.7 to 8.0.32. I know character set utf8mb3 and its collations are deprecated. But we have lots of functionality and data with utf8mb3, and we don't have more time to change ...
yaki_nuka's user avatar
  • 141
1 vote
1 answer
215 views

Handle partial failures in a transaction (commit selectively) in MSSQL

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
  • 879
3 votes
1 answer
302 views

How to cause a SQL Server database integrity error

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
432 views

Lost connection to the database during COMMIT query: did the transaction succeed or not?

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
1k views

Try Catch w/Transaction and executing stored procedures

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
0 votes
1 answer
688 views

Logging in error states in Postgres transactions

I'm currently working on rebuilding some SQL Server stored procedures in Postgres, but I have the following hangup CREATE OR REPLACE PROCEDURE public.math_proc () LANGUAGE plpgsql AS $$ BEGIN ...
Rushabh Mehta's user avatar
0 votes
2 answers
364 views

WHILE EXISTS Error Handling/ Raise Error

I am adding a step in my SQL job where it does a WHILE EXISTS check for me before executing the last step. What it does is it will wait for 15minutes to see if the table I am checking has been ...
WhoIsNotActive's user avatar
-2 votes
1 answer
1k views

PSQL avoid insert failing because a trigger failed

I want to put a trigger on a table, the code itself could work sometimes, while sometimes it might fail unexpectedly. So I need the data to get inserted on the table regardless if one of its triggers (...
Eugenio.Gastelum96's user avatar

15 30 50 per page
1
2 3 4 5
10