Solved

refining sp_linkedservers

Posted on 2004-09-06
2
1,364 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
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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

911 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now