ITPub博客

首页 > Linux操作系统 > Linux操作系统 > oracle11g2 RAC+GRID+ASM 搭建 Data Guard

oracle11g2 RAC+GRID+ASM 搭建 Data Guard

原创 Linux操作系统 作者:deitylee 时间:2012-05-18 18:52:28 0 删除 编辑

一、  配置环境

1.主机环境

数据库:Oracle 11g2 RAC+ASM+GRID(RAC三节点)

主机名称

ip

private ip

virtual ip

db_name

instance

rac-scan

racnode1

10.95.7.45

192.168.1.100

10.95.7.122

ora11g

ora11g1

10.95.7.118

racnode2

10.95.7.46

192.168.1.200

10.95.7.133

ora11g2

racnode3

10.95.7.47

192.168.1.150

10.95.7.144

ora11g3

操作系统:Oracle Linux 5.8

   2.备机环境

  数据库:Oracle 11g单实例

主机名称

ip

db_name

instance

racnode4

10.95.7.49

orcl

orcl

操作系统:Oracle Linux 5.8

二、  配置步骤

1.    配置/etc/hosts文件(在所有主機配置)

#eth0 Public

10.95.7.45  racnode1

10.95.7.46  racnode2

10.95.7.47  racnode3

10.95.7.49  racnode4

#eth1 Private

192.168.1.100  racnode1-priv

192.168.1.200  racnode2-priv

192.168.1.150  racnode3-priv

#Virtual

10.95.7.122  racnode1-vip

10.95.7.133  racnode2-vip

10.95.7.144  racnode3-vip

10.95.7.118  rac-scan

2.檢查主機數據庫(RAC)環境

09:29:19 SYS@ora11g1>archive log list

Database log mode            Archive Mode

Automatic archival             Enabled

Archive destination            +ASM_DATA/ora11g/datafile/archive

Oldest online log sequence       113

Next log sequence to archive     114

Current log sequence           114

09:29:25 SYS@ora11g1>alter database FORCE LOGGING;

Database altered.

09:30:43 SYS@ora11g1>select FORCE_LOGGING from v$database;

 

FORCE_

------

YES

2.     配置主機數據庫tnsnames.ora(/u01/app/11.2.0/grid/network/admin/tnsnames.ora)

注意每個rac節點都需配置.

 

ora11g1=

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.95.7.45)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = ora11g)

      (SERVICE_NAME = ora11g1)

    )

  )

ora11g2=

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.95.7.46)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = ora11g)

      (SERVICE_NAME = ora11g2)

    )

  )

ora11g3=

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.95.7.47)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = ora11g)

      (SERVICE_NAME = ora11g3)

    )

  )

 

orcl=

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.95.7.49)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = orcl)

    )

  )

 

3.     配置備機listener.ora(/u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora)

SID_LIST_LISTENER =

  (SID_LIST =

     (SID_DESC =

      (GLOBAL_DBNAME = orcl)

      (ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)

      (SID_NAME = orcl)

    )

     (SID_DESC =

      (GLOBAL_DBNAME = PLSExtProc)

      (ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)

      (SID_NAME = PLSExtProc)

    )

)

 

LISTENER =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.95.7.49)(PORT = 1521))

      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))

    )

  )

4.      配置主機(RAC)數據庫參數

1).修改系統參數可以使用alter system set 語句逐個修改

2).還可以通過pfile直接修改,然后使用修改后的pfile啟動數據庫.

pfile生產語句:  create pfile=’/tmp/pfile’from spfile;

下面藍色部分是需要添加的參數,請根據實際情況修改

ora11g2.__db_cache_size=125829120

ora11g3.__db_cache_size=104857600

ora11g1.__db_cache_size=75497472

ora11g3.__java_pool_size=4194304

ora11g2.__java_pool_size=4194304

ora11g1.__java_pool_size=4194304

ora11g3.__large_pool_size=4194304

ora11g2.__large_pool_size=4194304

ora11g1.__large_pool_size=4194304

ora11g1.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment

ora11g2.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment

ora11g3.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment

ora11g2.__pga_aggregate_target=272629760

ora11g3.__pga_aggregate_target=293601280

ora11g1.__pga_aggregate_target=322961408

ora11g2.__sga_target=364904448

ora11g3.__sga_target=343932928

ora11g1.__sga_target=314572800

ora11g3.__shared_io_pool_size=0

ora11g2.__shared_io_pool_size=0

ora11g1.__shared_io_pool_size=0

ora11g3.__shared_pool_size=222298112

ora11g2.__shared_pool_size=222298112

ora11g1.__shared_pool_size=222298112

