Solved

refining sp_linkedservers

Posted on 2004-09-06
2
1,396 Views
Last Modified: 2008-01-09
Hi.

sp_linkedservers returns a resultset. How can I use this data in a sql query if I cannot refer to it ?
I wanted to check if my server is in this resultset list and then take some action.

Gregor


0
Comment
Question by:gregajesih
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Author Comment

by:gregajesih
ID: 11989509
Found by serching.. thanks for reading my question..sorry for bothering..
0
 
LVL 10

Accepted Solution

by:
AustinSeven earned 250 total points
ID: 11989530
insert the output into a temp table.   However, you'll need to create the temp table with the required columns so you'll need to examin the QA output:-

create table #linkedsrv (
SRV_NAME varchar(100),
SRV_PROVIDERNAME varchar(100),
SRV_PRODUCT varchar(100),
SRV_DATASOURCE varchar(100),
SRV_PROVIDERSTRING varchar(100),
SRV_LOCATION varchar(100),
SRV_CAT varchar(100) )

insert into #linkedsrv
exec sp_linkedservers

select * from #linkedsrv

drop table #linkedsrv


AustinSeven
0

Featured Post

Backup Solution for AWS

Read about how CloudBerry Backup fully integrates your backups with Amazon S3 and Amazon Glacier to provide military-grade encryption and dramatically cut storage costs on any platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
T-SQL to copy a database 37 66
sql query 5 43
SQL- GROUP BY 4 22
Need age at date of document 5 16
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question