11g新特性之active databaes duplicate

一,环境信息

主库:rhel6.2 oracle 11.2.0.4

duplicate库:orace linux 6.6 oracle 11.2.0.3

注意:数据库软件版本一定要相同,最起码compatible参数要一致

二,在duplicate端创建参数文件和密码文件

1.确认主库数据文件和日志文件的路径

<span style="font-size:12px;">SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
/u01/app/oracle11g/oradata/DB11/datafile/o1_mf_system_bcc2dp1d_.dbf
/u01/app/oracle11g/oradata/DB11/datafile/o1_mf_sysaux_bcc2dp2c_.dbf
/u01/app/oracle11g/oradata/DB11/datafile/o1_mf_users_bcc2dp33_.dbf
/u01/app/oracle11g/oradata/DB11/datafile/o1_mf_new_user_bcp23qgn_.dbf
/u01/app/oracle11g/oradata/DB11/datafile/undotbs2.dbf

SQL> select member from v$logfile;

MEMBER
--------------------------------------------------------------------------------
/u01/app/oracle11g/oradata/DB11/onlinelog/o1_mf_3_bcc2hc3t_.log
/u01/app/oracle11g/oradata/DB11/onlinelog/o1_mf_2_bcc2hb1s_.log
/u01/app/oracle11g/oradata/DB11/onlinelog/o1_mf_1_bcc2h8rh_.log

SQL> show parameter compatible

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
compatible                           string      11.2.0.4.0</span>

2.在duplicate端创建目录

<span style="font-size:12px;"> mkdir -p /u01/app/oradup/oradata/dupdb
 mkdir -p /u01/app/oradup/admin/dupdb/adump
 并授权
 chown oradup:oinstall /u01/app/oradup/oradata/dupdb</span>

3.参数文件内容如下:

<span style="font-size:12px;">[email protected]  /u01/app/oradup/product/11.2.0/dbs$ vi initdupdb.ora
*.compatible='11.2.0.4.0'    ---这个参数两个数据库一定要一致
*.control_files='/u01/app/oradup/oradata/dupdb/control01.ctl'
*.db_block_size=8192
*.db_name='dupdb'
#####下面的两个参数分别设定数据文件和日志文件切换后的路径
db_file_name_convert=('/u01/app/oracle11g/oradata/DB11/datafile/','/u01/app/oradup/oradata/dupdb')
log_file_name_convert=('/u01/app/oracle11g/oradata/DB11/datafile/','/u01/app/oradup/oradata/dupdb')</span>

4.创建密码文件,密码一定要和主库的sys密码一致

<span style="font-size:12px;">[email protected]  /u01/app/oradup/product/11.2.0/dbs$ orapwd file=orapwdupdb password=oracle entries=30
</span>

三,启动duplicate数据库到nomount状态

<span style="font-size:12px;">[email protected]  /home/oracle$ export ORACLE_SID=dupdb
[email protected]  /home/oracle$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Fri May 22 05:16:22 2015

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

Connected to an idle instance.

SQL> startup nomount
ORACLE instance started.

Total System Global Area  238034944 bytes
Fixed Size                  2227136 bytes
Variable Size             180356160 bytes
Database Buffers           50331648 bytes
Redo Buffers                5120000 bytes</span>

四,在duplicate端配置网络配置文件和tnsnames.ora

listener.ora文件如下:(说明:duplicate端必须使用静态注册,因为监听如果是动态注册在nomount状态为blocked状态,这种状态是不能连接数据库的)

<span style="font-size:12px;">vi listener.ora

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = dupdb)
      (ORACLE_HOME =/u01/app/oracle/product/11.2.0)
      (SID_NAME = dupdb)
    )
  )

LISTENER =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.10)(PORT = 1521))
  )</span>

tnsnames.ora如下(注意:主库和duplicate库上都要修改):

<span style="font-size:12px;">db11 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.100)(PORT = 1526))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = db11)
    )
  )

dupdb=
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.10)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = dupdb)
    )
  )</span>

五,启动rman,连接到数据库

<span style="font-size:12px;">[email protected]  /home/oracle$ export ORACLE_SID=dupdb
[email protected]  /home/oracle$ rman target sys/[email protected] auxiliary sys/[email protected]

Recovery Manager: Release 11.2.0.3.0 - Production on Fri May 22 05:41:34 2015

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

connected to target database: DB11 (DBID=1400765095)
connected to auxiliary database: DUPDB (not mounted)</span>

六,执行duplicate命令

