OracleÖÐÁÙʱ±í²úÉú¹ýÁ¿RedoµÄ˵Ã÷
OracleÖÐÁÙʱ±í²úÉú¹ýÁ¿RedoµÄ˵Ã÷
×î½ü,ÔÚOracle9iÖÐÄãÓùýÁÙʱ±íÂð?
ËüÊÇ·ñ¸øÄã´øÀ´ÁËÐÔÄÜÌá¸ß?Äã×¢Òâ¹ýô?
--------------------------------------------------------------------------------
ºÃÁËÑÔ¹éÕý´«.
ÎÒÃÇÖªµÀÁÙʱ±íÔÚDML²Ù×÷ÖпÉÒÔ¼õÉÙredoµÄÉú³É,´Ó¶øÔÚ±£´æÖмä½á¹û¼¯Ê±¿ÉÒÔ´øÀ´½Ï´óµÄÐÔÄÜÌá¸ß.
¿ÉÊÇ,Èç¹ûÄã×¢Òâµ½ÁË,ÔÚOracle9iÀï,ÁÙʱ±í¿ÉÄܱȳ£¹æ±í»¹Òª²úÉú¸ü¶àµÄredo:
[oracle@jumper oracle]$ sqlplus eygle/eygle
SQL*Plus: Release 9.2.0.3.0 - Production on Sat Jul 3 16:37:01 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.3.0 - Production ----Çë×¢Òâ°æ±¾
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.3.0 - Production
SQL> create table ccc1 (c1 number);
Table created.
SQL> set autotrace trace stat
SQL> insert into ccc1 select rownum from dba_objects;
10468 rows created.
Statistics
----------------------------------------------------------
73 recursive calls
175 db block gets
25623 consistent gets
36 physical reads
157336 redo size --------------------³£¹æ±í²úÉúµÄredo,´óÔ¼154K
622 bytes sent via SQL*Net to client
547 bytes received via SQL*Net from client
3 SQL*Net roundtrips to/from client
2 sorts (memory)
0 sorts (disk)
10468 rows processed
SQL> create global temporary table ccc2 (c1 number) ;
Table created.
SQL> set autotrace trace stat
SQL> insert into ccc2
Ïà¹ØÎĵµ£º
1.µ¼ÈëÊý¾ÝÃüÁimp userid=fkprod/fkprod full=y file=xxx.dmp
2.µ¼³öÊý¾Ý¿â¶ÔÏóÃüÁ
ʹÓÃtools--->export user objectÖ»Äܵ¼³öÊý¾Ý±í½Å±¾²»ÄÜ´ø³öÊý¾Ý,
»òÕßʹÓÃexp user/pwd file=/dir/xxx.dmp log=xxx.log full=y commit=y ignore=y
×¢Ò⣺Èç¹ûÄãÒªÔ¶³ÌµÇ¼µ½Êý¾Ý¿â·þÎñÆ÷µ¼³ö£¬¿ÉÒÔÔÚ±¾µØSQLPLUS×öÈçÏÂÃüÁ ......
ÒÔdbaµÇ½
1.²é¿´Äĸö±í±»Ëø:
select b.owner,b.object_name,l.session_id,l.locked_mode
from v$locked_object l, dba_objects b
where b.object_id=l.object_id;
2.²é¿´±»Ëø±íµÄsid ºÍserial# :
select t2.username,t2.sid,t2.serial#,t2.logon_time
from v$locked_object t1 ......
oracle¿Í»§¶Ë Á¬½ÓPL/SQL
ÏÂÔØ¿Í»§¶Ëµ½Ä³¸ö·¾¶
ÐÞ¸ÄÅäÖÃÎļþ
D:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\tnsnames.ora
# tnsnames.ora Network Configuration File: D:\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
SQLCLUB =
(DESCRIPTION ......
1£© Ñ¡Ôñ×îÓÐЧÂʵıíÃû˳Ðò(Ö»ÔÚ»ùÓÚ¹æÔòµÄÓÅ»¯Æ÷ÖÐÓÐЧ)£º
ORACLEµÄ½âÎöÆ÷°´ÕÕ´ÓÓÒµ½×óµÄ˳Ðò´¦Àífrom×Ó¾äÖеıíÃû£¬from×Ó¾äÖÐдÔÚ×îºóµÄ±í(»ù´¡±í driving table)½«±»×îÏÈ´¦Àí£¬ÔÚfrom×Ó¾äÖаüº¬¶à¸ö±íµÄÇé¿öÏÂ,Äã±ØÐëÑ¡Ôñ¼Ç¼ÌõÊý×îÉٵıí×÷Ϊ»ù´¡±í¡£Èç¹ûÓÐ3¸öÒÔÉϵıíÁ¬½Ó²éѯ, ÄǾÍÐèҪѡÔñ½»²æ±í(intersection ......
½ñÌìͬÊÂraiseÒ»¸öСÎÊÌ⣬ÔõôÔÚALL_VIEWSÊý¾Ý×Öµätext×ֶβéÕÒlrf×Ö·û´®£º
etl@DWTEST> select owner,view_name from all_views where instr(text,'lrf') > 0;
select owner,view_name from all_views where instr(text,'lrf') > 0
  ......