2

I have an application which has logged an error like

Object <obj id> generated an exception.

The application store all its information in a SQL Server database which contains 100+ tables.

For sure somewhere there must be a table which contains all the objects of this type and I'm sure obj id is the key column there.

How can I find this object? Do I have to create 100+ SELECT queries to query each table or maybe there is a more convenient solution?

5

If I had to guess it's the object id for sys.objects. So

SELECT * FROM sys.objects WHERE object_id = <obj_id>

Specifically look at the name column (object name) and the type column (type of the object, for example U for user table, P for stored procedure etc).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.