set lines 300
set pages 30000
set ver off

SET FEEDBACK   OFF
DEFINE schema = ''
COLUMN schema_val NOPRINT NEW_VALUE schema
SELECT '&&1' schema_val FROM dual;

DEFINE objtype = ''
COLUMN objtype_val NOPRINT NEW_VALUE objtype
SELECT '&&2' objtype_val FROM dual;

@header_dbinfo 107 DC

begin
dbms_output.put_line('----------------------------------------------------------------------');
dbms_output.put_line('A-ALL');
dbms_output.put_line('T-%TABLE%');
dbms_output.put_line('I-%INDEX%');
dbms_output.put_line('PK-%PACKAGE%');
dbms_output.put_line('P-%PROC%');
dbms_output.put_line('F-%FUNCTION%');
dbms_output.put_line('S-%SYNONYM%');
dbms_output.put_line('V-%VIEW%');
dbms_output.put_line('----------------------------------------------------------------------');
end;
/

column object_type format a30
column object_name format a30
column owner format a30
column FCREACION format a20
column FLAST_DDL format a20
column status format a7

alter session set nls_date_format='ddmmyyyy hh24:mi:ss';

select owner,object_name,object_type,status,to_char(CREATED,'ddmmyyyy hh24:mi:ss') FCREACION,to_char(LAST_DDL_TIME,'ddmmyyyy hh24:mi:ss') FLAST_DDL
from dba_objects
where owner like upper('&schema')
and object_type like decode(upper('&objtype'), 'T', '%TABLE%', 'I', '%INDEX%', 'PK', '%PACKAGE%', 'P', '%PROC%', 'F', '%FUNCTION%', 'S', '%SYNONYM%', 'V', '%VIEW%', '%')
order by owner,object_type,object_name;

SET FEEDBACK   ON

undefine &&1
undefine &&2
undefine schema
undefine objtype
