A,B两机,操作系统、数据库、实例、目录结构均相同,A、B均为归档模式,拟实现B机作为A机的备份机.
思路:
1、安装与第一次创建数据库对象后,A、B 机同步;
2、工作时,用自编程序将A机的ARCHIVE LOG文件COPY到B机对应位置;
3、用recover方式,在B机上重演而保持A、B机的同步;
问题:
当进行第三步时(在B机上操作):
svrmgrl>startup nomount;
svrmgrl>alter database mount;
svrmgrl>set recovery on;
svrmgrl>recover database; 出错
ora-00283 ???????
ora-01165 ???????
查询ORACLE HELP,不明白其中原因,敬请高手指点?
思路:
1、安装与第一次创建数据库对象后,A、B 机同步;
2、工作时,用自编程序将A机的ARCHIVE LOG文件COPY到B机对应位置;
3、用recover方式,在B机上重演而保持A、B机的同步;
问题:
当进行第三步时(在B机上操作):
svrmgrl>startup nomount;
svrmgrl>alter database mount;
svrmgrl>set recovery on;
svrmgrl>recover database; 出错
ora-00283 ???????
ora-01165 ???????
查询ORACLE HELP,不明白其中原因,敬请高手指点?
解决方案 »
- 如何用SQL语句将ACCESS数据库一个表内容插入到ORACLE数据库的一个表
- 一个有点诡异的问题,执行impdp命令在导入某些临时表时出现ORA-00936错误
- oracle中,一個中文表示多少個字符啊?
- Ref Cursor
- 一个表的ID 到底用什么数据类型好?
- 请高手帮忙:还是10g ora-00205错误!!!!!!!!!!!!!!!!!!!!!!
- 对数据库的用户做IP限制
- 谢谢刚才大哥解决问题,另有一sql语句问题
- [高分求教]如何把一个表中的数据插入到另外一台ORACLE服务器数据库的一个表中。
- Oracle定时job没有按时执行里面的存储过程,是怎么回事呢?
- 如何做这样的约束?
- 急问高人:ORACLE里面表记录更新能否触发通知WINDOW中正在执行的程序?
1、2步是正常的,即:
A、B机分别按相同参数与路径创建实例后
A机创建工作表空间
将A、B机实例停止后,将所有实例相关文件COPY到B机
启动B机实例,正常,且经查检,A、B完全一致;
1、只将 archive log copy到b机,然后用recover database 保持同步。
这时候由于b数据库处于一致状态,不需要恢复,也就无法apply archived log了。
解决办法:
先配置好b数据库的alias,然后在a数据库的init_sid.ora文件加入:
log_archive_dest_2 = "SERVICE=alias"
这样a数据库会自动更新b数据库了。
2、将所有数据库文件copy 到b数据库:
这时b数据库也就同a数据库一样了。不过copy的代价很高,且copy时a,b数据库都必须down掉
先配置好b数据库的alias,然后在a数据库的init_sid.ora文件加入:
log_archive_dest_2 = "SERVICE=alias"1.您的意思是指在A机tnsname.ora中配一个alias,如:HSMIS2,然后:
log_archive_dest_2 = "SERVICE=HSMIS2"
2."这样a数据库会自动更新b数据库了",这样B机与A机会有多少延迟?
谢谢!
在A、B机一致后,为了测试,在A机建立了测试表,而B机没有建;
而后强行A机归档,将archive log文件COPY到B机;
但recover database until cancel后,B机仍然没有测试表及数据;
如建立DBLINK,建立关键表的触发器等
14-8 Enterprise DBA Part 1B: Backup and Recovery Workshop
1 Copy the init.ora file from the primary server to the standby database. Edit
the following init.ora parameters for the standby database:
CONTROL_FILES, DB_FILE_NAME_CONVERT, and
LOG_FILE_NAME_CONVERT
You may also need to change parameters such as LOG_ARCHIVE_DEST,
LOG_ARCHIVE_FORMAT, BACKGROUND_DUMP_DEST,and
USER_DUMP_DEST which provide the file locations to reflect the file and
directory layout on the standby.
2 Create the control file for the standby database by issuing the following
command on the primary database
SQL> alter database create standby controlfile as <filename>;
This command creates a copy of the primary database’s control file. Copy the
control file specified above to the standby server at the appropriate location
specified by the CONTROL_FILES parameter of standby database.
3 Back up the data files belonging to the primary database. You can take the
backups while the database is online or offline. You can use the online
tablespace backup methodology if you are using online backup. Otherwise, shut
down the primary database cleanly and back up data files. Use this backup and
copy them to the appropriate location in the standby database server.
.....................
Creating a Standby Database
How to Create a Standby Database (continued)
4 If you have used online backup in step 3, archive the current online logs of the
primary database by issuing:
SQL> alter system archive log current;
This forces a log switch to archive the current log to guarantee complete recovery
can be performed on the standby database. Copy the archive logs to the standby
database server.
5 Start the standby database in Nomount mode.
SQL> startup pfile=$HOME/initsndby.ora nomount
6 Mount the database using the following command:
SQL> alter database mount standby database;
7 Issue the recover command and apply the archived logs to the standby database
to synchronize it with the primary database by using a special recover command:
SQL> recover standby database;说的也不是非常清楚,你最好找本这方面的书看看
请问一下各位,在实际应用中,都有那些好的方法做备份数据库?