C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !






How to check whether another SQL DB server is linked or not


Posted Date: 26 Aug 2008    Resource Type: Code Snippets    Category: SQL

Posted By: Ritesh N. Jain       Member Level: Gold
Rating:     Points: 5



Below query will check if another SQL DB server is linked to current SQL DB server

--Below code is for all the user using SQL server 2000
--Assuming you want to check for "DestinationDB" server
-- In case Server is linked you will get 'Exist' as output else there will be no output

Select 'Exist' Where Exists (Select [srvid] From sysservers Where srvName='DestinationDB')

--Below code is for all the user using SQL server 2005

Select 'Exist' Where Exists (Select server_id From sys.servers Where [Name]='DestinationDB')


The above code can be used before calling sp_addlinkedserver.




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
SQL Server 2005  .  SQL Server 2000  .  Link  .  Database Connection  .  Check SQL server is Linked  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: XQuery with XML data in Sql Server 2005
Previous Resource: How to Enable CLR integration in SQL Server 2005
Return to Discussion Resource Index
Post New Resource
Category: SQL


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

internet fax

Contact Us    Privacy Policy    Terms Of Use