We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
Problem with that is - if either SQLPROD2 or SQLDR2 is offline - the SP fails, because referential integrity is validated at "prepare", and an inaccessible server throws an error, even though it would not be actually referenced at all at execution.
IF @@SERVERNAME = 'SQLPROD1' EXEC SQLPROD2.MyDB.dbo.mySP ELSE EXEC SQLDR2.MyDB.dbo.mySP
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|getting error while running below query in sql||2||16|
|SQL Convert "vertical" data to "horizontal" data||4||28|
|SQL Server code help needed||14||33|
|TSQL: return only records which have only one type of value.||1||14|