AS SALAMO ALAIKUM WA RAHMATULLAH
Here under is code to check database link is up or not.
BEGIN TRY
exec sp_testlinkedserver DB_TV
IF @@ERROR<> 53 BEGIN
EXEC Prints_WithLink @ReceiptNo,@Type
print 'database is not up'
END
END TRY
BEGIN CATCH
print 'database is up'
EXEC Prints_WithoutLink @ReceiptNo,@Type
END CATCH
--
Ma Asalaam
Passion 4 Oracle
Here under is code to check database link is up or not.
BEGIN TRY
exec sp_testlinkedserver DB_TV
IF @@ERROR<> 53 BEGIN
EXEC Prints_WithLink @ReceiptNo,@Type
print 'database is not up'
END
END TRY
BEGIN CATCH
print 'database is up'
EXEC Prints_WithoutLink @ReceiptNo,@Type
END CATCH
--
Ma Asalaam
Passion 4 Oracle
No comments:
Post a Comment