Using ttIsql to List Database Objects by Object Type
You can use ttIsql
to list tables, indexes, views, sequences,
synonyms, PL/SQL functions, procedures and packages in a database.
Commands prefixed by all
display all of this type of object. For
example, the functions
command lists PL/SQL functions that are owned by the
user, whereas allfunctions
lists all PL/SQL functions.
You can optionally specify patterns for object owners and object names.
Use these commands to list database objects:
-
tables
andalltables
- Lists tables. -
indexes
andallindexes
- Lists indexes. -
views
andallviews
- Lists views. -
sequences
andallsequences
- Lists sequences. -
synonyms
andallsynonyms
- Lists synonyms. -
functions
andallfunctions
- Lists PL/SQL functions. -
procedures
andallprocedures
- Lists PL/SQL procedures. -
packages
andallpackages
- Lists PL/SQL packages.
Note:
See ttIsql in the Oracle TimesTen In-Memory Database Reference.
The following example demonstrates the procedures
and allprocedures
commands. User TERRY
creates a procedure called proc1
while connected to myDSN
. Note that a slash character (/) is entered on a new line following the PL/SQL statements.
The procedures
command and the allprocedures
command show that it is the only PL/SQL procedure in the database.
% ttisql database1
Copyright (c) 1996, 2024 Oracle. All rights reserved.
Type ? or "help" for help, type "exit" to quit ttIsql.
connect "DSN=database1";
Connection successful:
DSN=database1;UID=terry;DataStore=/disk1/databases/database1;DatabaseCharacterSet=AL32UTF8;
ConnectionCharacterSet=AL32UTF8;PermSize=128;
(Default setting AutoCommit=1)
Command> create or replace procedure proc1 as begin null; end;
> /
Procedure created.
Command> procedures;
TERRY.PROC1
1 procedure found.
Command> allprocedures;
TERRY.PROC1
1 procedure found.
Now connect to the same DSN as Pat
and create a procedure called q
. The allprocedures
command shows the PL/SQL procedures created by Terry
and Pat
.
% ttisql "DSN=database1;UID=PAT"
Copyright (c) 1996, 2024 Oracle. All rights reserved.
Type ? or "help" for help, type "exit" to quit ttIsql.
connect "DSN=database1;UID=PAT";
Connection successful: DSN=database1;UID=PAT;
DataStore=/disk1/databases/database1;DatabaseCharacterSet=AL32UTF8;
ConnectionCharacterSet=AL32UTF8;PermSize=128;
(Default setting AutoCommit=1)
Command> create or replace procedure q as begin null; end;
> /
Procedure created.
Command> procedures;
PAT.Q
1 procedure found.
Command> allprocedures;
TERRY.PROC1
PAT.Q
2 procedures found.