FILE 1 *.bat
set ORACLE_HOME=D:\oracle\product\10.2.0\db_1\BIN\
set PATH=D:\oracle\product\10.2.0\db_1\BIN\
set ORACLE_SID=STDBY
sqlplus USER/PASS @D:\scripts\Analyze.sql
exit;
FILE 2 *.sql
set linesize 180
set pagesize 5000
alter session set nls_date_format='DD/MM/YYYY HH24:MI:SS';
spool D:\scripts\analyze.log
select sysdate from dual;
--select owner,SEGMENT_NAME from dba_segments where SEGMENT_NAME='TB_NAME';
--select owner, object_name, object_type from ALL_OBJECTS where object_name ='TB_NAME';
exec dbms_stats.gather_schema_stats(ownname=>'OWNER',tabname=>'TB_NAME',cascade=>true,options=>'GATHER');
exec dbms_stats.gather_table_stats(ownname=>'OWNER',tabname=>'TB_NAME',cascade=>true);
spool off
exit;
0 comentários:
Post a Comment