Continue SP after Database Access Failure
From: PaulaPompey (PaulaPompey_at_discussions.microsoft.com)
Date: 02/01/05
- Next message: Damon: "Re: Display most recent date?"
- Previous message: Tom: "RE: Display most recent date?"
- Next in thread: Ami Levin: "Re: Continue SP after Database Access Failure"
- Reply: Ami Levin: "Re: Continue SP after Database Access Failure"
- Reply: JohnnyAppleseed: "Re: Continue SP after Database Access Failure"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 1 Feb 2005 02:19:02 -0800
Over night we take a copy of various live SQL databases onto another SQL
server for reporting purposes.
I have a stored procedure that compares the latest live data against the 1
day old copies to ensure that they are up to date.
I connect to the live databases using linked servers.
Here's where the problem is - when one of the external links is down or one
of the live databases is offline the stored procedure has an error and stops.
How can I test within the stored procedure that the database on the linked
server is available? Then, based on the result, carry out an action?
Even a simple select statement against an unavailable database halts the
whole SP even though I've tried breaking the code down into seperate
transactions, checking for @@ERROR > 0, SET XACT_ABORT OFF, the code still
fails with "SQL Server does not exist or access denied."
Any advice greatly appreciated.
- Next message: Damon: "Re: Display most recent date?"
- Previous message: Tom: "RE: Display most recent date?"
- Next in thread: Ami Levin: "Re: Continue SP after Database Access Failure"
- Reply: Ami Levin: "Re: Continue SP after Database Access Failure"
- Reply: JohnnyAppleseed: "Re: Continue SP after Database Access Failure"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|