I have a stored procedure that pulls information from
several different servers. The problem is that if one of
the servers goes down the entire procedure fails, and none
of the servers get their information. I altered the
procedure to run a query on each of the servers to see if
the server exists, and if it raised an error I would have
the query only select null values for that server. The
problem is that when I run this first query to check to
see if the server exists, if the server doesn't exist then
it throws an error and stops the stored procedure. I
tried the method below but it failed (the procedure is a
loop that builds a string combining the queries for each
server then executes the string at the end). Please help!

set xact_abort on
begin distributed transaction
set errorsql = 'select top 1 * from ' + server
+ '.DBase.dbo.Table'
if error != 0
set errornum = 1
commit tran
if errornum != 1
--add servers info
--add null values if server doesn't exist

Thanks for the help,
Adam Campbell