Search - Articles
DevASP.NET for ASP.NET, VB.NET, XML and C# (C-Sharp) Developers Tuesday, March 03, 2009
Dev Articles
Search Directory
ASP.NET
VB.Net
C-Sharp
SQL Server
 

Get all objects in a database using PL-SQL in SQL server 2008.

Author: Zunnair

In this simple article you will learn that how you can get all objects in a database using PL-SQL in SQL.

In sql server 2008 we can retrieve all objects in a database with a very simple query

 

Query:

 

select

name as 'Name',

object_id as 'Object ID',

principal_id as 'Principal ID',

schema_id as 'Schema ID',

parent_object_id as 'Object ID',

type as 'Type',

type_desc as 'Type Description',

create_date as 'Create date',

modify_date as 'Modify date',

is_ms_shipped as 'Shipped',

is_published as 'Published'

from sys.objects


 Results:

 

sysrowsetcolumns      4              NULL        4              0              S              SYSTEM_TABLE        1              0

sysallocunits              7              NULL        4              0              S              SYSTEM_TABLE        1              0

syshobtcolumns         13             NULL        4              0              S              SYSTEM_TABLE        1              0

Area          2089058478               NULL        1              0              U              USER_TABLE            0              0

Settings     2105058535               NULL        1              0              U              USER_TABLE            0              0

Roles        2121058592               NULL        1              0              U              USER_TABLE            0              0

Customers 2137058649               NULL        1              0              U              USER_TABLE            0              0

 

Using this functionality we can easily get all objects created by any user in any database.

   
Add Article Comment:
Name :
Email Address :
   
Comments :
 
   
<< Get table create and last modify date time using PL-SQL in SQL server 2008.

Disclaimer - Privacy
© 2002-2017 DevASP.net