Ask a Question related to Microsoft SQL / MS SQL Server, Design and Development.
-
Adam Campbell #1
Stored Procedure Servers Error
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'
exec(@errorsql)
if @@error != 0
begin
set @errornum = 1
end
commit tran
if @errornum != 1
begin
--add servers info
end
else
begin
--add null values if server doesn't exist
end
Thanks for the help,
Adam Campbell
Adam Campbell Guest
-
Oracle Stored procedure error from CF
I have a stored proc working on a oracle server, connected through JDBC to the CF server. I ran the stored proc on the oracle server through PL/SQL... -
Simple Stored Procedure Error
CREATE PROCEDURE sp_magazine_sections @magazine_id INT, @magazine_section_id INT as IF @magazine_section_id is not null BEGIN SELECT ... -
Stored procedure error
We are attempting to use a stored procedure to enter data into two tables and we are recieving this error: ADODB.Command error '800a0d5d' ... -
Error in compiling stored procedure
For -901 always call support. They are internal error-messages you should never see. When calling support ask them to open an APAR straight against... -
C stored procedure SQL error.
I have a very basic C stored procedure written. It was working fine with some bogus/kludge SQL (just to get a DBRM created). I have now added...



Reply With Quote

