我现在为客户做了一套数据库应用系统,在应用现场没有数据库管理员,为了保证数据安全,现在需要经常做数据备份,备份方式采用热备份,不需要人工干预,最好能由操作系统进行,不知道如何实现。
WIN2000 SERVER
ORACLE 8.1.6
WIN2000 SERVER
ORACLE 8.1.6
解决方案 »
- oracle中如何定时更新一条数据
- 请进来讲讲学Oracle的心得
- 什么是复制的重做日志结构?Oracle为什么要引入这种结构?
- 服务器端 用username/password登录不成功 但用username/password@alias登录成功 是什么问题?
- utl_file怎么指定导出excel的那个Sheet1的单元格格式全为文本型的?
- 《oracle database 10g完全参考手册》这本书中的数据库在哪里
- 如何才能在PL/SQL中写一段代码?
- oracle9.2的一个模式问题。
- 如何查找一条记录中某个字段值为"ABCDWF"的表?
- ~~~~~口令的问题,敬请关注!!!!~~~~~~~~~~~
- 启动OEM,如何“登录到Oracle Management Server"?
- 有关Oracle ERP的报表开发.请高手指点
2. put it in the bat batch .(backup.bat)
3. schedule the bat by using AT commnd
rem script:hotbak.sql
rem creater:chenjiping
rem date:4.4.2002
rem desc:backup database datafile in archive--connect database
connect internal/virpure;--archive
alter system checkpoint;
alter system archive log all;
alter system switch logfile;
--start
alter tablespace afis_remote begin backup;
!xcopy e:\orant\database\remote_data1.ora e:\databak/H/R;
!xcopy e:\orant\database\remote_data2.ora e:\databak/H/R;
alter tablespace afis_remote end backup;alter tablespace afis_rmtafis begin backup;
!xcopy e:\orant\database\rmtafis_data1.ora e:\databak/H/R;
!xcopy e:\orant\database\rmtafis_data2.ora e:\databak/H/R;
alter tablespace afis_rmtafis end backup;alter tablespace afis_lquser begin backup;
!xcopy e:\orant\database\lquser_data.ora e:\databak/H/R;
alter tablespace afis_lquser end backup;alter tablespace afis_transf begin backup;
!xcopy e:\orant\database\transf1_data.ora e:\databak/H/R;
!xcopy e:\orant\database\transf2_data.ora e:\databak/H/R;
alter tablespace afis_transf end backup;alter tablespace system begin backup;
!xcopy e:\orant\database\sys1afis.ora e:\databak/H/R;
alter tablespace system end backup;alter tablespace rbs begin backup;
!xcopy e:\orant\database\rbs1afis.ora e:\databak/H/R;
alter tablespace rbs end backup;alter tablespace usr begin backup;
!xcopy e:\orant\database\usr1afis.ora e:\databak/H/R;
alter tablespace usr end backup;
alter tablespace temporary begin backup;
!xcopy e:\orant\database\tmp1afis.ora e:\databak/H/R;
alter tablespace temporary end backup;
--end--bak control file
--bin
alter database backup controlfile to 'e:\databak\controlbinbak.000';
--ascii
alter database backup controlfile to trace;alter system switch logfile;
alter system switch logfile;
以下是调用以上脚本的bat,照样可以加到任务计划中,一般热备份每周备份一次就够了,主要看情况不同而定。
rem script:hotbak.bat
rem creater:chenjiping
rem date:4.4.2002
rem desc:backup database datafile in archiveecho del old temp backup file
del f:\datatmp\*.*/q
del e:\datatmp\*.*/q
echo bak backup file to temp
move e:\databak\*.* e:\datatmp\
move f:\Archive\*.* f:\datatmp\
echo start new bak to e:\databak
svrmgrl @e:\sql\hotbak.sql
2.在d:\数据库备份目录下建立5个批处理文件,如:星期一.bat(可为7个);
3.编辑星期一.bat,写入:
exp system/manager owner=(test1) file=d:\数据库备份\星期一\test1.dmp
log=d:\数据库备份\星期一\test1.log buffer=655000;
(注意有几个库写几个)4.将批理文件加入“控制面板”、“任务计划”、“备份”、“每天”,时间可为凌晨1-3点,OK!