免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1478 | 回复: 0
打印 上一主题 下一主题

[Hive] 在NOARCHIVELOG下,只能备份read only及offline的表空间验证 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-12-19 13:56 |只看该作者 |倒序浏览
<DIV>
<P><FONT color=#0000ff>1、offline表空间备份</FONT></P></DIV>
<DIV><FONT color=#0000ff>SQL&gt; select TABLESPACE_NAME ,status from dba_tablespaces;</FONT></DIV>
<DIV><FONT color=#0000ff>TABLESPACE_NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STATUS<BR>------------------------------ ---------<BR>SYSTEM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ONLINE<BR>SYSAUX&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ONLINE<BR>UNDOTBS1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ONLINE<BR>TEMP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ONLINE<BR>USERS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ONLINE</FONT></DIV>
<DIV><FONT color=#0000ff>ZWTEST&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OFFLINE</FONT></DIV>
<DIV><FONT color=#0000ff>&nbsp;<BR>RMAN&gt; 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>&nbsp;</DIV>
<DIV><FONT color=#0000ff><SPAN style="COLOR: #cc66cc">2</SPAN>、<SPAN style="COLOR: #993333; FONT-WEIGHT: bold">READ</SPAN> only表空间备份<BR>&nbsp;<BR>$ sqlplus <SPAN style="COLOR: #66cc66">/</SPAN> <SPAN style="COLOR: #993333; FONT-WEIGHT: bold">AS</SPAN> sysdba<BR>&nbsp;<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>&nbsp;<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>&nbsp;<BR>SQL<SPAN style="COLOR: #66cc66">&gt;</SPAN> <SPAN style="COLOR: #993333; FONT-WEIGHT: bold">ALTER</SPAN> tablespace TEST online;<BR>&nbsp;<BR>Tablespace altered<SPAN style="COLOR: #66cc66">.</SPAN><BR>&nbsp;<BR>SQL<SPAN style="COLOR: #66cc66">&gt;</SPAN> <SPAN style="COLOR: #993333; FONT-WEIGHT: bold">ALTER</SPAN> tablespace TEST <SPAN style="COLOR: #993333; FONT-WEIGHT: bold">READ</SPAN> only;<BR>&nbsp;<BR>Tablespace altered<SPAN style="COLOR: #66cc66">.</SPAN><BR>&nbsp;<BR>RMAN<SPAN style="COLOR: #66cc66">&gt;</SPAN> backup tablespace <SPAN style="COLOR: #ff0000">"TEST"</SPAN>;<BR>&nbsp;<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>&nbsp;<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>
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP