how to retrieve all database objects with the help of query?
i had problem to retrieveing all database objects from sql server2008 so plz help me to how to write query to retrieve it??
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh TrivediPosted Jan 22, 2013, 3:24 AM
I agree with Santhosh, you can get all object info from sys.objects table but it hasn't any information about index object. you may find it from sys.indexes table.
select * from sys.objects
select * from sys.indexes
select name,object_id,type,type_desc from sys.objects
union
select name,object_id,cast(type as varchar),type_desc from sys.indexes
hope this will help you.
Santhosh Kumar JayaramanPosted Jan 22, 2013, 1:27 AM
select * from sys.objects
you can find types of object in the below list
Type Type description