Find linked server references in databases on SQL server

Hi,

I need to determine any databases that are using references to an already built linked server object.  

For example I have a SQL server that has 27 databases in it.  Is there a query that I can run that will determine if any stored procedures or functions reference the linked server?  I don't want to try and open each database, then procedures looking for this.

Thanks.
Matthew CioffiSenior DBAAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

unknown_routineCommented:
Use:

sp_linkedservers
sp_tables_ex
0
Matthew CioffiSenior DBAAuthor Commented:
Thanks, interesting, but not quite what I was looking for.

I want some way to find what is using the Linked Server.  If I have a linked server called GETID, is there a way for me to located any references to it across all my databases?
0
SharathData EngineerCommented:
linked servers are to connect to the databases on another server? What exactly you want.
Do you want all the procedures/functions that are referring linked server objects?
or the information on what linked servers you have and which server they are pointing to?
0
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

Matthew CioffiSenior DBAAuthor Commented:
I would like to walk through all the databases and find any references to the linked server. I known what the data is, I need to find what is using it.
0
Matthew CioffiSenior DBAAuthor Commented:
I found SQL Search by RedGate.  it is free and works really well for searching for references to objects.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Matthew CioffiSenior DBAAuthor Commented:
No one had a tool or query method for searching the database.  This is doing exactly what I wanted it to do.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2005

From novice to tech pro — start learning today.