??????????????????????????????SQL*Plus?????????????????????RMAN????????????л??????Щ???????????RMAN?????????????????????Щ????SQL??????PL/SQL???????????????????Ρ???????????RMAN??????μ??Щ???????????÷???

????1??RMAN??????????SQL???

???????? SQL '<command>' ;

?????????????????????????SQL?????SQL?????????????????????

????command ????????е?SQL?????????????PL/SQL??

???????????

???????????SQL????а???????????????????·??????????????????????????????SQL?????β???????????

???????????????SQL?????????????κν?????

????RMAN??????3????????

????????startup [nomount | mount]?? shutdown immediate
????????alter system archive log current
????????alter database open [resetlogs]

????2?????RMAN??????????SQL???

????a????г????starup?? alter SQL ???

robin@SZDB:~> export ORACLE_SID=GOBO1
robin@SZDB:~> rman target /

Recovery Manager: Release 10.2.0.3.0 - Production on Tue Jun 4 11:04:26 2013

Copyright (c) 1982?? 2005?? Oracle.  All rights reserved.

connected to target database (not started)

RMAN> startup nomount;

Oracle instance started

Total System Global Area     536870912 bytes

Fixed Size                     2074080 bytes
Variable Size                314575392 bytes
Database Buffers             213909504 bytes
Redo Buffers                   6311936 bytes

RMAN> alter database mount;

using target database control file instead of recovery catalog
database mounted

RMAN> alter database open;

database opened

RMAN> list copy of archivelog all;   --->???????????鵵??????г???1????鵵???


List of Archived Log Copies
Key     Thrd Seq     S Low Time          Name
------- ---- ------- - ----------------- ----
2084    1    8       A 20130604 09:53:17 /u02/database/GOBO1/archive/arch_816906485_1_8.arc

RMAN> sql ' alter system archive log current ';   --->??????????й鵵

sql statement:  alter system archive log current

RMAN> list copy of archivelog all;                --->?鵵?????????????1????鵵???

List of Archived Log Copies
Key     Thrd Seq     S Low Time          Name
------- ---- ------- - ----------------- ----
2084    1    8       A 20130604 09:53:17 /u02/database/GOBO1/archive/arch_816906485_1_8.arc
2085    1    9       A 20130604 10:46:36 /u02/database/GOBO1/archive/arch_816906485_1_9.arc