- 论坛徽章:
- 0
|
<DIV>
<P><FONT color=#0000ff>1、offline表空间备份</FONT></P></DIV>
<DIV><FONT color=#0000ff>SQL> select TABLESPACE_NAME ,status from dba_tablespaces;</FONT></DIV>
<DIV><FONT color=#0000ff>TABLESPACE_NAME STATUS<BR>------------------------------ ---------<BR>SYSTEM ONLINE<BR>SYSAUX ONLINE<BR>UNDOTBS1 ONLINE<BR>TEMP ONLINE<BR>USERS ONLINE</FONT></DIV>
<DIV><FONT color=#0000ff>ZWTEST OFFLINE</FONT></DIV>
<DIV><FONT color=#0000ff> <BR>RMAN> backup tablespace "ZWTEST";</FONT></DIV>
<DIV><FONT color=#0000ff>Starting backup at 26-JAN-11<BR>using channel ORA_DISK_1<BR>channel ORA_DISK_1: starting full datafile backup set<BR>channel ORA_DISK_1: specifying datafile(s) in backup set<BR>input datafile file number=00020 name=/u01/app/oracle/oradata/orcl/zwtest.dbf<BR>channel ORA_DISK_1: starting piece 1 at 26-JAN-11<BR>channel ORA_DISK_1: finished piece 1 at 26-JAN-11<BR>piece handle=/u01/app/oracle/flash_recovery_area/ORCL/backupset/2011_01_26/o1_mf_nnndf_TAG20110126T162841_6mzpst5z_.bkp tag=TAG20110126T162841 comment=NONE<BR>channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01<BR>Finished backup at 26-JAN-11</FONT></DIV>
<DIV><FONT color=#0000ff></FONT> </DIV>
<DIV><FONT color=#0000ff><SPAN style="COLOR: #cc66cc">2</SPAN>、<SPAN style="COLOR: #993333; FONT-WEIGHT: bold">READ</SPAN> only表空间备份<BR> <BR>$ sqlplus <SPAN style="COLOR: #66cc66">/</SPAN> <SPAN style="COLOR: #993333; FONT-WEIGHT: bold">AS</SPAN> sysdba<BR> <BR>SQL<SPAN style="COLOR: #66cc66">*</SPAN>Plus: Release 10<SPAN style="COLOR: #66cc66">.</SPAN>2<SPAN style="COLOR: #66cc66">.</SPAN>0<SPAN style="COLOR: #66cc66">.</SPAN>2<SPAN style="COLOR: #66cc66">.</SPAN>0 <SPAN style="COLOR: #66cc66">-</SPAN> Production <SPAN style="COLOR: #993333; FONT-WEIGHT: bold">ON</SPAN> Sat Nov <SPAN style="COLOR: #cc66cc">10</SPAN> <SPAN style="COLOR: #cc66cc">10</SPAN>:<SPAN style="COLOR: #cc66cc">38</SPAN>:<SPAN style="COLOR: #cc66cc">35</SPAN> <SPAN style="COLOR: #cc66cc">2007</SPAN><BR> <BR>Copyright <SPAN style="COLOR: #66cc66">(</SPAN>c<SPAN style="COLOR: #66cc66">)</SPAN> <SPAN style="COLOR: #cc66cc">1982</SPAN><SPAN style="COLOR: #66cc66">,</SPAN> <SPAN style="COLOR: #cc66cc">2005</SPAN><SPAN style="COLOR: #66cc66">,</SPAN> Oracle<SPAN style="COLOR: #66cc66">.</SPAN> <SPAN style="COLOR: #993333; FONT-WEIGHT: bold">ALL</SPAN> Rights Reserved<SPAN style="COLOR: #66cc66">.</SPAN><BR>Connected <SPAN style="COLOR: #993333; FONT-WEIGHT: bold">TO</SPAN>:<BR>Oracle <SPAN style="COLOR: #993333; FONT-WEIGHT: bold">DATABASE</SPAN> 10g Enterprise Edition Release 10<SPAN style="COLOR: #66cc66">.</SPAN>2<SPAN style="COLOR: #66cc66">.</SPAN>0<SPAN style="COLOR: #66cc66">.</SPAN>2<SPAN style="COLOR: #66cc66">.</SPAN>0 <SPAN style="COLOR: #66cc66">-</SPAN> Production<BR><SPAN style="COLOR: #993333; FONT-WEIGHT: bold">WITH</SPAN> the Partitioning<SPAN style="COLOR: #66cc66">,</SPAN> OLAP <SPAN style="COLOR: #993333; FONT-WEIGHT: bold">AND</SPAN> <SPAN style="COLOR: #993333; FONT-WEIGHT: bold">DATA</SPAN> Mining options<BR> <BR>SQL<SPAN style="COLOR: #66cc66">></SPAN> <SPAN style="COLOR: #993333; FONT-WEIGHT: bold">ALTER</SPAN> tablespace TEST online;<BR> <BR>Tablespace altered<SPAN style="COLOR: #66cc66">.</SPAN><BR> <BR>SQL<SPAN style="COLOR: #66cc66">></SPAN> <SPAN style="COLOR: #993333; FONT-WEIGHT: bold">ALTER</SPAN> tablespace TEST <SPAN style="COLOR: #993333; FONT-WEIGHT: bold">READ</SPAN> only;<BR> <BR>Tablespace altered<SPAN style="COLOR: #66cc66">.</SPAN><BR> <BR>RMAN<SPAN style="COLOR: #66cc66">></SPAN> backup tablespace <SPAN style="COLOR: #ff0000">"TEST"</SPAN>;<BR> <BR>Starting backup at <SPAN style="COLOR: #cc66cc">2007</SPAN><SPAN style="COLOR: #66cc66">-</SPAN><SPAN style="COLOR: #cc66cc">11</SPAN><SPAN style="COLOR: #66cc66">-</SPAN><SPAN style="COLOR: #cc66cc">10</SPAN> <SPAN style="COLOR: #cc66cc">10</SPAN>:<SPAN style="COLOR: #cc66cc">39</SPAN>:<SPAN style="COLOR: #cc66cc">35</SPAN><BR><SPAN style="COLOR: #993333; FONT-WEIGHT: bold">USING</SPAN> target <SPAN style="COLOR: #993333; FONT-WEIGHT: bold">DATABASE</SPAN> control file instead of recovery catalog<BR>allocated channel: ORA_DISK_1<BR>channel ORA_DISK_1: sid<SPAN style="COLOR: #66cc66">=</SPAN><SPAN style="COLOR: #cc66cc">140</SPAN> devtype<SPAN style="COLOR: #66cc66">=</SPAN>DISK<BR>channel ORA_DISK_1: starting <SPAN style="COLOR: #993333; FONT-WEIGHT: bold">FULL</SPAN> datafile backupset<BR>channel ORA_DISK_1: specifying datafile<SPAN style="COLOR: #66cc66">(</SPAN>s<SPAN style="COLOR: #66cc66">)</SPAN> <SPAN style="COLOR: #993333; FONT-WEIGHT: bold">IN</SPAN> backupset<BR>input datafile fno<SPAN style="COLOR: #66cc66">=</SPAN>00005 name<SPAN style="COLOR: #66cc66">=/</SPAN>export<SPAN style="COLOR: #66cc66">/</SPAN>home<SPAN style="COLOR: #66cc66">/</SPAN>oracle<SPAN style="COLOR: #66cc66">/</SPAN>product<SPAN style="COLOR: #66cc66">/</SPAN><SPAN style="COLOR: #cc66cc">10.0</SPAN><SPAN style="COLOR: #66cc66">/</SPAN>oradata<SPAN style="COLOR: #66cc66">/</SPAN>tina<SPAN style="COLOR: #66cc66">/</SPAN>test<SPAN style="COLOR: #66cc66">.</SPAN>dbf<BR>channel ORA_DISK_1: starting piece <SPAN style="COLOR: #cc66cc">1</SPAN> at <SPAN style="COLOR: #cc66cc">2007</SPAN><SPAN style="COLOR: #66cc66">-</SPAN><SPAN style="COLOR: #cc66cc">11</SPAN><SPAN style="COLOR: #66cc66">-</SPAN><SPAN style="COLOR: #cc66cc">10</SPAN> <SPAN style="COLOR: #cc66cc">10</SPAN>:<SPAN style="COLOR: #cc66cc">39</SPAN>:<SPAN style="COLOR: #cc66cc">36</SPAN><BR>channel ORA_DISK_1: finished piece <SPAN style="COLOR: #cc66cc">1</SPAN> at <SPAN style="COLOR: #cc66cc">2007</SPAN><SPAN style="COLOR: #66cc66">-</SPAN><SPAN style="COLOR: #cc66cc">11</SPAN><SPAN style="COLOR: #66cc66">-</SPAN><SPAN style="COLOR: #cc66cc">10</SPAN> <SPAN style="COLOR: #cc66cc">10</SPAN>:<SPAN style="COLOR: #cc66cc">39</SPAN>:<SPAN style="COLOR: #cc66cc">37</SPAN><BR>piece handle<SPAN style="COLOR: #66cc66">=/</SPAN>export<SPAN style="COLOR: #66cc66">/</SPAN>home<SPAN style="COLOR: #66cc66">/</SPAN>oracle<SPAN style="COLOR: #66cc66">/</SPAN>product<SPAN style="COLOR: #66cc66">/</SPAN><SPAN style="COLOR: #cc66cc">10.0</SPAN><SPAN style="COLOR: #66cc66">/</SPAN>flash_recovery_area<SPAN style="COLOR: #66cc66">/</SPAN>TINA<SPAN style="COLOR: #66cc66">/</SPAN>backupset<SPAN style="COLOR: #66cc66">/</SPAN><SPAN style="COLOR: #cc66cc">2007</SPAN>_<BR> <BR><SPAN style="COLOR: #cc66cc">11</SPAN>_10<SPAN style="COLOR: #66cc66">/</SPAN>o1_mf_nnndf_TAG20071110T103936_3mb6h8nq_<SPAN style="COLOR: #66cc66">.</SPAN>bkp tag<SPAN style="COLOR: #66cc66">=</SPAN>TAG20071110T103936 comment<SPAN style="COLOR: #66cc66">=</SPAN>NONE<BR>channel ORA_DISK_1: backup <SPAN style="COLOR: #993333; FONT-WEIGHT: bold">SET</SPAN> complete<SPAN style="COLOR: #66cc66">,</SPAN> elapsed time: 00:00:01<BR>Finished backup at <SPAN style="COLOR: #cc66cc">2007</SPAN><SPAN style="COLOR: #66cc66">-</SPAN><SPAN style="COLOR: #cc66cc">11</SPAN><SPAN style="COLOR: #66cc66">-</SPAN><SPAN style="COLOR: #cc66cc">10</SPAN> <SPAN style="COLOR: #cc66cc">10</SPAN>:<SPAN style="COLOR: #cc66cc">39</SPAN>:<SPAN style="COLOR: #cc66cc">37</SPAN><BR></FONT></DIV> |
|