Link to home
Start Free TrialLog in
Avatar of brianwells05
brianwells05

asked on

Querying sys.objects

Is there a way to query another databases sys.objects collection without creating a linked server? For example, I need to check whether a table exists in another database before doing something. Normally I would query sys.objects to get this but I don't want to create a linked server for this case to get it. Any ideas?
ASKER CERTIFIED SOLUTION
Avatar of dan_neal
dan_neal
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of brianwells05
brianwells05

ASKER

I was looking for something simple like this: "select * from [Database].sys.tables"
I should have mentioned that I was looking on the same server...but that's a very useful technique for remote servers....thanks for the input.