Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL-DMO doesn't return Server available
Message
 
À
20/01/2009 14:37:34
Peter Wagner
Point Informática Ltda.
Limeira, Brésil
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2000
Application:
Desktop
Divers
Thread ID:
01375255
Message ID:
01375605
Vues:
29
This message has been marked as the solution to the initial question of the thread.
>Naomi,
>what I need is to know if a specific SQL Server is linked to another SQL Server, if not link whit sp_addlinkedserver...
>not to start-stop the SQL Server.
>For some stupid reasons they want to unconnect a linked server conection from a Web server and when some SQL stranasctions occurs re-establish the conection to send some info to the local network server, a after thar disconect the linked server again.
--- Just run SELECT * FROM sysservers first
--- to decide what you could use to identify your linked server

IF NOT EXISTS(SELECT 1 FROM sysservers WHERE SomethingThatIdentifyYourLinkedServer)
   BEGIN
      --- add linked server here 
   END 

-- Rest of the query.
(That is tested on 2005, you should check it on 2000)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform