Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

42

积分

0

好友

0

主题
1#
发表于 2012-6-11 13:07:00 | 查看: 9588| 回复: 7
数据库版本信息
SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
PL/SQL Release 10.2.0.1.0 - Production
CORE    10.2.0.1.0      Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production

报错信息如下
[oracle@localhost udump]$ rman target /

Recovery Manager: Release 10.2.0.1.0 - Production on Mon Jun 11 12:44:31 2012

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database:
ORA-06553: PLS-801: internal error [56319]
RMAN-04015: error setting target database character set to US7ASCII

这个数据库(在redhat 5.4系统)是从windows 通过rman复制过来的,复制不太成功。在执行recover database时,才发现日志文件路径没恢复过来,所以报错了。
后来recover 没成功,直接alter database open resetlogs。
但今天想重新restore,recover,但在执行rman连接时报以上的错误了,附件为此报错的trc文件。这个是什么原因?

另外,在跨平台复制时,日志路径该怎么恢复,不能跟数据文件一样,采用SET NEWNAME FOR DATAFILE,在restore之前,该怎么convert日志路径?
run {
allocate channel c1 type disk;
allocate channel c2 type disk;
SET NEWNAME FOR DATAFILE 1 TO '/home/oracle/oracle/product/10.2.0/oradata/orcl/system01.dbf';
SET NEWNAME FOR DATAFILE 2 TO '/home/oracle/oracle/product/10.2.0/oradata/orcl/undotbs01.dbf';
...
restore database;
switch datafile all;
release channel c1;
release channel c2;
}

orcl_mmon_29508.rar

751 Bytes, 下载次数: 998

trc文件

2#
发表于 2012-6-11 21:46:49
顶一下,请大神解决!!!!!

回复 只看该作者 道具 举报

3#
发表于 2012-6-11 21:48:48
action plan:

贴出以下命令的输出

rman target /

echo $NLS_LANG


SELECT Parameter, Value FROM NLS_DATABASE_PARAMETERS
/

回复 只看该作者 道具 举报

4#
发表于 2012-6-11 22:00:39
[oracle@localhost ~]$ rman target /

Recovery Manager: Release 10.2.0.1.0 - Production on Mon Jun 11 21:59:32 2012

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database:
ORA-06553: PLS-801: internal error [56319]
RMAN-04015: error setting target database character set to US7ASCII
[oracle@localhost ~]$ echo $NLS_LANG

[oracle@localhost ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jun 11 21:59:48 2012

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL> SELECT parameter,value FROM NLS_DATABASE_PARAMETERS;

PARAMETER                      VALUE
------------------------------ --------------------------------------------------------------------------------
NLS_LANGUAGE                   AMERICAN
NLS_TERRITORY                  AMERICA
NLS_CURRENCY                   $
NLS_ISO_CURRENCY               AMERICA
NLS_NUMERIC_CHARACTERS         .,
NLS_CHARACTERSET               ZHS16GBK
NLS_CALENDAR                   GREGORIAN
NLS_DATE_FORMAT                DD-MON-RR
NLS_DATE_LANGUAGE              AMERICAN
NLS_SORT                       BINARY
NLS_TIME_FORMAT                HH.MI.SSXFF AM

PARAMETER                      VALUE
------------------------------ --------------------------------------------------------------------------------
NLS_TIMESTAMP_FORMAT           DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT             HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT        DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY              $
NLS_COMP                       BINARY
NLS_LENGTH_SEMANTICS           BYTE
NLS_NCHAR_CONV_EXCP            FALSE
NLS_NCHAR_CHARACTERSET         AL16UTF16
NLS_RDBMS_VERSION              10.2.0.1.0

20 rows selected.

SQL>

[ 本帖最后由 popowin 于 2012-6-11 22:07 编辑 ]

回复 只看该作者 道具 举报

5#
发表于 2012-6-11 22:11:57
action plan;

export NLS_LANG=american_america.ZHS16GBK

rman target /

若仍有问题 请做一个  system level的 10046 trace 并找出该RMAN 相关的server process的trace 压缩后上传

回复 只看该作者 道具 举报

6#
发表于 2012-6-11 22:36:33
export NLS_LANG=american_america.ZHS16GBK 之后问题还在
下面是取10046 的trc
[oracle@localhost udump]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jun 11 22:29:47 2012

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL> alter system set events='10046 trace name context forever,level 12';

System altered.

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
[oracle@localhost udump]$ rman target /

Recovery Manager: Release 10.2.0.1.0 - Production on Mon Jun 11 22:30:21 2012

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database:
ORA-06553: PLS-801: internal error [56319]
RMAN-04015: error setting target database character set to ZHS16GBK

[oracle@localhost udump]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jun 11 22:32:46 2012

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL> alter system set events='10046 trace name context off';

System altered.

SQL>

orcl_ora_7597.rar

3.73 KB, 下载次数: 990

回复 只看该作者 道具 举报

7#
发表于 2012-6-11 22:54:46
最后执行的语句

dbms_backup_restore.set_charset('ZHS16GBK')

ODM DATA:

与RMAN-554 RMAN-4005 PLS-201 RMAN-4015 when Connecting to Target Database 吻合

Applies to:
Oracle Server - Enterprise Edition - Version 9.0.1.0 and later
Information in this document applies to any platform.
***Checked for relevance on 24-May-2012***


Symptoms


You are attempting to connect to the target database in RMAN and
are receiving a "PLS-00201: identifier 'xxx...' must be declared"
error:

target database Password:


RMAN-00571: ===========================================================
RMAN-00569: ========== ERROR MESSAGE STACK FOLLOWS ========
RMAN-00571: ===============================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database: ORA-06550: line 1, column 7:
PLS-00201: identifier 'DBMS_BACKUP_RESTORE.SET_CHARSET' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
RMAN-04015: error setting target database character set to US7ASCII



Also, if you log into the target database as the user SYS and issue:

SQL> select *
         from dba_objects
         where object_name like '%DBMS_BACKUP_RESTORE%';

you get 0 rows returned or the status is INVALID



Cause

The package identified in the PLS-00201 error was not successfully
created when catproc.sql was originally run on this database. As
a general rule, for any RMAN "PLS-00201: identifier 'xxx...' must
be declared" error, re-run catproc.sql.
Solution

Re-run catproc.sql. This will in turn call the dbmsbkrs.sql script
which creates the DBMS_BACKUP_RESTORE package.

NOTE : Keep inmind that running catproc.sql will invalidate all PL/SQL
and many other related objects.

Running catproc is recommended, as when the RMAN-packages are missing,
there could be others missing aswell.

If the problem has been identified as RMAN-only, than run :
SQL>@?/rdbms/admin/dbmsrman.sql
    @?/rdbms/admin/prvtrmns.plb
    @?/rdbms/admin/dbmsbkrs.sql
    @?/rdbms/admin/prvtbkrs.plb



建议

重新编译 DBMS_BACKUP_RESTORE 包,步骤

SQL>@?/rdbms/admin/dbmsrman.sql
    @?/rdbms/admin/prvtrmns.plb
    @?/rdbms/admin/dbmsbkrs.sql
    @?/rdbms/admin/prvtbkrs.plb

回复 只看该作者 道具 举报

8#
发表于 2012-6-11 23:45:09
编译事报错,如下:
Synonym created.

grant select on v_$backup_spfile_details to select_catalog_role
                *
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 2
ORA-06544: PL/SQL: internal error, arguments: [56319], [], [], [], [], [], [],
[]
ORA-06553: PLS-801: internal error [56319]


create or replace view v_$backup_set_summary as select * from v$backup_set_summary
                                                              *
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 2
ORA-06544: PL/SQL: internal error, arguments: [56319], [], [], [], [], [], [],
[]
ORA-06553: PLS-801: internal error [56319]



Synonym created.

grant select on v_$backup_set_summary to select_catalog_role
                *
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 2
ORA-06544: PL/SQL: internal error, arguments: [56319], [], [], [], [], [], [],
[]
ORA-06553: PLS-801: internal error [56319]


create or replace view v_$backup_datafile_summary as select * from v$backup_datafile_summary
                                                                   *
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 2
ORA-06544: PL/SQL: internal error, arguments: [56319], [], [], [], [], [], [],
[]
ORA-06553: PLS-801: internal error [56319]



Synonym created.

grant select on v_$backup_datafile_summary to select_catalog_role
                *
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 2
ORA-06544: PL/SQL: internal error, arguments: [56319], [], [], [], [], [], [],
[]
ORA-06553: PLS-801: internal error [56319]


create or replace view v_$backup_controlfile_summary as select * from v$backup_controlfile_summary
                                                                      *
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 2
ORA-06544: PL/SQL: internal error, arguments: [56319], [], [], [], [], [], [],
[]
ORA-06553: PLS-801: internal error [56319]

Synonym created.

grant select on v_$backup_controlfile_summary to select_catalog_role
                *
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 2
ORA-06544: PL/SQL: internal error, arguments: [56319], [], [], [], [], [], [],
[]
ORA-06553: PLS-801: internal error [56319]

create or replace view v_$backup_archivelog_summary as select * from v$backup_archivelog_summary
                                                                     *
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 2
ORA-06544: PL/SQL: internal error, arguments: [56319], [], [], [], [], [], [],
[]
ORA-06553: PLS-801: internal error [56319]

回复 只看该作者 道具 举报

您需要登录后才可以回帖 登录 | 注册

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-12-25 23:41 , Processed in 0.052103 second(s), 24 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569