EXP-00091: Exporting questionable statistics
oracle@/oracle/1110]$sqlplus "/as sysdba"SQL> select userenv('language') from dual;USERENV('LANGUAGE')----------------------------------------------------AMERICAN_AMERICA.ZHS16GBKSQL> exitDisconnected...
How to re-install JVM
SQL> select comp_name, version, status from dba_registry; COMP_NAME VERSION &nbs...
How to do oracle database character set migration
--install character set migration utility schemaSQL> @?/rdbms/admin/csminst.sql --backup and restart databaseSQL> alter system set cluster_database=false scope=spfile; --RAC only...
Get the below error after duplicating database
ORA-01187: cannot read from file 121 because it failed verification tests ORA-01110: data file 121: '/pfrx11/db02/pfarex11_temp_01.dbf' --ORA-01187: cannot read from file 124 because it failed veri...
How to do the batch job (disable/enable constraint)
BEGIN FOR c IN (SELECT c.owner, c.table_name, c.constraint_name FROM user_constraints c, user_tables t WHERE c.table_name = t.table_name AND c.sta...
ORA-01940: cannot drop a user that is currently connected
select s.sid, s.serial#, s.status, p.spid from v$session s, v$process pwhere s.username = '<your user>' and p.addr (+) = s.paddr/select job from dba_jobs where log_user='<your user>';select ...
How to get the TOP SQL
Top 10 by Buffer Gets:set linesize 100set pagesize 100SELECT * FROM(SELECT substr(sql_text,1,40) sql,buffer_gets, executions, buffer_gets/executions "Gets/Exec",hash_value,addressFROM V$SQLAREAWHERE ...
Change the max extents of table
SQL> alter table <table_name> storage (maxextents 500);SQL> alter table <table_name> storage (maxextents unlimited);
Fix undo tablespace issue Errors
Fix undo tablespace issue Errors in file /oracle/admin/test/bdump/test2_smon_21466.trc:ORA-00600: internal error code, arguments: [6006], [1], [], [], [], [], [], []SMON: mark undo segment 13 as needs...
Identify tablespace fragmentation
column FSFI format 999,99select tablespace_name,sqrt(max(blocks)/sum(blocks))*(100/sqrt(sqrt(count(blocks)))) FSFI from dba_free_space group by tablespace_name order by 1; *FSFI 100 is ideal ...
ORA-00018: maximum number of sessions exceeded
LIBRARY CACHE LOCKS DUE TO INVALID LOGIN ATTEMPTS (Doc ID 1309738.1)Bug 12990384: HIGH LIBRARY CACHE LOCK IN 11.2.0.2.0There was new SLEEP () code introduced which will get activated after Failed Log...
How to shrink log files in MS SQL Server
在full模式下,如果不定时备份并截断log文件,会导致log文件过大,从而把磁盘撑爆,可以依照以下步骤shrink log文件:1. 用sqlperf查看log大小及使用率:dbcc sqlperf(logspace)Database Name Log...
Identify index fragmentation
analyze index index_name validate structure; select name, trunc(100*(del_lf_rows/lf_rows)) pct_deleted, pct_used from index_stats; An index should be considered for rebuilding under any...
Shrink the temp tablespace
create temporary tablespace TEMP2 TEMPFILE '/mnt/MX_ORA_6/oradata/PROD/temp2.dbf' SIZE 512M REUSE AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED; alter database default temporary tablespace temp2;...