亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

Oracle 12c 32k 與 rman recover table之間的 Bug

標簽:
Oracle

Oracle Database 12c Release 1 (12.1.0.1.0) for Linux x86-64

OS: Redhat Linux 5 Update 8 64bit

 

1. 按官方手册,启用 varchar2 32k 支持

2. 使用 rman recover table 功能是,始终失败,报错如下:

RMAN-03015: error occurred in stored script Memory Script

RMAN-03009: failure of sql command on clone_default channel at 07/15/2013 13:03:14

RMAN-11003: failure during parse/execution of SQL statement: alter pluggable database  PDB1 open read only

ORA-14693: The MAX_STRING_SIZE parameter must be EXTENDED.

 

3. 在未启用 varchar2 32k 支持时, rman recover table 成功。

 

经过多位朋友测试,均和我测试结果一致,证明是  Oracle 12.1.0.1.0 的Bug.

 

详细测试过程如下:

[oracle@AS5U8 trace]$ sqlplus gao/gao

SQL*Plus: Release 12.1.0.1.0 Production on Wed Jul 10 20:37:58 2013

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

Last Successful login time: Wed Jul 10 2013 19:34:02 +08:00

Connected to:

Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 – 64bit Production

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

 一 建立测试表

SQL> create table t1 (id number(1));

Table created.

SQL> insert into t1 values(1);

1 row created.

SQL> insert into t1 values(2);

1 row created.

SQL> commit;

Commit complete.

SQL> select * from t1;

 ID

———-

  1

  2

SQL> select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual;

TO_CHAR(SYSDATE,'YY

——————-

2013-07-10 20:38:46

 

二 进行一次 全备

[oracle@AS5U8 /]$ rman target sys/oracle

Recovery Manager: Release 12.1.0.1.0 – Production on Wed Jul 10 20:39:00 2013

Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.

connected to target database: NAIL (DBID=902387349)

RMAN> backup database format '/u01/backup/bak_%f';

Starting backup at 10-JUL-13

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=53 device type=DISK

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00001 name=/u01/product/oradata/nail/system01.dbf

input datafile file number=00003 name=/u01/product/oradata/nail/sysaux01.dbf

input datafile file number=00004 name=/u01/product/oradata/nail/undotbs01.dbf

input datafile file number=00006 name=/u01/product/oradata/nail/users01.dbf

channel ORA_DISK_1: starting piece 1 at 10-JUL-13

channel ORA_DISK_1: finished piece 1 at 10-JUL-13

piece handle=/u01/backup/bak_6 tag=TAG20130710T203920 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:01:15

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

including current control file in backup set

including current SPFILE in backup set

channel ORA_DISK_1: starting piece 1 at 10-JUL-13

channel ORA_DISK_1: finished piece 1 at 10-JUL-13

piece handle=/u01/backup/bak_0 tag=TAG20130710T203920 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 10-JUL-13

三  继续写数据

SQL> insert into t1 values(3);

1 row created.

SQL> insert into t1 values(4);

1 row created.

SQL> commit;

Commit complete.

SQL> select * from t1;

 ID

———-

  1

  2

  3

  4

SQL> select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual;

TO_CHAR(SYSDATE,'YY

——————-

2013-07-10 20:41:20

SQL>

 

四 删除表

SQL> drop table t1 purge;

Table dropped.

SQL> select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual;

TO_CHAR(SYSDATE,'YY

——————-

2013-07-10 20:41:56

 

五 RMAN 恢复 (报错)

[oracle@AS5U8 /]$ rman target sys/oracle

RMAN> recover table 'GAO'.'T1'

2> until time "to_date('2013-07-10 20:41:20','yyyy-mm-dd hh24:mi:ss')"

3> auxiliary destination '/tmp/recover'

4> remap table 'GAO'.'T1':'R_T1';

Starting recover at 10-JUL-13

using target database control file instead of recovery catalog

current log archived

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=52 device type=DISK

RMAN-05026: WARNING: presuming following set of tablespaces applies to specified Point-in-Time

List of tablespaces expected to have UNDO segments

Tablespace SYSTEM

Tablespace UNDOTBS1

Creating automatic instance, with SID='scob'

initialization parameters used for automatic instance:

db_name=NAIL

db_unique_name=scob_pitr_NAIL

compatible=12.1.0.0.0

db_block_size=8192

db_files=200

sga_target=1G

processes=80

diagnostic_dest=/u01/product

db_create_file_dest=/tmp/recover

log_archive_dest_1='location=/tmp/recover'

#No auxiliary parameter file used

starting up automatic instance NAIL

Oracle instance started

Total System Global Area    1068937216 bytes

Fixed Size                     2296576 bytes

Variable Size                281019648 bytes

Database Buffers             780140544 bytes

Redo Buffers                   5480448 bytes

Automatic instance created

contents of Memory Script:

{

# set requested point in time

set until  time "to_date('2013-07-10 20:41:20','yyyy-mm-dd hh24:mi:ss')";

# restore the controlfile

restore clone controlfile;

# mount the controlfile

sql clone 'alter database mount clone database';

# archive current online log

sql 'alter system archive log current';

}

executing Memory Script

executing command: SET until clause

Starting restore at 10-JUL-13

allocated channel: ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: SID=19 device type=DISK

channel ORA_AUX_DISK_1: starting datafile backup set restore

channel ORA_AUX_DISK_1: restoring control file

channel ORA_AUX_DISK_1: reading from backup piece /u01/backup/bak_0

channel ORA_AUX_DISK_1: piece handle=/u01/backup/bak_0 tag=TAG20130710T203920

channel ORA_AUX_DISK_1: restored backup piece 1

channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01

output file name=/tmp/recover/NAIL/controlfile/o1_mf_8xtov6rw_.ctl

Finished restore at 10-JUL-13

sql statement: alter database mount clone database

sql statement: alter system archive log current

contents of Memory Script:

{

# set requested point in time

set until  time "to_date('2013-07-10 20:41:20','yyyy-mm-dd hh24:mi:ss')";

# set destinations for recovery set and auxiliary set datafiles

set newname for clone datafile  1 to new;

set newname for clone datafile  4 to new;

set newname for clone datafile  3 to new;

set newname for clone tempfile  1 to new;

# switch all tempfiles

switch clone tempfile all;

# restore the tablespaces in the recovery set and the auxiliary set

restore clone datafile  1, 4, 3;

switch clone datafile all;

}

executing Memory Script

executing command: SET until clause

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

renamed tempfile 1 to /tmp/recover/NAIL/datafile/o1_mf_temp_%u_.tmp in control file

Starting restore at 10-JUL-13

using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backup set restore

channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set

channel ORA_AUX_DISK_1: restoring datafile 00001 to /tmp/recover/NAIL/datafile/o1_mf_system_%u_.dbf

channel ORA_AUX_DISK_1: restoring datafile 00004 to /tmp/recover/NAIL/datafile/o1_mf_undotbs1_%u_.dbf

channel ORA_AUX_DISK_1: restoring datafile 00003 to /tmp/recover/NAIL/datafile/o1_mf_sysaux_%u_.dbf

channel ORA_AUX_DISK_1: reading from backup piece /u01/backup/bak_6

channel ORA_AUX_DISK_1: piece handle=/u01/backup/bak_6 tag=TAG20130710T203920

channel ORA_AUX_DISK_1: restored backup piece 1

channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:05

Finished restore at 10-JUL-13

datafile 1 switched to datafile copy

input datafile copy RECID=4 STAMP=820442798 file name=/tmp/recover/NAIL/datafile/o1_mf_system_8xtovfo7_.dbf

datafile 4 switched to datafile copy

input datafile copy RECID=5 STAMP=820442798 file name=/tmp/recover/NAIL/datafile/o1_mf_undotbs1_8xtovfp8_.dbf

datafile 3 switched to datafile copy

input datafile copy RECID=6 STAMP=820442798 file name=/tmp/recover/NAIL/datafile/o1_mf_sysaux_8xtovfp0_.dbf

contents of Memory Script:

{

# set requested point in time

set until  time "to_date('2013-07-10 20:41:20','yyyy-mm-dd hh24:mi:ss')";

# online the datafiles restored or switched

sql clone "alter database datafile  1 online";

sql clone "alter database datafile  4 online";

sql clone "alter database datafile  3 online";

# recover and open database read only

recover clone database tablespace  "SYSTEM", "UNDOTBS1", "SYSAUX";

sql clone 'alter database open read only';

}

executing Memory Script

executing command: SET until clause

sql statement: alter database datafile  1 online

sql statement: alter database datafile  4 online

sql statement: alter database datafile  3 online

Starting recover at 10-JUL-13

using channel ORA_AUX_DISK_1

starting media recovery

archived log for thread 1 with sequence 15 is already on disk as file /u01/archvielog/1_15_820430616.dbf

archived log file name=/u01/archvielog/1_15_820430616.dbf thread=1 sequence=15

media recovery complete, elapsed time: 00:00:01

Finished recover at 10-JUL-13

sql statement: alter database open read only

Removing automatic instance

shutting down automatic instance

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-00601: fatal error in recovery manager

RMAN-03004: fatal error during execution of command

RMAN-10041: Could not re-create polling channel context following failure.

RMAN-10024: error setting up for rpc polling

RMAN-10005: error opening cursor

RMAN-10002: ORACLE error: ORA-03114: not connected to ORACLE

RMAN-03002: failure of recover command at 07/10/2013 20:46:44

RMAN-06136: ORACLE error from auxiliary database: ORA-03114: not connected to ORACLE

RMAN-03015: error occurred in stored script Memory Script

RMAN-03009: failure of sql command on clone_default channel at 07/10/2013 20:46:44

RMAN-11003: failure during parse/execution of SQL statement: alter database open read only

ORA-01092: ORACLE instance terminated. Disconnection forced

ORA-14693: The MAX_STRING_SIZE parameter must be EXTENDED.

 

©著作权归作者所有:来自51CTO博客作者nail的原创作品,如需转载,请注明出处,否则将追究法律责任


點擊查看更多內容
TA 點贊

若覺得本文不錯,就分享一下吧!

評論

作者其他優質文章

正在加載中
  • 推薦
  • 評論
  • 收藏
  • 共同學習,寫下你的評論
感謝您的支持,我會繼續努力的~
掃碼打賞,你說多少就多少
贊賞金額會直接到老師賬戶
支付方式
打開微信掃一掃,即可進行掃碼打賞哦
今天注冊有機會得

100積分直接送

付費專欄免費學

大額優惠券免費領

立即參與 放棄機會
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號

舉報

0/150
提交
取消