The error-handling tag has no wiki summary.
1
vote
1answer
39 views
Oracle error handling strategy [duplicate]
I am developing a project using oracle. I am writing functions and stored procedures to handle CRUD statements.
My question is in addition to oracle check constraints do i have to check error ...
2
votes
3answers
108 views
Backups script completes, but doesn't back up all dbs
I'm running sql server 2005 and I've made a simple backup script that backs up all the databases on one server. The script always succeeds, but when I go to check the log or the files, I see it has ...
1
vote
1answer
39 views
How to suppress an informational raiserror message
I have a setup script that calls sp_configure a few times to set up some system variables, it works fine but I have a few of the following statement
Configuration option '%ls' changed from %ld to ...
0
votes
2answers
78 views
Long time, sporadic 'String or Binary data would be truncated.' Wisdom would be appreciated
TL;DR
How can I diagnose the source of a very inconsistent, un-reproducable 'String or Binary data would be truncated.' error, when I am quite positive the problem isn't related to user data being to ...
2
votes
1answer
122 views
DB2 Server Table Space Locked
At work we keep receiving the following DataException seemingly at random when one of our processes tries to write/access a table for one of our clients:
com.ibm.db.DataException: A database manager ...
0
votes
3answers
172 views
What is ERROR_STATE() in SQL Server and how it can be used?
I read that ERROR_STATE() can help to distinguish between different states/locations in the source code where same type of error can occur. But it is not really clear to me that how it can be useful.
...
6
votes
1answer
224 views
Package state not re-intialized on raise_application_error
When a package has state and the header is changed, the first call gets an error stack something like this:
ORA-04068: existing state of packages has been discarded
ORA-04061: existing state of ...
2
votes
1answer
396 views
Finding exact statement causing error 3930
Lately I've been seeing errors in the SQL Server Log.
Code:3930 Description:"The current transaction cannot be committed and cannot support operations that write to the log file. Roll back the ...
0
votes
0answers
208 views
MySQL: Get info from SHOW ERRORS
How can I get the info (code and message fields) from SHOW ERRORS? Or even, how can I insert this information into a table to keep tracking the errors?
Something like
SELECT CONCAT(Code,' - ', ...
4
votes
1answer
106 views
Raising an error with a system message_id in SQLCLR
If call CREATE DATABASE foo twice I get the error message:
Msg 1801, Level 16, State 3, Line 1
Database 'dropme' already exists. Choose a different database name.
The error message is listed in ...
6
votes
1answer
266 views
CATCH block is triggered when it should not
On my neverending quest for shooting myself in the foot with save transaction I seem to have found even more ways to fulfill the quest purpose. The save transaction clause itself this time is out of ...
7
votes
2answers
452 views
Does Oracle PL/SQL have a standard ASSERT routine?
I'd like to use an ASSERT routine functionally similar to the one found in other languages, i.e. a construct (be it a procedure, syntax...)
ASSERT( <condition>, <msg>)
such that when ...
2
votes
0answers
93 views
CREATE ASSEMBLY - EXCEPTION_ACCESS_VIOLATION
I am trying to create an assembly on my SQL Server 2005 server. Here is what I am using:
CREATE ASSEMBLY [SQLCLRTest]
AUTHORIZATION [dbo]
FROM 'path\to\my\file.dll'
WITH PERMISSION_SET = ...
5
votes
3answers
266 views
Write to Error Log
Using SQL Server 2008 R2:
How can I write to the SQL Server Error Log? I have a ROLLBACK statement that I'd like to couple with a statement written to the error log for external monitoring.
...
2
votes
2answers
2k views
How to log error details when using using try/catch for dynamic SQL backup commands
When issuing a backup command within a stored procedure that uses a try catch and dynamic sql, the error messages are very general when compared to running the backup command directly.
Try/Catch ...
0
votes
1answer
630 views
How to create custom error messages in APEX?
I would like to replace standard ORA-xxxxx messages with custom ones in Oracle Application Express. For example instead of this:
to have something like "You have left some fields blank, try again".
...
2
votes
1answer
396 views
log_warnings doesn't seem to work for aborted connections in MySQL 5.1
The docs for 5.1 say that I can set log_warnings = 2 to capture Aborted_connects in the error log. This bug report suggests that this was only merged into 5.5 and 6.0 (and maybe 5.2) but not into ...
3
votes
0answers
219 views
tds: unable connect to SQL Server using servername specified in freetds.conf file
I am using freetds to connect to SQL Server from ubuntu.
First, the SQL Server is running at port 1433 currently. I can telnet it. The following command also works. I can query table data using it,
...
0
votes
1answer
157 views
Which tools can be used to clean CSV files prior to bulk insert?
Which tools and programming libraries are you aware of that can help accelerate CSV manual correction process when column separator characters are encountered within data elements?
I'm currently not ...
5
votes
2answers
433 views
Error handling in container procedures
I'm aware of and use the techniques in this question.
In my environment we have a lot of container procedures that call subprocedures, that may call other procedures, ad infinitum.
For me ...
2
votes
0answers
613 views
ORA-01017: invalid username/password; logon denied
I've come across the abnormal situation, and can't understand what happens.
I am connecting databases using PL/SQL Developer 8.0.4.1514(I've also tried v7,but same) . Sometimes(When I am trying to ...
3
votes
1answer
171 views
Odd SQL Server Studio error, but not on SQL Server Express?
I'm running a query that I got today from a previous question, and I just noticed an error that only happens when I run this query ON the server (RDC + MS Studio -- not express) vs on my machine which ...
6
votes
2answers
301 views
Pros and Cons of Checking if value exist for unique column or let db raise unique error on inserting
While writing a query other day a thought came to me and have stuck in my mind.
What is preferable, first checking if a value for a unique column exists and then inserting or insert and let db raise ...
2
votes
2answers
427 views
Running a number of .sql files using SQLCMD
I'm trying to put together a batch file to run a large number of .sql files without doing so individually.
So far I have:
@echo off
echo "Enter Server"
set /p SERVER=
echo "Enter Database"
set /p ...
0
votes
2answers
93 views
ORACLE DB ERROR
We are currently experiencing a problem with Oracle DB 8. It is no longer starting and we get this message:
ERROR at line 1:
ORA-01113: file 19 needs media recovery
ORA-01110: data file 19:
...
4
votes
1answer
110 views
how much overhead an error in RDBMS has?
I have a class in my project. On the class I need to do two inner select, to know is there any duplication or not, but I think if I get duplication error and then manage that is better than to select.
...
1
vote
1answer
1k views
Changed database context to 'MyDbName'
I am catching all errors on my Sql Server, I got errors:
Changed database context to 'MyDbName'.
Changed language setting to us_english.
I haven't found any clear explanation of problem and ...
2
votes
1answer
3k views
Why TRY CATCH does not suppress exception in trigger
I have a trigger on a table (source) that data should be copied to the other one (target) in other database. I am trying to implement custom synchronization process for data: I want that target ...
0
votes
1answer
287 views
Make SQL Server Agent retry failed script with Try/Catch
I have a script that has a try catch in it so that if it fails I can roll back the transaction. It runs on a job scheduled through SQL Server Agent. But when it fails SQL Server Agent does not see ...
1
vote
1answer
2k views
Function returning “No data - zero rows fetched, selected, or processed” in MySQL 5.5
I have upgraded MySQL version to 5.5.16
After upgrading, some of the functions are giving warning as No data - zero rows fetched, selected, or processed.
In those functions, cursors are there, but ...
3
votes
1answer
2k views
RMAN-06054: media recovery requesting unknown archived log, Where is SCN kept?
I have the following situation:
Backups of DB1(located on srv1 server) database are taken everyday at 1:00 AM.
I took backed up files(datafile,archivelog,controlfile,spfile) of 24/10/2011 and ...
2
votes
1answer
660 views
ORA-01555: snapshot too old: rollback segment number with name “” too small
This error appears when I am trying to move LOB segment from one tablespace to another one.
Also during exporting the same error appears.
What can be a problem?
10
votes
1answer
561 views
Generate an exception with a Context
When PostgreSQL throws an exception, there is a line "CONTEXT" like:
ERROR: INSERT has more target COLUMNS than expressions
LINE 3: ...
...
2
votes
2answers
800 views
Query data from multiple linked remote databases
Using SQL Server 2005 databases and SQL Server Management Studio 2008, I need to query a single value from each of n linked databases at a regular interval. The servers are physically remote and I can ...
3
votes
1answer
3k views
Equivalent functions in MySQL that exist in SQL Server
In an EXIT HANDLER block, what are the MySQL equivalents of
OBJECT_SCHEMA_NAME(@@PROCID) + '.' + OBJECT_NAME(@@PROCID)
ERROR_MESSAGE()
Edit
What I want to do.
In SQL Server I'd have
CREATE PROC ...
