Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

refining sp_linkedservers

Posted on 2004-09-06
2
Medium Priority
?
1,435 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 1000 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

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

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

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how the fundamental information of how to create a table.
Suggested Courses

810 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