<span style="font-size:12px;">RMAN> duplicate target database to 'dupdb' from active database nofilenamecheck;
</span>

附录一,

RMAN> duplicate target database to ‘dupdb‘ from active database nofilenamecheck;

Starting Duplicate Db at 22-MAY-15

using target database control file instead of recovery catalog

allocated channel: ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: SID=19 device type=DISK

contents of Memory Script:

{

sql clone "create spfile from memory";

}

executing Memory Script

sql statement: create spfile from memory

contents of Memory Script:

{

shutdown clone immediate;

startup clone nomount;

}

executing Memory Script

Oracle instance shut down

connected to auxiliary database (not started)

Oracle instance started

Total System Global Area     217157632 bytes

Fixed Size                     2251816 bytes

Variable Size                159384536 bytes

Database Buffers              50331648 bytes

Redo Buffers                   5189632 bytes

contents of Memory Script:

{

sql clone "alter system set  db_name =

‘‘DB11‘‘ comment=

‘‘Modified by RMAN duplicate‘‘ scope=spfile";

sql clone "alter system set  db_unique_name =

‘‘DUPDB‘‘ comment=

‘‘Modified by RMAN duplicate‘‘ scope=spfile";

shutdown clone immediate;

startup clone force nomount

backup as copy current controlfile auxiliary format  ‘/u01/app/oradup/oradata/dupdb/control01.ctl‘;

alter clone database mount;

}

executing Memory Script

sql statement: alter system set  db_name =  ‘‘DB11‘‘ comment= ‘‘Modified by RMAN duplicate‘‘ scope=spfile

sql statement: alter system set  db_unique_name =  ‘‘DUPDB‘‘ comment= ‘‘Modified by RMAN duplicate‘‘ scope=spfile

Oracle instance shut down

Oracle instance started

Total System Global Area     217157632 bytes

Fixed Size                     2251816 bytes

Variable Size                159384536 bytes

Database Buffers              50331648 bytes

Redo Buffers                   5189632 bytes

Starting backup at 22-MAY-15

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=41 device type=DISK

channel ORA_DISK_1: starting datafile copy

copying current control file

output file name=/u01/app/oracle11g/product/11.2.0/dbhome_1/dbs/snapcf_db11.f tag=TAG20150224T154659 RECID=13 STAMP=872524019

channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01

Finished backup at 22-MAY-15

database mounted

contents of Memory Script:

{

set newname for datafile  1 to

"/u01/app/oradup/oradata/dupdbo1_mf_system_bcc2dp1d_.dbf";

set newname for datafile  2 to

"/u01/app/oradup/oradata/dupdbo1_mf_sysaux_bcc2dp2c_.dbf";

set newname for datafile  4 to

"/u01/app/oradup/oradata/dupdbo1_mf_users_bcc2dp33_.dbf";

set newname for datafile  5 to

"/u01/app/oradup/oradata/dupdbo1_mf_new_user_bcp23qgn_.dbf";

set newname for datafile  6 to

"/u01/app/oradup/oradata/dupdbundotbs2.dbf";

backup as copy reuse

datafile  1 auxiliary format

"/u01/app/oradup/oradata/dupdbo1_mf_system_bcc2dp1d_.dbf"   datafile

2 auxiliary format

"/u01/app/oradup/oradata/dupdbo1_mf_sysaux_bcc2dp2c_.dbf"   datafile

4 auxiliary format

"/u01/app/oradup/oradata/dupdbo1_mf_users_bcc2dp33_.dbf"   datafile

5 auxiliary format

"/u01/app/oradup/oradata/dupdbo1_mf_new_user_bcp23qgn_.dbf"   datafile

6 auxiliary format

"/u01/app/oradup/oradata/dupdbundotbs2.dbf"   ;

sql ‘alter system archive log current‘;

}

executing Memory Script

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting backup at 22-MAY-15

using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile copy

input datafile file number=00001 name=/u01/app/oracle11g/oradata/DB11/datafile/o1_mf_system_bcc2dp1d_.dbf

output file name=/u01/app/oradup/oradata/dupdbo1_mf_system_bcc2dp1d_.dbf tag=TAG20150224T154706

channel ORA_DISK_1: datafile copy complete, elapsed time: 00:02:40

channel ORA_DISK_1: starting datafile copy

input datafile file number=00002 name=/u01/app/oracle11g/oradata/DB11/datafile/o1_mf_sysaux_bcc2dp2c_.dbf

output file name=/u01/app/oradup/oradata/dupdbo1_mf_sysaux_bcc2dp2c_.dbf tag=TAG20150224T154706

channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:06

channel ORA_DISK_1: starting datafile copy

input datafile file number=00004 name=/u01/app/oracle11g/oradata/DB11/datafile/o1_mf_users_bcc2dp33_.dbf

output file name=/u01/app/oradup/oradata/dupdbo1_mf_users_bcc2dp33_.dbf tag=TAG20150224T154706

channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:16

channel ORA_DISK_1: starting datafile copy

input datafile file number=00005 name=/u01/app/oracle11g/oradata/DB11/datafile/o1_mf_new_user_bcp23qgn_.dbf

output file name=/u01/app/oradup/oradata/dupdbo1_mf_new_user_bcp23qgn_.dbf tag=TAG20150224T154706

channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07

channel ORA_DISK_1: starting datafile copy

input datafile file number=00006 name=/u01/app/oracle11g/oradata/DB11/datafile/undotbs2.dbf

output file name=/u01/app/oradup/oradata/dupdbundotbs2.dbf tag=TAG20150224T154706

channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:26

Finished backup at 22-MAY-15

sql statement: alter system archive log current

contents of Memory Script:

{

backup as copy reuse

archivelog like  "/u01/app/oracle11g/product/11.2.0/dbhome_1/dbs/arch1_84_868943464.dbf" auxiliary format

"/u01/app/oradup/product/11.2.0/dbs/arch1_84_868943464.dbf"   ;

catalog clone archivelog  "/u01/app/oradup/product/11.2.0/dbs/arch1_84_868943464.dbf";

switch clone datafile all;

}

executing Memory Script

Starting backup at 22-MAY-15

using channel ORA_DISK_1

channel ORA_DISK_1: starting archived log copy

input archived log thread=1 sequence=84 RECID=27 STAMP=872524304

output file name=/u01/app/oradup/product/11.2.0/dbs/arch1_84_868943464.dbf RECID=0 STAMP=0

channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:03

Finished backup at 22-MAY-15

cataloged archived log

archived log file name=/u01/app/oradup/product/11.2.0/dbs/arch1_84_868943464.dbf RECID=27 STAMP=880393331

datafile 1 switched to datafile copy

input datafile copy RECID=13 STAMP=880393332 file name=/u01/app/oradup/oradata/dupdbo1_mf_system_bcc2dp1d_.dbf

datafile 2 switched to datafile copy

input datafile copy RECID=14 STAMP=880393332 file name=/u01/app/oradup/oradata/dupdbo1_mf_sysaux_bcc2dp2c_.dbf

datafile 4 switched to datafile copy

input datafile copy RECID=15 STAMP=880393332 file name=/u01/app/oradup/oradata/dupdbo1_mf_users_bcc2dp33_.dbf

datafile 5 switched to datafile copy

input datafile copy RECID=16 STAMP=880393332 file name=/u01/app/oradup/oradata/dupdbo1_mf_new_user_bcp23qgn_.dbf

datafile 6 switched to datafile copy

input datafile copy RECID=17 STAMP=880393332 file name=/u01/app/oradup/oradata/dupdbundotbs2.dbf

contents of Memory Script:

{

set until scn  1797603;

recover

clone database

delete archivelog

;

}

executing Memory Script

executing command: SET until clause

Starting recover at 22-MAY-15

allocated channel: ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: SID=18 device type=DISK

starting media recovery

archived log for thread 1 with sequence 84 is already on disk as file /u01/app/oradup/product/11.2.0/dbs/arch1_84_868943464.dbf

archived log file name=/u01/app/oradup/product/11.2.0/dbs/arch1_84_868943464.dbf thread=1 sequence=84

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

Finished recover at 22-MAY-15

Oracle instance started

Total System Global Area     217157632 bytes

Fixed Size                     2251816 bytes

Variable Size                159384536 bytes

Database Buffers              50331648 bytes

Redo Buffers                   5189632 bytes

contents of Memory Script:

{

sql clone "alter system set  db_name =

‘‘DUPDB‘‘ comment=

‘‘Reset to original value by RMAN‘‘ scope=spfile";

sql clone "alter system reset  db_unique_name scope=spfile";

shutdown clone immediate;

startup clone nomount;

}

executing Memory Script

sql statement: alter system set  db_name =  ‘‘DUPDB‘‘ comment= ‘‘Reset to original value by RMAN‘‘ scope=spfile

sql statement: alter system reset  db_unique_name scope=spfile

Oracle instance shut down

connected to auxiliary database (not started)

