请问oracle8.0.5有没有类似于sql server 7.0 中的系统存储过程sp_attach_db或sql server 2000 企业管理器中数据库右击菜单中的"附加数据库"菜单项的操作,也就是说,当oracle数据库崩溃时,重装oracle,如果原数据库文件和日志文件能copy,能否附加?如果只有原数据库文件能用呢?能不能详细一点?
...全文
345打赏收藏
有关oracle8的一个问题?(100分)
请问oracle8.0.5有没有类似于sql server 7.0 中的系统存储过程sp_attach_db或sql server 2000 企业管理器中数据库右击菜单中的"附加数据库"菜单项的操作,也就是说,当oracle数据库崩溃时,重装oracle,如果原数据库文件和日志文件能copy,能否附加?如果只有原数据库文件能用呢?能不能详细一点?
6.3、每天做一次 partial online with archiving backups .
#su - oracle
%svrmgrl
%svrmgrl>connect internal
%svrmgrl>alter tablespace billsp begin backup
%svrmgrl>alter tablespace billtmpsp begin backup
%svrmgrl>alter tablespace billrlbksp begin backup
%svrmgrl>alter tablespace system begin backup
%svrmgrl>alter tablespace rbs begin backup
%svrmgrl>alter tablespace temp begin backup
%svrmgrl>alter tablespace tools begin backup
%svrmgrl>alter tablespace users begin backup
%svrmgrl>host cp all datafile to the backup storage. #文件名如第一步中以.dbf结尾的.
%svrmgrl>alter tablespace billsp end backup
%svrmgrl>alter tablespace billtmpsp end backup
%svrmgrl>alter tablespace billrlbksp end backup
%svrmgrl>alter tablespace system end backup
%svrmgrl>alter tablespace rbs end backup
%svrmgrl>alter tablespace temp end backup
%svrmgrl>alter tablespace tools end backup
%svrmgrl>alter tablespace users end backup
做一个sql文件,如上所写.
The billing system can recover to the point of failure when the failure occur.
七、备份文件的恢复:
7.1恢复文件:
以下是对"/etc/passwd"文件的恢复
(、放入正确的磁带
(、运行以下命令恢复"/etc/passwd"文件
# rsh www mt -f /dev/rmt/0 rew
( 找到最近的磁带,向前进带到最近的"/etc/passwd",比如要找星期三的"/etc/passwd"文件,运行如下命令)
#rsh www mt -f /dev/rmt/0n fsf 2
# ufsrestore if www:/dev/rmt/0n
ufsrestore > ls
.:
etc/
ufsrestore > cd etc
ufsrestore > ls
./etc:
passwd
ufsrestore > add passwd
Warnign :./etc:File exists
ufsrestore > verbose
verbose mode on
ufsrestore > extract
Extract requested files
You have not read any volumes yet .
Unless you know which volume your file(s) are on you should start witch the last volume and work to wards the first.
Specify next volume #:1
extract file ./etc/passwd
Add links
Set directory mode ,ower,and times.
set owner /mode for '.'?(yn)n
Directories already exit , set mode anyway?(yn)y
ufsrestore >quit
热备份可以在数据库打开打情况下进行,一般通过使用Alter命令改变表空间的状态来开始进行备份的,备份完成后,要恢其原来状态,否则redo log 会错配,引起数据库下次启动时对受影响的表空间进行完全覆盖。热备份的要求是:
1.热备份工作必需要求数据库在Archivelog 方式下操作,在SQLDBA状态下用alter database archivelog|noarchivelog命令可改变备份的模式。
2.热备份只能在数据库不使用或使用率低的情况下进行。
3.热备份需要大量的档案空间。
一般情况,Oracle 以循环的方式写入Online redo log 文件,当填满第一个redo log文件后写第二个,直至最后一个,最后一个被填满后,后台进程LGWR就覆盖第一个,在Archivelog方式下,后台进程ARCH在每一个redo log 文件被覆盖前,给它作一个拷贝,一般,这些文档的redo log 文件被写入磁盘或磁带中。如果磁盘空间够用,建议使用磁盘,这样可大大减少完成备份所需的时间。
在作热备份之前,要将config.ora文件中的log_archive_start 设为true 将log_archive_dest
规定archive redo log 文件的位置:
log_archive_dest=/wwwdg/oracle/arch/arch
log_archive_start=true
一旦数据库运行在archivelog状态下,就可以作备份了。热备份的命令文件由三部分组成:
1、数据文件一个表空间一个空间地备份:
a.设置表空间为备份状态。
b.备份表空间的数据文件。
c.恢复表空间为正常状态。
2、备份归档要作log 文件:
a.临时停止归档进程
b.log下那些在archive redo log目标目录中的文件
c.重新启动archive进程
d.备份归档的redo log 文件