ORACLE 经常使用的命令工具-第一章:日志管理

上一篇 / 下一篇  2009-01-07 22:23:30 / 个人分类:Oracle

  • 文件版本: V1.0
  • 开发商: 本站原创
  • 文件来源: 本地
  • 界面语言: 简体中文
  • 授权方式: 免费
  • 运行平台: Win9X/Win2000/WinXP

0~3Fr2[gp5~0第一章:日志管理51Testing软件测试网 GNC U[~1k{ A`

51Testing软件测试网hp-c_ KG }3{ r

  1.forcing log switches

}8W6t.F#X X051Testing软件测试网;rm:a4O@3i/Nrw7I

  sql> alter system switch logfile;51Testing软件测试网"{+c"v;gQ@

51Testing软件测试网9V9hV%F8^5^L R

  2.forcing checkpoints

k+dJ4H,iao051Testing软件测试网d \][`

  sql> alter system checkpoint;51Testing软件测试网W!R:q3X FV!yv

51Testing软件测试网|,@v3Ff4N

  3.adding online redo log groups

7C:{@H5S051Testing软件测试网[ RI/~*PPb1Q:XM's(Q

  sql> alter database add logfile [group 4]51Testing软件测试网 TcE6E ^b G

6KH]beK.u x:e"u0  sql> ('/disk3/log4a.rdo','/disk4/log4b.rdo') size 1m;51Testing软件测试网!tL7R8Aum

51Testing软件测试网)omH5y:Mu6g

  4.adding online redo log members

RTs\g0

RQ.m k,g l0  sql> alter database add logfile member

I%_+h+G]nd f051Testing软件测试网 u&eE K|Ax5b

  sql> '/disk3/log1b.rdo' to group 1,51Testing软件测试网/Ul0\2F3\&L

51Testing软件测试网 s'I'rV&R Q3p

  sql> '/disk4/log2b.rdo' to group 2;51Testing软件测试网'R(Y9HKR B

R+_'us x f1Pt0  5.changes the name of the online redo logfile

b#Ibg%\ s:Gf0

_:t0hw~ n-G9y0  sql> alter database rename file 'c:/oracle/oradata/oradb/redo01.log'51Testing软件测试网 ^v*l E0jE%y0p I

&eq#yF*];gGj3]0  sql> to 'c:/oracle/oradata/redo01.log';51Testing软件测试网,Bwe E0E h2m

PAK6g0N@0  6.drop online redo log groups

'lh,]S/Gq@:x7{sk0

[DCO~N0  sql> alter database drop logfile group 3;51Testing软件测试网P|F%q0M'y+g

HpB0H R7i.v0  7.drop online redo log members51Testing软件测试网P/m#k-G2c&s+j O

51Testing软件测试网yN)N3N.K*V

  sql> alter database drop logfile member 'c:/oracle/oradata/redo01.log';51Testing软件测试网-Z j#ZXJ av

51Testing软件测试网'j.}([;Lqy8ot-k/z

  8.clearing online redo log files

pa[Pd tT-C051Testing软件测试网Hfqh,H'f2M4JR

  sql> alter database clear [unarchived] logfile 'c:/oracle/log2a.rdo';51Testing软件测试网%]2K*VSb2ow

51Testing软件测试网 I)aY4G8C;o&g.e!\

  9.using logminer analyzing redo logfiles51Testing软件测试网 hMK F5[a

51Testing软件测试网ht qs/I%GK2v)[

  a. in the init.ora specify utl_file_dir = ' '51Testing软件测试网)FD)[v jd O]%O

51Testing软件测试网ctf7@$[/m$BW W8h

  b. sql> execute dbms_logmnr_d.build('oradb.ora','c:\oracle\oradb\log');51Testing软件测试网M6h,z3_4y!^eC

c R}f7?-S r0  c. sql> execute dbms_logmnr_add_logfile('c:\oracle\oradata\oradb\redo01.log',51Testing软件测试网E'bBd,r"q'U7n

.GhKW d3Vz0  sql> dbms_logmnr.new);51Testing软件测试网 G0W6h6f:K3M9SbgZ-V

51Testing软件测试网Z`3{t5L_^\

  d. sql> execute dbms_logmnr.add_logfile('c:\oracle\oradata\oradb\redo02.log',

#X'N9M"iT8i051Testing软件测试网,]-N%P.w&MG"JX

  sql> dbms_logmnr.addfile);51Testing软件测试网^s,@&l0jO.P!N

51Testing软件测试网3he @uQ:gU2O u'Tk_Q

  e. sql> execute dbms_logmnr.start_logmnr(dictfilename=>'c:\oracle\oradb\log\oradb.ora');51Testing软件测试网]nF9D1BIY2p5t"[

"[ jwO zI3P1n.I0Re [Vn0  f. sql> select * from v$logmnr_contents(v$logmnr_dictionary,v$logmnr_parameters51Testing软件测试网'mW5j;h A^r4Df5}G

51Testing软件测试网"V])THt

  sql> v$logmnr_logs);51Testing软件测试网'mpz}p,q};^8@tX C:E

A [8Y?p@0x8Ud0  g. sql> execute dbms_logmnr.end_logmnr;51Testing软件测试网5O0M`)ot(d

TAG: Oracle

 

评分:0

我来说两句

Open Toolbar