SQL Server sys.objects not showing Schemas
Posted on 2012-03-22
I was always under the impression that "select * from sys.objects" should return every object in the database, but I am finding it is only returning objects under the main dbo schema. There are three other schemas in the database, which show up when you query sys.schemas, but they are just missing from the main objects list. I have tried various INFORMATION_SCHEMA items (tables, procedures, views etc) too, but the same thing is happening.
I am logged in as a user with full access to all the schemas (has equivalent sa rights), so I don't think it's permissions.
What am I missing? Presumably there must be a way to return every single object in the database, regardless of the schema? (this is for a report, so I need to include everything).