ora11g3.__streams_pool_size=0

ora11g2.__streams_pool_size=0

ora11g1.__streams_pool_size=0

*.audit_file_dest='/u01/app/oracle/admin/ora11g/adump'

*.audit_trail='db'

*.cluster_database=true

*.compatible='11.2.0.0.0'

*.control_files='+ASM_DATA/ora11g/controlfile/current.260.778918681','+ASM_FRA/ora11g/controlfile/current.256.778918681'

*.db_block_size=8192

*.db_create_file_dest='+ASM_DATA'

*.db_domain=''

*.db_name='ora11g'

*.db_recovery_file_dest_size=5242880000

*.db_recovery_file_dest='+ASM_FRA'

*.diagnostic_dest='/u01/app/oracle'

*.dispatchers='(PROTOCOL=TCP) (SERVICE=ora11gXDB)'

ora11g2.instance_number=2

ora11g1.instance_number=1

ora11g3.instance_number=3

*.db_file_name_convert='/u01/app/oracle/oradata/orcl','+ASM_DATA/ora11g/datafile','/u01/app/oracle/oradata/orcl','+ASM_DATA/ora11g/tempfile'

*.fal_client='ORA11G1'

*.fal_server='ORCL'

*.log_archive_config='dg_config=(ora11g,orcl)'

*.log_archive_dest_1='LOCATION=+ASM_DATA/ora11g/datafile/archive valid_for=(all_logfiles,all_roles) db_unique_name=ora11g'

*.log_archive_dest_2='service=orcl async valid_for=(online_logfiles,primary_role) db_unique_name=orcl'

*.log_archive_dest_state_1='ENABLE'

*.log_archive_dest_state_2='ENABLE'

*.service_names='ORA11G_S'

*.standby_archive_dest='/u01/app/oracle/flash_recovery_area/ORCL/archivelog'

*.standby_file_management='AUTO'

*.log_file_name_convert='/u01/app/oracle/flash_recovery_area/ORCL/onlinelog','+ASM_DATA/ORA11G/ONLINELOG'

*.log_archive_start=TRUE

*.memory_target=637534208

*.open_cursors=300

*.processes=150

*.remote_listener='rac-scan:1521'

*.remote_login_passwordfile='exclusive'

ora11g2.thread=2

ora11g1.thread=1

ora11g3.thread=3

ora11g1.undo_tablespace='UNDOTBS1'

ora11g2.undo_tablespace='UNDOTBS2'

ora11g3.undo_tablespace='UNDOTBS3'

5.      配置備機數據庫(standby)參數

修改藍色部分參數

orcl.__db_cache_size=167772160

orcl.__java_pool_size=4194304

orcl.__large_pool_size=4194304

orcl.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment

orcl.__pga_aggregate_target=239075328

orcl.__sga_target=444596224

orcl.__shared_io_pool_size=0

orcl.__shared_pool_size=260046848

orcl.__streams_pool_size=0

*.audit_file_dest='/u01/app/oracle/admin/orcl/adump'

*.audit_trail='db'

*.compatible='11.2.0.0.0'

*.control_files='/u01/app/oracle/oradata/orcl/control01.ctl','/u01/app/oracle/flash_recovery_area/orcl/control02.ctl'

*.db_block_size=8192

*.db_domain=''

*.db_name='ora11g'

*.db_unique_name='orcl'

*.service_names='orcl'

*.LOG_ARCHIVE_CONFIG='DG_CONFIG=(orcl,ora11g)'

*.log_archive_dest_1='LOCATION=/u01/app/oracle/flash_recovery_area/ORCL/archivelog valid_for=(all_logfiles,all_roles) db_unique_name=orcl'

*.log_archive_dest_2='service=ora11g1 LGWR VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=ora11g'

*.STANDBY_FILE_MANAGEMENT='AUTO'

*.FAL_SERVER='ora11g1','ora11g2','orac11g3'

*.fal_client='orcl'

*.db_file_name_convert='+ASM_DATA/ora11g/datafile','/u01/app/oracle/oradata/orcl','+ASM_DATA/ora11g/tempfile','/u01/app/oracle/oradata/orcl'

*.log_file_name_convert='+ASM_DATA/ORA11G/ONLINELOG','/u01/app/oracle/flash_recovery_area/ORCL/onlinelog','+ASM_FRA/ora11g/onlinelog/','/u01/app/oracle/flash_recovery_area/ORCL/onlinelog'

*.undo_management='AUTO'

*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'

*.db_recovery_file_dest_size=4039114752

*.diagnostic_dest='/u01/app/oracle'

*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'

