Flashback New Features and Enhancements in Oracle Database 10g
http://www.oracle-base.com/articles/10g/Flashback10g.php[@more@]
windows drop em
DECLARE CURSOR c1 IS SELECT owner, synonym_name name FROM dba_synonyms WHERE table_owner = 'SYSMAN'; BEGIN FOR r1 IN c1 LOOP IF r1.owner = 'PUBLIC' THEN EXECUTE IMMEDIATE 'DROP PUBLIC SYNONYM '||r1.name; ELSE EXECUTE IMMEDIATE 'DROP SYNONYM '||r1.owner||'.'||r1.name; END IF; END LOOP; END; DROP ROLE mgmt_user; drop user mgmt_view cascade; drop user sysman cascade;[@more@]
oracle asm 10g
ASM_POWER_LIMIT specifies the maximum power on an Automatic Storage Management instance for disk rebalancing. The higher the limit, the faster rebalancing will complete. Lower values will take longer, but consume fewer processing and I/O resources.http://www.oracle-base.com/articles/10g/AutomaticStorageManagement10g.php[@more@]
standby database to primary database.
alter database activate standby database[@more@]
http://www.hellodba.com/index.php?class=doc&lang=cn
http://www.hellodba.com/index.php?class=doc&lang=cn[@more@]
Oracle性能调整的十大要点.doc
Normal 0 7.8 pt 0 2 false false false MicrosoftInternetExplorer4 st1:*{behavior:url(#ieooui) } /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.
oracle index monitoring
alter index DB_USER_INDEX monitoring usageSELECT index_name, table_name, monitoring, used, start_monitoring, end_monitoringFROM v$object_usageWHERE index_name = 'DB_USER_INDEX'ORDER BY index_name;alter index DB_USER_INDEX nomonitoring usage[@more@]
Performing a Switchover to a Physical Standby Database and failover
8.2.1 Performing a Switchover to a Physical Standby DatabaseThis section describes how to perform a switchover to a physical standby database.A switchover is initiated on the primary database and is completed on the target standby database.Step 1 Verify that the primary database can be switched to the standby role. Query the SWITCHOVER_STATUS column of the V$DATABASE view on the primary database.For example:SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;SWITCHOVER_STATUS -----------------
oracle dataguard setup
Creating Physical Standby using RMAN Duplicate Without Shutting down The Primary [ID 789370.1] -------------------------------------------------------------------------------- Modified 03-JUL-2010 Type HOWTO Status MODERATED In this Document Goal Solution References--------------------------------------------------------------------------------Platforms: 1-914CU; This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not bee
ROLLUP和CUBE语句。
Oracle的GROUP BY语句除了最基本的语法外,还支持ROLLUP和CUBE语句。如果是ROLLUP(A, B, C)的话,首先会对(A、B、C)进行GROUP BY,然后对(A、B)进行GROUP BY,然后是(A)进行GROUP BY,最后对全表进行GROUP BY操作。如果是GROUP BY CUBE(A, B, C),则首先会对(A、B、C)进行GROUP BY,然后依次是(A、B),(A、C),(A),(B、C),(B),(C),最后对全表进行GROUP BY操作。 grouping_id()可以美化效果: Oracle的GROUP BY语句除了最基本的语法外,还支持ROLLUP和CUBE语句。 除本文内容外,你还可参考:分析函数参考手册: http://xsb.i
plsql插入图片
create or replace directory gp as 'c:gp';insert into pict values('maoyaxi',empty_blob()); declaredest_lob blob;src_lob bfile:=bfilename('GP','maoyaxi.jpg');amount integer:=dbms_lob.getlength(src_lob);beginselect pict into dest_lob from pictwhere pictname='maoyaxi' for update;dbms_lob.fileopen(src_lob);dbms_lob.loadfromfile(dest_lob,src_lob,amount);dbms_lob.fileclose(Src_lob);commit;end;[@more@]
oracle utl_file
create or replace directory gp as 'c:gp';grant read, write on directory gp to maodeclare f utl_file.file_type; begin f := utl_file.fopen('GP', 'something.txt', 'w'); for i in 1..100 loop utl_file.put_line(f, 'line one: some text'); utl_file.put_line(f, 'line two: more text'); end loop; utl_file.fclose(f); end; declare f utl_file.file_type; buf VARCHAR2(200); v_id varchar2(20);BEGIN f := utl_file.fopen('GP', 'test.txt', 'R'); LOOP utl_file.get_line(f, buf);
行列转换
--行列转换 行转列DROP TABLE t_change_lc;CREATE TABLE t_change_lc (card_code VARCHAR2(3), q NUMBER, bal NUMBER);INSERT INTO t_change_lc SELECT '001' card_code, ROWNUM q, trunc(dbms_random.VALUE * 100) bal FROM dual CONNECT BY ROWNUM <= 4UNION SELECT '002' card_code, ROWNUM q, trunc(dbms_random.VALUE * 100) bal FROM dual CONNECT BY ROWNUM <= 4;SELECT * FROM t_change_lc;SELECT a.card_code, SUM(decode(a.q, 1, a.bal, 0)) q1, SUM(decode(a.q, 2, a.bal, 0)) q2, SUM(decode(a.q, 3,
rman不完全恢复
RMAN> run{2> set until time="to_date('20110120 17:31:00','yyyymmdd hh24:mi:ss')";3> restore database;4> recover database;5> }[@more@]
oracle 自治事务
create or replace trigger test_tri before update on test for each row declare PRAGMA AUTONOMOUS_TRANSACTION; begin insert into test values(2,'test2'); commit; end test_tri;[@more@]
Clusterware References
259301.1 CRS and 10g RAC This note contains a useful awk script to improve the output of crs_stat -ls 436067.1 Windows CRS_STAT script to display long names correctly 309541.1 How to start/stop the 10g CRS Clusterware 263897.1 How to stop Cluster Ready Services (CRS) 298073.1 How to remove CRS auto start and restart for a RAC instance 295871.1 How to verify if CRS install is valid 316583.1 VIPCA fails complaining that interface is not public 3412
Oracle EVENT用法参考列表
事件说明例子Event 10013 - Monitor Transaction Recovery在Startup时跟踪事务恢复ALTER SESSION SET EVENTS '10013 trace name context forever, level 1';Event 10015 - Dump Undo Segment Headers-在事务恢复后做Dump回退段头信息ALTER SESSION SET EVENTS '10015 trace name context forever, level 1';Event 10032 - Dump Sort StatisticsDump排序的统计信息ALTER SESSION SET EVENTS '10032 trace name context forever, level 10';Event 10033 - Dump Sort Intermediate Run Statistics排序过程中,内存排序区和临时表空间的交互
Oracle's Parallel
Parallel Features The full list of Oracle parallel execution features currently includes the following Parallel Query Parallel DML Parallel DDL Parallel Data Loading
ORACLE10g修改RAC VIP
ORACLE10g修改RAC VIP C O*rV$vXx01.确认当前VIP !t@iG
oracle 10046
http://www.eygle.com/case/Use.sql_trace.to.Diagnose.database.htm[@more@]