Oracle instance started

Total System Global Area     217157632 bytes

Fixed Size                     2251816 bytes

Variable Size                159384536 bytes

Database Buffers              50331648 bytes

Redo Buffers                   5189632 bytes

sql statement: CREATE CONTROLFILE REUSE SET DATABASE "DUPDB" RESETLOGS ARCHIVELOG

MAXLOGFILES     16

MAXLOGMEMBERS      3

MAXDATAFILES      100

MAXINSTANCES     8

MAXLOGHISTORY      292

LOGFILE

GROUP   1 ( ‘/u01/app/oracle11g/oradata/DB11/onlinelog/o1_mf_1_bcc2h8rh_.log‘ ) SIZE 50 M  REUSE,

GROUP   2 ( ‘/u01/app/oracle11g/oradata/DB11/onlinelog/o1_mf_2_bcc2hb1s_.log‘ ) SIZE 50 M  REUSE,

GROUP   3 ( ‘/u01/app/oracle11g/oradata/DB11/onlinelog/o1_mf_3_bcc2hc3t_.log‘ ) SIZE 50 M  REUSE

DATAFILE

‘/u01/app/oradup/oradata/dupdbo1_mf_system_bcc2dp1d_.dbf‘

CHARACTER SET ZHS16GBK

contents of Memory Script:

{

set newname for tempfile  1 to

"/u01/app/oradup/oradata/dupdbo1_mf_temp_bcc2hld2_.tmp";

switch clone tempfile all;

catalog clone datafilecopy  "/u01/app/oradup/oradata/dupdbo1_mf_sysaux_bcc2dp2c_.dbf",

"/u01/app/oradup/oradata/dupdbo1_mf_users_bcc2dp33_.dbf",

"/u01/app/oradup/oradata/dupdbo1_mf_new_user_bcp23qgn_.dbf",

"/u01/app/oradup/oradata/dupdbundotbs2.dbf";

switch clone datafile all;

}

executing Memory Script

executing command: SET NEWNAME

renamed tempfile 1 to /u01/app/oradup/oradata/dupdbo1_mf_temp_bcc2hld2_.tmp in control file

cataloged datafile copy

datafile copy file name=/u01/app/oradup/oradata/dupdbo1_mf_sysaux_bcc2dp2c_.dbf RECID=1 STAMP=880393355

cataloged datafile copy

datafile copy file name=/u01/app/oradup/oradata/dupdbo1_mf_users_bcc2dp33_.dbf RECID=2 STAMP=880393355

cataloged datafile copy

datafile copy file name=/u01/app/oradup/oradata/dupdbo1_mf_new_user_bcp23qgn_.dbf RECID=3 STAMP=880393355

cataloged datafile copy

datafile copy file name=/u01/app/oradup/oradata/dupdbundotbs2.dbf RECID=4 STAMP=880393355

datafile 2 switched to datafile copy

input datafile copy RECID=1 STAMP=880393355 file name=/u01/app/oradup/oradata/dupdbo1_mf_sysaux_bcc2dp2c_.dbf

datafile 4 switched to datafile copy

input datafile copy RECID=2 STAMP=880393355 file name=/u01/app/oradup/oradata/dupdbo1_mf_users_bcc2dp33_.dbf

datafile 5 switched to datafile copy

input datafile copy RECID=3 STAMP=880393355 file name=/u01/app/oradup/oradata/dupdbo1_mf_new_user_bcp23qgn_.dbf

datafile 6 switched to datafile copy

input datafile copy RECID=4 STAMP=880393355 file name=/u01/app/oradup/oradata/dupdbundotbs2.dbf

contents of Memory Script:

{

Alter clone database open resetlogs;

}

executing Memory Script

database opened

Finished Duplicate Db at 22-MAY-15

RMAN>

RMAN>

RMAN>

RMAN> exit

Recovery Manager complete.

[[email protected] ~]$

[[email protected] ~]$

