RMAN异地恢复(ORA-06553: PLS-801: internal error [56319])

RMAN异地恢复ORA-06553: PLS-801: internal error [56319]

 

一、基本思路:

1、 源库RMAN全备,并备份归档日志

2、 目的服务器建立好所需要目录、权限,copy备份集到目的服务器的指定目录

3、 恢复参数文件成文本格式并修改控制文件的位置,然后恢复控制控制文件,catalog start with ‘备份集目录crosscheck

4、 如果保存数据文件目录不同,则需要set newname , restore,recover

5、 Alter database open resetlogs启库,最后添加temp文件

 

二、执行:

1、全库脚本

run {

allocate channel d1 type disk;

backup as compressed backupset database filesperset 4 format

'/backup/rman/level0_%d_%s_%p_%u_%T.bak' include current controlfile;

sql 'alter system archive log current';

backup archivelog all filesperset 10 format '/backup/rman/arc_%d_%s_%p_%u_%T.bak'

release channel d1;

crosscheck backup;

}

 

2scp –P 80 –r [email protected]:/rman/test (-P 80不同端口传输,-r把整个目录传到目的)

 

3restore spfile from ‘参数文件备份集’;

        vi initSID.ora 修改控制文件目录为指定目录

        restore controlfile from ‘控制文件备份集’;

        catalog start with ‘/rman/test/BK’;

        crosscheck backup;

        crosscheck copy;

        crosscheck archivelog all;

4run{

set newname for datafile 1 to '目录/system01.dbf';

set newname for datafile 2 to '目录/undotbs01.dbf';

set newname for datafile 3 to '目录/sysaux01.dbf';

set newname for datafile 4 to '目录/users01.dbf';

###………;

restore database;

switch datafile all;

recover database;}

     指定时间点恢复

run{

set newname for datafile 1 to '目录/system01.dbf';

set newname for datafile 2 to '目录/undotbs01.dbf';

set newname for datafile 3 to '目录/sysaux01.dbf';

set newname for datafile 4 to '目录/users01.dbf';

###………;

sql 'alter session set nls_date_format="yyyy-mm-dd hh24:mi:ss"';

set until time = '2012-10-19 10:00:00';

restore database;

switch datafile all;

recover database;}

 

(源数据库执行SQL

select 'set newname for datafile ' || file# ||' to '''||replace(name,'源数据库数据的保存目录','目的数据库保存数据的目录') ||''';' from v$datafile;

)

5、 resetlogs启库

   指定redo log  新位置,

   alter database rename file '目录/redo01.log' to '新目录/redo01.log';

   alter database open resetlogs;

       查看临时表空间

       select  TABLESPACE_NAME, CONTENTS from dba_tablespaces where CONTENTS='TEMPORARY';

alter tablespace temp add tempfile ‘目录/temp02.dbf’ size 200m reuse;

alter database tempfile ‘源目录/temp01.dbf’ offline;

alter database tempfile ‘源目录/temp01.dbf’ drop including datafiles;

 

 

 

三、附表:

这次异地恢复遇到了ORA-06553: PLS-801: internal error [56319]

 

遇到这个问题都是因为自己的不规范操作引起的。内心愧疚啊!

 

问题根本原因:32位的数据库,恢复到64位数据库,产生的问题。

解决方法:参考 惜分飞http://www.xifenfei.com/2147.html     感谢惜分飞的分享

 

重新编译对象

SQL> shutdown immediate;

SQL> startup upgrade;

SQL> @?/rdbms/admin/utlirp.sql

SQL> @?/rdbms/admin/utlrp.sql

SQL> shutdown immediate;

SQL> startup;

查询组件是否都正常

SELECT  COMP_NAME,STATUS FROM   DBA_REGISTRY;

 

你可能感兴趣的:(RMAN异地恢复(ORA-06553: PLS-801: internal error [56319]))