• If I understand you right, yes. My understanding of severity levels on errors isn't what it should be- I don't know if they error you are getting actually fails the batch/sp. Using string executes I would think it wouldn't matter though. Give it a shot unless someone more knowledgable gives a better solution..

    fetch...

    begin

    set @SQLStr = 'declare @x int select @x = id from '+@Server+'.master.dbo.sysocomments'

    execute(@SQLStr)

    if @@Error <> 0

    begin

    -- you got an error trying to access the server. handle your error here.

    end

    else

    begin

    -- do your query here

    end

    fetch

    end

    I stuck the variable assignment in there to prevent a rowset from being returned - probably a better way. sp_ExecuteSQL allows for passing of variables as output parms if you need it.