*.memory_target=682622976

*.open_cursors=300

*.processes=150

*.remote_login_passwordfile='EXCLUSIVE'

*.undo_tablespace='UNDOTBS1'

6.     對主機RAC數據庫進行備份

[oracle@racnode1 tmp]$ rman target /

Recovery Manager: Release 11.2.0.1.0 - Production on 琍戳き 5 18 10:14:56 2012

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

connected to target database: ORA11G (DBID=4175118808)

RMAN> show all;

using target database control file instead of recovery catalog

RMAN configuration parameters for database with db_unique_name ORA11G are:

CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default

CONFIGURE BACKUP OPTIMIZATION OFF; # default

CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default

CONFIGURE CONTROLFILE AUTOBACKUP ON;

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default

CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '/tmp/%t';

CONFIGURE MAXSETSIZE TO UNLIMITED; # default

CONFIGURE ENCRYPTION FOR DATABASE OFF; # default

CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default

CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default

CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;

CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/db_1/dbs/snapcf_ora11g1.f'; # default

 

RMAN> backup database;

 

Starting backup at 18-5 -12

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=63 instance=ora11g1 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=00002 name=+ASM_DATA/ora11g/datafile/sysaux.257.778918547

input datafile file number=00001 name=+ASM_DATA/ora11g/datafile/system.256.778918545

input datafile file number=00003 name=+ASM_DATA/ora11g/datafile/undotbs1.258.778918547

input datafile file number=00005 name=+ASM_DATA/ora11g/datafile/example.264.778918693

input datafile file number=00006 name=+ASM_DATA/ora11g/datafile/undotbs2.265.778918775

input datafile file number=00008 name=+ASM_DATA/ora11g/datafile/undotbs3.270.779963697

input datafile file number=00004 name=+ASM_DATA/ora11g/datafile/users.259.778918547

channel ORA_DISK_1: starting piece 1 at 18-5 -12

channel ORA_DISK_1: finished piece 1 at 18-5 -12

piece handle=/tmp/783598509 tag=TAG20120518T101509 comment=NONE

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

Finished backup at 18-5 -12

Starting Control File and SPFILE Autobackup at 18-5 -12

piece handle=+ASM_FRA/ora11g/autobackup/2012_05_18/s_783598565.353.783598567 comment=NONE

Finished Control File and SPFILE Autobackup at 18-5 -12

RMAN-08591: WARNING: invalid archived log deletion policy

7.     將備份傳送到備機同一目錄下

 [oracle@racnode1 tmp]$ scp 783598509   racnode4:/tmp/

oracle@racnode4's password:

783598509                                                  100% 1605MB  24.3MB/s   01:06

8.     創建備機控制文件

10:27:38 SYS@ora11g1>alter system archive log current;

System altered.

10:28:02 SYS@ora11g1>/

System altered.

10:28:16 SYS@ora11g1>alter database create standby controlfile as '/tmp/control.ctl';

Database altered.

然后把control.ctl復制到備機的控制文件目錄下

[oracle@racnode1 tmp]$ scp /tmp/control.ctl    racnode4: /u01/app/oracle/oradata/orcl/control01.ctl

oracle@racnode4's password:

/tmp/control.ctl                                                  100% 1605kB  24.3MB/s   00:02

[oracle@racnode1 tmp]$ scp /tmp/control.ctl    racnode4: /u01/app/oracle/flash_recovery_area/orcl/ control02.ctl

oracle@racnode4's password:

/tmp/control.ctl                                                  100% 1605kB  24.3MB/s   00:02

 

9.     啟動備機到nomount狀態

SQL> startup nomount pfile='/tmp/pfile';

ORACLE instance started.

Total System Global Area  682135552 bytes

Fixed Size                  1338700 bytes

Variable Size             507511476 bytes

Database Buffers          167772160 bytes

Redo Buffers                5513216 bytes

10.              在主機數據上創建standby數據庫

[oracle@racnode1 ~]$ rman target / auxiliary sys/lsq@orcl

Recovery Manager: Release 11.2.0.1.0 - Production on 琍戳? 5 17 14:06:52 2012

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

connected to target database: ORA11G (DBID=4175118808)

connected to auxiliary database: ORA11G (not mounted)

RMAN> show all;

using target database control file instead of recovery catalog

RMAN configuration parameters for database with db_unique_name ORA11G are:

CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default

CONFIGURE BACKUP OPTIMIZATION OFF; # default

CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default

CONFIGURE CONTROLFILE AUTOBACKUP ON;

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default

CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '/tmp/%t';

CONFIGURE MAXSETSIZE TO UNLIMITED; # default

