Come estrarre informazioni dagli oggetti oracle cosi come tabelle, viste, indici, packages, procedure, funzione e trigger. Di seguito riporto alcune query per estrarre queste informazioni:

Tabelle - select TABLE_NAME, OWNER from SYS.ALL_TABLES order by OWNER, TABLE_NAME
Viste - select VIEW_NAME, OWNER from SYS.ALL_VIEWS order by OWNER, VIEW_NAME
Packages - select OBJECT_NAME, OWNER from SYS.ALL_OBJECTS where UPPER(OBJECT_TYPE) = 'PACKAGE' order by OWNER, OBJECT_NAME
Procedures - select OBJECT_NAME, OWNER from SYS.ALL_OBJECTS where upper(OBJECT_TYPE) = upper('PROCEDURE') order by OWNER, OBJECT_NAME
Procedure Columns - select OWNER, OBJECT_NAME, ARGUMENT_NAME, DATA_TYPE, IN_OUT from SYS.ALL_ARGUMENTS order by OWNER, OBJECT_NAME, SEQUENCE
Function - select OBJECT_NAME, OWNER from SYS.ALL_OBJECTS where upper(OBJECT_TYPE) = upper('FUNCTION') order by OWNER, OBJECT_NAME
Triggers - select TRIGGER_NAME, OWNER from SYS.ALL_TRIGGERS order by OWNER, TRIGGER_NAME
Indexes - select INDEX_NAME, TABLE_NAME, TABLE_OWNER from SYS.ALL_INDEXES order by TABLE_OWNER, TABLE_NAME, INDEX_NAME
Categories: Database

Comments are closed.