Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Usage » Working with Database Objects » Working with databases

Specifying a consolidated database Next Page

Displaying system objects in a database

In a database, a table, view, stored procedure, or domain is a system object. System tables store the database's schema, or information about the database itself. System views, procedures, and domains largely support Sybase Transact-SQL compatibility.

All the information about system objects in a database appears in the system tables. The information is distributed among several tables.

To display system objects in a database (Sybase Central)
  1. Open the desired database server.

  2. Select the desired connected database and then choose File > Filter Objects by Owner.

  3. Select SYS and dbo, and then click OK.

    The system tables, system views, and system procedures appear in their respective folders. For example, system tables appear alongside normal tables in the Tables folder.

To browse system objects (SQL)
  1. Connect to a database.

  2. Execute a SELECT statement, querying the SYSOBJECT system view for a list of objects.

  3. Example

    The following SELECT statement queries the SYSOBJECT system view, and returns the list of all objects in the database. A join is made to the SYSTAB system view to return the object name, and SYSUSER system view to return the owner name.

    SELECT b.table_name 'Object Name', c.user_name Owner, b.object_id, 
     a.object_type, a.status
       ON a.object_id = b.object_id ) 
        JOIN SYSUSER c
      ORDER BY table_name;

    For more information on the SYSOBJECT, SYSTAB, and SYSUSER system views, see SYSOBJECT system view, SYSTAB system view, and SYSUSER system view.