CONFIGURE ENCRYPTION FOR DATABASE OFF; # default

CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default

CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default

CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;

CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/db_1/dbs/snapcf_ora11g1.f'; # default

RMAN> duplicate target database for standby;

Starting Duplicate Db at 17-5 -12

allocated channel: ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: SID=20 device type=DISK

 

contents of Memory Script.:

{

   restore clone standby controlfile;

}

executing Memory Script

Starting restore at 17-5 -12

using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: restoring control file

channel ORA_AUX_DISK_1: copied control file copy

input file name=/tmp/standby.ctl

output file name=/u01/app/oracle/oradata/orcl/control01.ctl

output file name=/u01/app/oracle/flash_recovery_area/orcl/control02.ctl

Finished restore at 17-5 -12

 

contents of Memory Script.:

{

   sql clone 'alter database mount standby database';

}

executing Memory Script

 

sql statement: alter database mount standby database

 

contents of Memory Script.:

{

   set newname for tempfile  1 to

 "/u01/app/oracle/oradata/orcl/temp.263.778918687";

   switch clone tempfile all;

   set newname for datafile  1 to

 "/u01/app/oracle/oradata/orcl/system.256.778918545";

   set newname for datafile  2 to

 "/u01/app/oracle/oradata/orcl/sysaux.257.778918547";

   set newname for datafile  3 to

 "/u01/app/oracle/oradata/orcl/undotbs1.258.778918547";

   set newname for datafile  4 to

 "/u01/app/oracle/oradata/orcl/users.259.778918547";

   set newname for datafile  5 to

 "/u01/app/oracle/oradata/orcl/example.264.778918693";

   set newname for datafile  6 to

 "/u01/app/oracle/oradata/orcl/undotbs2.265.778918775";

   set newname for datafile  8 to

 "/u01/app/oracle/oradata/orcl/undotbs3.270.779963697";

   restore

   clone database

   ;

}

executing Memory Script

executing command: SET NEWNAME

renamed tempfile 1 to /u01/app/oracle/oradata/orcl/temp.263.778918687 in control file

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 17-5 -12

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 /u01/app/oracle/oradata/orcl/system.256.778918545

channel ORA_AUX_DISK_1: restoring datafile 00002 to /u01/app/oracle/oradata/orcl/sysaux.257.778918547

channel ORA_AUX_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/orcl/undotbs1.258.778918547

channel ORA_AUX_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/orcl/users.259.778918547

channel ORA_AUX_DISK_1: restoring datafile 00005 to /u01/app/oracle/oradata/orcl/example.264.778918693

channel ORA_AUX_DISK_1: restoring datafile 00006 to /u01/app/oracle/oradata/orcl/undotbs2.265.778918775

channel ORA_AUX_DISK_1: restoring datafile 00008 to /u01/app/oracle/oradata/orcl/undotbs3.270.779963697

channel ORA_AUX_DISK_1: reading from backup piece /tmp/783512275

channel ORA_AUX_DISK_1: piece handle=/tmp/783512275 tag=TAG20120517T101755

channel ORA_AUX_DISK_1: restored backup piece 1

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

Finished restore at 17-5 -12

contents of Memory Script.:

{

   switch clone datafile all;

}

executing Memory Script

datafile 1 switched to datafile copy

input datafile copy RECID=4 STAMP=783526318 file name=/u01/app/oracle/oradata/orcl/system.256.778918545

datafile 2 switched to datafile copy

input datafile copy RECID=5 STAMP=783526318 file name=/u01/app/oracle/oradata/orcl/sysaux.257.778918547

datafile 3 switched to datafile copy

input datafile copy RECID=6 STAMP=783526319 file name=/u01/app/oracle/oradata/orcl/undotbs1.258.778918547

datafile 4 switched to datafile copy

input datafile copy RECID=7 STAMP=783526319 file name=/u01/app/oracle/oradata/orcl/users.259.778918547

datafile 5 switched to datafile copy

input datafile copy RECID=8 STAMP=783526319 file name=/u01/app/oracle/oradata/orcl/example.264.778918693

datafile 6 switched to datafile copy

input datafile copy RECID=9 STAMP=783526319 file name=/u01/app/oracle/oradata/orcl/undotbs2.265.778918775

datafile 8 switched to datafile copy

input datafile copy RECID=10 STAMP=783526319 file name=/u01/app/oracle/oradata/orcl/undotbs3.270.779963697

Finished Duplicate Db at 17-5 -12

11.              打開備機數據庫(standby)為只讀

開始同步

SQL> alter database recover managed standby database disconnect from session;

Database altered.

