rem script:hotbak.sql
rem date:11.09.2008
rem desc:backup all database datafile in archive--connect database
--connect internal/password;
connect / as sysdba;--archive
alter system archive log current;
--startalter tablespace system begin backup;
host xcopy F:\oracle\oradata\oradb\system01.dbf f:\bak2/H/R;
alter tablespace system end backup;alter tablespace cwmlite begin backup;
host xcopy F:\oracle\oradata\oradb\cwmlite01.dbf f:\bak2/H/R;
alter tablespace cwmlite end backup;alter tablespace users begin backup;
host xcopy F:\oracle\oradata\oradb\users01.dbf f:\bak2/H/R;
alter tablespace users end backup;alter tablespace tools begin backup;
host xcopy F:\oracle\oradata\oradb\tools01.dbf f:\bak2/H/R;
alter tablespace tools end backup;alter tablespace indx begin backup;
host xcopy F:\oracle\oradata\oradb\indx01.dbf f:\bak2/H/R;
alter tablespace indx end backup;alter tablespace example begin backup;
host xcopy F:\oracle\oradata\oradb\example01.dbf f:\bak2/H/R;
alter tablespace example end backup;alter tablespace ts_test begin backup;
host xcopy F:\oracle\oradata\oradb\test01.dbf f:\bak2/H/R;
alter tablespace ts_test end backup;
--end--bak control file
--binary
alter database backup controlfile to 'f:\bak2\controlbinbak.000';
--ascii
alter database backup controlfile to trace;
alter system archive log current;
这是网上找的热备份代码,使用的时候总是出错,显示host不可用。。请指出哪里出错了,环境是xp系统 oracle9i,如果谁有完整的热备份代码请给一份谢谢~~
rem date:11.09.2008
rem desc:backup all database datafile in archive--connect database
--connect internal/password;
connect / as sysdba;--archive
alter system archive log current;
--startalter tablespace system begin backup;
host xcopy F:\oracle\oradata\oradb\system01.dbf f:\bak2/H/R;
alter tablespace system end backup;alter tablespace cwmlite begin backup;
host xcopy F:\oracle\oradata\oradb\cwmlite01.dbf f:\bak2/H/R;
alter tablespace cwmlite end backup;alter tablespace users begin backup;
host xcopy F:\oracle\oradata\oradb\users01.dbf f:\bak2/H/R;
alter tablespace users end backup;alter tablespace tools begin backup;
host xcopy F:\oracle\oradata\oradb\tools01.dbf f:\bak2/H/R;
alter tablespace tools end backup;alter tablespace indx begin backup;
host xcopy F:\oracle\oradata\oradb\indx01.dbf f:\bak2/H/R;
alter tablespace indx end backup;alter tablespace example begin backup;
host xcopy F:\oracle\oradata\oradb\example01.dbf f:\bak2/H/R;
alter tablespace example end backup;alter tablespace ts_test begin backup;
host xcopy F:\oracle\oradata\oradb\test01.dbf f:\bak2/H/R;
alter tablespace ts_test end backup;
--end--bak control file
--binary
alter database backup controlfile to 'f:\bak2\controlbinbak.000';
--ascii
alter database backup controlfile to trace;
alter system archive log current;
这是网上找的热备份代码,使用的时候总是出错,显示host不可用。。请指出哪里出错了,环境是xp系统 oracle9i,如果谁有完整的热备份代码请给一份谢谢~~
解决方案 »
- 图片 文档上传数据库,在线修改、保存到数据库
- 棘手的触发器,请高手帮忙解决
- oracle9.2.0.1升级为9.2.07时无法出现"universal installer" 升级界面???
- 谁sql/develop和中文帮助,文本,excel用什么工具导入oracle9i?详细!!!
- 请帮忙:从9.0转移到8.1版本过程出错
- oracle9i 能在windows 2003上正常安装吗?
- oracle9在linux9上的安装问题
- 安装9i客户端,在asp中调用数据访问组件时提示找不到客户端
- 如何对包进行加密
- Oracle VM VirtualBox安装debian出错
- 求助写sql语句,各位达人来!
- 一个很简单的sql语句报错。
建议楼主用Oracle的RMAN工具来备份恢复.