Continue SP after Database Access Failure

From: PaulaPompey (PaulaPompey_at_discussions.microsoft.com)
Date: 02/01/05


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.



Relevant Pages

  • Re: Problem using SP as record source with Access2002 & SQL Server 7
    ... I've installed a brand new copy of SQL Server 2000 with the original ... I've created the folowing stored procedure for the resync ... Resync Command: ALL_CUSTOMERS_RESYNC? ... I need to upgrade to a newer version of Microsoft SQL ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Side-by-side upgrade - moving master, msdb and model
    ... MVP - Windows Server - Clustering ... "In some cases, you may want to copy the system databases, including ... from the source SQL Server 2000 instance to the SQL ...
    (microsoft.public.sqlserver.clustering)
  • Re: BizTalk Server 2004 ConfigFramework.exe error
    ... one BizTalk is installed on? ... machines (both for SQL and DTC) is not blocked by firewalls and new MSDTC ... Multi-computer configuration using Windows Server 2003 or Windows XP ... >>all associated databases. ...
    (microsoft.public.biztalk.general)
  • RE: Clustering a standalone SQL server + storage array
    ... working as expected with out error your ready to install sql server. ... log files to the data and log shared drives you setup as part of the cluster. ... Our apps team look after a trading system that uses an HP DL360 server ... running SQL 2000 SP3a with a few small databases on it. ...
    (microsoft.public.sqlserver.clustering)
  • Re: Creating a database
    ... Please do yourself a favor, find a local user group, or buy a beginning book on SQL Server or take a class, you will save yourself a great deal of pain in the long run. ... CREATE DATABASE Products ... I can create a stored procedure from within the Server Explorer and from ...
    (microsoft.public.dotnet.framework.adonet)

Loading