Find linked server references in databases on SQL server


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.

Who is Participating?
mcioffi209Connect With a Mentor Author Commented:
I found SQL Search by RedGate.  it is free and works really well for searching for references to objects.

mcioffi209Author 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?
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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?
mcioffi209Author 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.
mcioffi209Author Commented:
No one had a tool or query method for searching the database.  This is doing exactly what I wanted it to do.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.