[[email protected] ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Fri May 22 17:47:11 2015

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> show parameter name

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

cell_offloadgroup_name               string

db_file_name_convert                 string      /u01/app/oracle11g/oradata/DB1

1/datafile/, /u01/app/oradup/o

radata/dupdb

db_name                              string      DUPDB

db_unique_name                       string      DUPDB

global_names                         boolean     FALSE

instance_name                        string      dupdb

lock_name_space                      string

log_file_name_convert                string      /u01/app/oracle11g/oradata/DB1

1/datafile/, /u01/app/oradup/o

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

radata/dupdb

processor_group_name                 string

service_names                        string      DUPDB

SQL> select instance_name,status from v$instance;

INSTANCE_NAME    STATUS

---------------- ------------

dupdb            OPEN

附录二,错误:

RMAN> duplicate target database to ‘dupdb‘ from active database;

Starting Duplicate Db at 22-MAY-15

using target database control file instead of recovery catalog

allocated channel: ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: SID=27 device type=DISK

contents of Memory Script:

{

sql clone "create spfile from memory";

}

executing Memory Script

sql statement: create spfile from memory

contents of Memory Script:

{

shutdown clone immediate;

startup clone nomount;

}

executing Memory Script

Oracle instance shut down

connected to auxiliary database (not started)

Oracle instance started

Total System Global Area     238034944 bytes

Fixed Size                     2227136 bytes

Variable Size                180356160 bytes

Database Buffers              50331648 bytes

Redo Buffers                   5120000 bytes

contents of Memory Script:

{

sql clone "alter system set  db_name =

‘‘DB11‘‘ comment=

‘‘Modified by RMAN duplicate‘‘ scope=spfile";

sql clone "alter system set  db_unique_name =

‘‘DUPDB‘‘ comment=

‘‘Modified by RMAN duplicate‘‘ scope=spfile";

shutdown clone immediate;

startup clone force nomount

backup as copy current controlfile auxiliary format  ‘/u01/app/oracle/oradata/dupdb/control01.ctl‘;

alter clone database mount;

}

executing Memory Script

sql statement: alter system set  db_name =  ‘‘DB11‘‘ comment= ‘‘Modified by RMAN duplicate‘‘ scope=spfile

sql statement: alter system set  db_unique_name =  ‘‘DUPDB‘‘ comment= ‘‘Modified by RMAN duplicate‘‘ scope=spfile

Oracle instance shut down

Oracle instance started

Total System Global Area     238034944 bytes

Fixed Size                     2227136 bytes

Variable Size                180356160 bytes

Database Buffers              50331648 bytes

Redo Buffers                   5120000 bytes

Starting backup at 22-MAY-15

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=39 device type=DISK

channel ORA_DISK_1: starting datafile copy

copying current control file

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

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

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

RMAN-03002: failure of Duplicate Db command at 05/22/2015 05:46:23

RMAN-05501: aborting duplication of target database

RMAN-03015: error occurred in stored script Memory Script

RMAN-03009: failure of backup command on ORA_DISK_1 channel at 05/22/2015 05:46:23

ORA-17629: Cannot connect to the remote database server

ORA-17627: ORA-12154: TNS:could not resolve the connect identifier specified

ORA-17629: Cannot connect to the remote database server

解决:

主库上也要加入tnsnames.ora中的字符串

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

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

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

RMAN-03002: failure of Duplicate Db command at 05/22/2015 06:03:11

RMAN-05501: aborting duplication of target database

RMAN-03015: error occurred in stored script Memory Script

RMAN-06136: ORACLE error from auxiliary database: ORA-00201: control file version 11.2.0.4.0 incompatible with ORACLE version 11.2.0.0.0

ORA-00202: control file: ‘/u01/app/oracle/oradata/dupdb/control01.ctl‘

数据库软件版本必须一致,至少是compatible参数是一致的

database mounted

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

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

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

RMAN-03002: failure of Duplicate Db command at 05/22/2015 17:28:46

RMAN-05501: aborting duplication of target database

RMAN-05001: auxiliary file name /u01/app/oracle11g/oradata/DB11/onlinelog/o1_mf_3_bcc2hc3t_.log conflicts with a file used by the target database

RMAN-05001: auxiliary file name /u01/app/oracle11g/oradata/DB11/onlinelog/o1_mf_2_bcc2hb1s_.log conflicts with a file used by the target database

RMAN-05001: auxiliary file name /u01/app/oracle11g/oradata/DB11/onlinelog/o1_mf_1_bcc2h8rh_.log conflicts with a file used by the target database

解决:

如果在RMAN恢复时不指定 nofilenamecheck 参数,则在数据文件相同文件名恢复时会出现RMAN-05501错误,当主库,备库的数据库文件目录是一样的时候,必须使用 nofilenamecheck参数告诉rman主库和被创建的备份库拥有一样的文件目录和文件名。

时间: 2024-11-09 02:50:33

11g新特性之active databaes duplicate的相关文章

Oracle 11g 新特性 -- Oracle Restart 说明(转载)

转载:http://blog.csdn.net/tianlesoftware/article/details/8435670 一.  OHASD 说明 Oracle 的Restart 特性是Oracle 11g里的新特性,在讲这个特性之前先看一下Oracle 11g RAC的进程.之前的Blog 有说明. Oracle 11gR2RAC 进程说明 http://blog.csdn.net/tianlesoftware/article/details/6009962 Oracle 11gR2 中对

11g新特性与12c新特性

1. 11g新特性概图 管理新特性> 开发新特性> 2. 12c 新特性概图

11g新特性-自动sql调优(Automatic SQL Tuning)

11g新特性-自动sql调优(Automatic SQL Tuning) 在Oracle 10g中,引进了自动sql调优特性.此外,ADDM也会监控捕获高负载的sql语句. 在Oracle 11g中,通过运行sql tuning advisor加强了自动sql调优功能.默认情况下是每天夜间通过自动任务的方式运行"自动sql调优". 自动sql调优的过程: 1.识别需要调优的sql语句  根据AWR中的CPU和I/O负载来识别 2.调优,生成新的sql profile 在维护窗口(mai

Oracle 11g新特性之--虚拟列(Virtual Column)

Oracle 11g新特性之--虚拟列(Virtual Column) Oracle 11G虚拟列Virtual Column介绍 Oracle 11G 在表中引入了虚拟列,虚拟列是一个表达式,在运行时计算,不存储在数据库中,不能更新虚拟列的值. 定义一个虚拟列的语法: column_name [datatype] [GENERATED ALWAYS] AS [expression] [VIRTUAL] 1.虚拟列可以用在select,update,delete语句的where条件中,但是不能用

Oracle 11g新特性invisible index(不可见的索引)

如果一张表上有十几个索引,你有什么感受?显然会拖慢增.删.改的速度,不要指望开发人员能建好索引.我的处理方法是先监控很长的一段时间,看哪些索引没有用到,然后删除.但删除以后,如果发现某一天有用,那又要重新建,如果是大表,那就有些麻烦.现在11g提供一个新特性,不可见索引,可以建索引设置为不可见索引,CBO在评估执行计划的时候会忽略它,如果需要的时候,设置回来即可. 还有一种用途,你在调试一条SQL语句,要建一个索引测试,而你不想影响其他的会话,用不可见索引正是时候. SQL> drop tabl

[转]Oracle 11g 新特性 -- SQL Plan Management 说明

一 概述 二 SQL 计划基线Plan BaseLine体系结构三 加载SQL 计划基线四 演化SQL 计划基线五 重要的基线SQL 计划属性六 SQL 计划选择七 可能的SQL 计划可管理性方案八 SQL 性能分析器和SQL 计划基准方案九 自动加载SQL 计划基线方案十 清除SQL 管理库策略 一.概述 SQL 语句的SQL 执行计划发生更改时,可能存在性能风险. SQL 计划发生更改的原因有很多,如优化程序版本.优化程序统计信息.优化程序参数.方案定义.系统设计和SQL 概要文件创建等.

[转]Oracle 11g 新特性 -- SQL Plan Management 示例

目录 一 SPM 说明 相关名词说明 SPM的特点 与profile和outline相比更加灵活的控制手段 SPM使计划真正的稳定 SPM的控制方式 SPM如何捕捉加载执行计划 自动捕捉 批量导入 执行计划的选择过程 执行计划的演化evolution 修改已有的Baseline 相关MOS 文档 二 SPM 示例 自动捕捉 手工捕获执行计划 演化SQL Plan Baselines 完整示例 修改 Plan Baselines 显示SQL Plan Baselines 设置SQL Managem

Oracle 灾难恢复以及11g新特性恢复指导

实验: 数据库灾难恢复(数据文件.控制文件.参数文件.归档文件等丢失) 法一:利用冷备 法二:RMAN恢复及11g新特性(list/advise/repair failure,create spfile from memory) 1.配置catalog数据库 1)catalog目录库:创建大文件表空间.用户.授权 create  bigfile tablespace rc_data datafile '/u01/app/oracle/oradata/ORCL/rc_data.dbf' size

Oracle 11g新特性之--Server Result Cache

Oracle 11g新特性之--Server  Result Cache 一.Server Result Cache说明 Oracle官网的说明,参考: 7.6 Managing the Server and Client  Result Caches http://docs.oracle.com/cd/E11882_01/server.112/e16638/memory.htm#BGBCABED 1.1 概述 SQL 查询结果高速缓存可在数据库内存中对查询结果集和查询碎片启用显式高速缓存.存储