nohup sqlplus prod1/prod1 @index.sql > index.out 2>&1 &
nohup /export/home/oracle/restore.sh > /export/home/oracle/restore_`date '+%Y%m%d_%H%M%S'`.log 2>&1 &
nohup /export/home/oracle/restore.sh > /export/home/oracle/restore_`date '+%Y%m%d_%H%M%S'`.log 2>&1 &
https://anuj-singh.blogspot.com/search?q=catcon.pl
====
$ORACLE_HOME/perl/bin/perl $ORACLE_HOME/rdbms/admin/catcon.pl -n 1 -e -C 'PDB$SEED' -b ss ss.sql &
jobs -l
[1]+ 1855587 Running $ORACLE_HOME/perl/bin/perl $ORACLE_HOME/rdbms/admin/catcon.pl -n 1 -e -C 'PDB$SEED' -b ss ss.sql &
===
cat ss.sql
SET VERIFY OFF time on timing on
alter session set nls_date_format='dd-mm-yyyy hh24:mi';
select sysdate from dual;
prompt ========================================
prompt DBMS_STATS.GATHER_FIXED_OBJECTS_STATS ()
prompt ========================================
EXEC DBMS_STATS.GATHER_FIXED_OBJECTS_STATS ();
prompt ========================================
prompt DBMS_STATS.GATHER_SCHEMA_STATS('SYSTEM')
prompt ========================================
EXEC DBMS_STATS.GATHER_SCHEMA_STATS('SYSTEM');
prompt ========================================
prompt DBMS_STATS.GATHER_SCHEMA_STATS('SYS')
prompt ========================================
EXEC DBMS_STATS.GATHER_SCHEMA_STATS('SYS');
prompt ========================================
prompt DBMS_STATS.GATHER_DICTIONARY_STATS
prompt ========================================
EXEC DBMS_STATS.GATHER_DICTIONARY_STATS ();
select sysdate from dual;
--spool off
===
3 comments:
nohup sqlplus '/ as sysdba' @/export/home/oracle/test.sql > /export/home/oracle/test.log 2>&1 &
spool date.sp
set time on timing on
alter session set nls_date_format='dd-mm-yyyy hh24:mi';
select sysdate from dual;
select count(*) from dba_objects; ----<<< your sql statement
select sysdate from dual;
spool off
exit
nohup sqlplus '/ as sysdba' @date.sql > date.txt 2>&1
Post a Comment