SQL> select max(sequence#) from v$archived_log;

MAX(SEQUENCE#)

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

           112

取消同步

SQL> alter database recover managed standby database cancel;

Database altered.

SQL> alter database open read only;

Database altered.

至此Data Guard 已經配置成功,其他功能待進一步測試.

 

三、  參數說明

COMPATIBLE  資料庫版本號,主庫與從庫要統一,否則有可能redo的資料不能從主庫傳送到從庫。
DB_FILE_NAME_CONVERT 主庫資料檔案地址,從庫資料檔案地址,必須成對出現

用於主從庫在同一台機器上或主從庫資料檔案的路徑不一致的情況下
DB_UNIQUE_NAME
   資料庫的唯一名稱
FAL_CLIENT
          指向從庫的服務名
FAL_SERVER
         指向主庫的服務名
LOG_ARCHIVE_CONFIG='DG_CONFIG=(
主庫的db_unique_name,從庫的db_unique_name)'
LOG_ARCHIVE_DEST_n:
日誌歸檔的位址,最少需要兩個,一個指向主庫,另一個指向從庫
LOG_ARCHIVE_DEST_STATE_n ={ENABLE|DEFER|ALTERNATE|RESET}
指定:enable or disable來決定是否傳輸redo的資料到從庫中。
LOG_FILE_NAME_CONVERT:
DB_FILE_NAME_CONVERT
STANDBY_ARCHIVE_DEST:
指定路徑存放接收從主庫傳輸過來的歸檔日誌。
STANDBY_FILE_MANAGEMENT={AUTO|MANUAL} :AUTO
當主庫添加或減少資料檔案時會自動同步從庫而不需要手動干預。

四、  遇到錯誤整理

1.       rman連接錯誤

[oracle@racnode1 ~]$ rman target / auxiliary sys/lsq1983@orcl

Recovery Manager: Release 11.2.0.1.0 - Production on 琍戳? 5 15 11:33:46 2012

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

connected to target database: ORA11G (DBID=4175118808)

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

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

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

RMAN-00554: initialization of internal recovery manager package failed

RMAN-04006: error from auxiliary database: ORA-01031: insufficient privileges

解決方法:  提示說明對資料沒有鏈接權限

        orcl資料庫開啟正常,檢查監聽,listener.ora設置完成后沒有重啟監聽

[oracle@racnode4 ~]$ lsnrctl

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 18-MAY-2012 11:33:10

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> stop

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.95.7.49)(PORT=1521)))

The command completed successfully

LSNRCTL> start

Starting /u01/app/oracle/product/11.2.0/db_1/bin/tnslsnr: please wait...

 

TNSLSNR for Linux: Version 11.2.0.1.0 - Production

System parameter file is /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora

Log messages written to /u01/app/oracle/diag/tnslsnr/racnode4/listener/alert/log.xml

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.95.7.49)(PORT=1521)))

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))

 

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.95.7.49)(PORT=1521)))

STATUS of the LISTENER

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

Alias                     LISTENER

Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production

Start Date                18-MAY-2012 11:33:19

Uptime                    0 days 0 hr. 0 min. 0 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora

Listener Log File         /u01/app/oracle/diag/tnslsnr/racnode4/listener/alert/log.xml

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.95.7.49)(PORT=1521)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))

Services Summary...

Service "PLSExtProc" has 1 instance(s).

  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...

Service "orcl" has 1 instance(s).

  Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...

The command completed successfully

2.      alter database open read only 備機數據庫(standby)時報錯

SQL> alter database open read only;

alter database open read only

*

ERROR at line 1:

ORA-10458: standby database requires recovery

ORA-01152: file 1 was not restored from a sufficiently old backup

ORA-01110: data file 1: '/u01/app/oracle/oradata/orcl/system.256.778918545'

         解決方法:這個問題很糾結,提示錯誤說明沒有恢復使用的文件.最后反復測試總結一下可能產生的問題的原因.

         (1).備機數據庫與主機數據庫資庫之間是否可以互相連接,可以測試.

         (2).在做duplicate target database for standby;時一定要先把主機數據庫上的備份傳送到備機同目錄下面,此作業會使用到.

         (3).主機備份完成后生成standby.ctl(備機控制文件),確定把此文件覆蓋原備機數據庫的控制文件.

         (4).確定備機數據庫文件及日志文件參數放置位置沒有問題.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/16381228/viewspace-730181/,如需转载,请注明出处,否则将追究法律责任。

上一篇: ORA-00257處理方法
请登录后发表评论 登录
全部评论

注册时间:2011-10-27

  • 博文量
    74
  • 访问量
    358914