版权声明:本文为博主原创文章。未经博主同意不得转载。 https://blog.csdn.net/lmocm/article/details/34435699

*.audit_file_dest='/dba/app/oracle/admin/dominic/adump'
*.audit_trail='db'
*.cluster_database=true
*.compatible='11.2.0.4.0'
*.control_files='+DATA_DISK/DOMINIC/controlfile/current.260.825093345','+LOG_DISK/DOMINIC/controlfile/current.256.825093345'
   --- DOMINIC 大写
*.db_block_size=8192
*.db_create_file_dest='+DATA_DISK'
*.db_domain=''
*.db_name='dominic'
#*.log_file_name_convert='+DATA_DISK/dominic/logfile','/u01/app/oracle/logfile','+LOG_DISK/dominic/logfile','/u01/app/oracle/oradata/dominic'
*.db_recovery_file_dest='+LOG_DISK'
*.db_recovery_file_dest_size=4558159872
*.diagnostic_dest='/dba/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=dominicXDB)'
dominic2.instance_number=2
dominic1.instance_number=1
*.log_archive_format='%t_%s_%r.dbf'
*.memory_target=1153433600
*.open_cursors=500
*.processes=300
*.remote_listener='dominic-scan:1521'
*.remote_login_passwordfile='exclusive'
*.sessions=350
dominic2.thread=2
dominic1.thread=1
dominic2.undo_tablespace='UNDOTBS2'
dominic1.undo_tablespace='UNDOTBS1'
*.undo_management='AUTO'
一 : 创建參数文件 to ASM
[oracle@dominic1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Sat Jun 21 19:04:49 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/dba/app/oracle/product/11.2/dbhome_1/dbs/initdominic1.ora'  --须要追加的路径
SQL> host
[oracle@dominic1 ~]$ cd /dba/app/oracle/product/11.2/dbhome_1/dbs/
[oracle@dominic1 dbs]$ ls
init.ora
[oracle@dominic1 dbs]$ exit
exit
SQL> create spfile='+data_disk/dominic/parameterfile/initdominic.ora' from pfile='/dba/app/oracle/backup/s_pfile';
File created.
SQL> HOST
[oracle@dominic1 ~]$ echo "SPFILE='+data_disk/dominic/parameterfile/initdominic.ora'" > /dba/app/oracle/product/11.2/dbhome_1/dbs/initdominic1.ora
[oracle@dominic1 ~]$ cat /dba/app/oracle/product/11.2/dbhome_1/dbs/initdominic1.ora
SPFILE='+data_disk/dominic/parameterfile/initdominic.ora'
[oracle@dominic1 ~]$ ssh dominic2
[oracle@dominic2 ~]$ echo "SPFILE='+data_disk/dominic/parameterfile/initdominic.ora'" > /dba/app/oracle/product/11.2/dbhome_1/dbs/initdominic2.ora
[oracle@dominic2 ~]$ cat /dba/app/oracle/product/11.2/dbhome_1/dbs/initdominic2.ora
SPFILE='+data_disk/dominic/parameterfile/initdominic.ora'
ASMCMD> pwd
+data_disk/dominic/parameterfile
ASMCMD> ls
initdominic.ora
二: 创建密码文件:
三: 创建相应的路径:
ASM : +DATA_DISK /DOMINI/datafile 、logfile、controlfile、parameterfile。
            + LOG_DISK /dominic/logfile, controlfil 等:
+++++++++++++++++++++++++++++++++++++++++++++失败++++++++++++++++++++++
RMAN> run {
2> set newname for datafile 1 to '+DATA_DISK/DOMINIC/datafile/system01.dbf';
3> set newname for datafile 2 to '+DATA_DISK/DOMINIC/datafile/undotbs01.dbf';
4> set newname for datafile 3 to '+DATA_DISK/DOMINIC/datafile/users01.dbf';
5> set newname for datafile 4 to '+DATA_DISK/DOMINIC/datafile/undotbs01.dbf';
6> set newname for datafile 5 to '+DATA_DISK/DOMINIC/datafile/example01.dbf';
7> set newname for datafile 6 to '+DATA_DISK/DOMINIC/datafile/dominic_tbs01.dbf';
8> restore database;
9> switch datafile all;
10> }
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 21-JUN-14
Starting implicit crosscheck backup at 21-JUN-14
allocated channel: ORA_DISK_1
Crosschecked 3 objects
Finished implicit crosscheck backup at 21-JUN-14
Starting implicit crosscheck copy at 21-JUN-14
using channel ORA_DISK_1
Finished implicit crosscheck copy at 21-JUN-14
searching for all files in the recovery area
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: +log_disk/dominic/controlfile/current.257.850853325
File Name: +log_disk/dominic/controlfile/current.256.850853775
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to +DATA_DISK/DOMINIC/datafile/system01.dbf
channel ORA_DISK_1: restoring datafile 00002 to +DATA_DISK/DOMINIC/datafile/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00003 to +DATA_DISK/DOMINIC/datafile/users01.dbf
channel ORA_DISK_1: restoring datafile 00004 to +DATA_DISK/DOMINIC/datafile/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00005 to +DATA_DISK/DOMINIC/datafile/example01.dbf
channel ORA_DISK_1: restoring datafile 00006 to +DATA_DISK/DOMINIC/datafile/dominic_tbs01.dbf
channel ORA_DISK_1: reading from backup piece /dba/app/rmanbak/DOMINIC_dbfull_08p9pjgn_20140601.DB
channel ORA_DISK_1: ORA-19870: error while restoring backup piece /dba/app/rmanbak/DOMINIC_dbfull_08p9pjgn_20140601.DB
ORA-19504: failed to create file "+DATA_DISK/dominic/datafile/undotbs01.dbf"
ORA-17502: ksfdcre:4 Failed to create file +DATA_DISK/dominic/datafile/undotbs01.dbf
ORA-15005: name "dominic/datafile/undotbs01.dbf" is already used by an existing alias
failover to previous backup
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/21/2014 20:29:11
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 5 found to restore   
          --上次也抱这错,好好思考一下(node asm -> rman filesys node)
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore  
RMAN-06023: no backup or copy of datafile 1 found to restore
--ASM 仅仅须要写磁盘组就可以
2、注冊备份集
RMAN> catalog start with '/dba/app/rmanbk/';
最后我改写成这样, set newname for datafile 1 to '+DATA_DISK'; 成功了,不报RMAN-6023错。 并且rman 恢复路径也依照前定义好的。

 

====================成功le 案例============================
[oracle@dominic1 rmanbak]$ rman target /
Recovery Manager: Release 11.2.0.4.0 - Production on Sat Jun 21 20:42:11 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: DOMINIC (DBID=1978806569, not open)
RMAN> run {
2> set newname for datafile 1 to '+DATA_DISK';
3> set newname for datafile 2 to '+DATA_DISK';
4> set newname for datafile 3 to '+DATA_DISK';
5> set newname for datafile 4 to '+DATA_DISK';
6> set newname for datafile 5 to '+DATA_DISK';
7> set newname for datafile 6 to '+DATA_DISK';
8> restore database;
9> switch datafile all;
10> switch tempfile all;
11> }
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 21-JUN-14
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=42 instance=dominic1 device type=DISK
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to +DATA_DISK
channel ORA_DISK_1: restoring datafile 00002 to +DATA_DISK
channel ORA_DISK_1: restoring datafile 00003 to +DATA_DISK
channel ORA_DISK_1: restoring datafile 00004 to +DATA_DISK
channel ORA_DISK_1: restoring datafile 00005 to +DATA_DISK
channel ORA_DISK_1: restoring datafile 00006 to +DATA_DISK
channel ORA_DISK_1: reading from backup piece /dba/app/rmanbak/DOMINIC_dbfull_08p9pjgn_20140601.DB
channel ORA_DISK_1: piece handle=/dba/app/rmanbak/DOMINIC_dbfull_08p9pjgn_20140601.DB tag=TAG20140601T232615
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:01:26
Finished restore at 21-JUN-14
datafile 1 switched to datafile copy
input datafile copy RECID=10 STAMP=850855528 file name=+DATA_DISK/dominic/datafile/system.263.850855443
datafile 2 switched to datafile copy
input datafile copy RECID=11 STAMP=850855529 file name=+DATA_DISK/dominic/datafile/sysaux.262.850855443
datafile 3 switched to datafile copy
input datafile copy RECID=12 STAMP=850855529 file name=+DATA_DISK/dominic/datafile/undotbs1.261.850855443
datafile 4 switched to datafile copy
input datafile copy RECID=13 STAMP=850855529 file name=+DATA_DISK/dominic/datafile/users.265.850855443
datafile 5 switched to datafile copy
input datafile copy RECID=14 STAMP=850855529 file name=+DATA_DISK/dominic/datafile/example.264.850855443
datafile 6 switched to datafile copy
input datafile copy RECID=15 STAMP=850855529 file name=+DATA_DISK/dominic/datafile/dominic_tbs.260.850855443
===================================================
ASMCMD> pwd
+data_disk/dominic/datafile
ASMCMD> ls
DOMINIC_TBS.260.850855443
EXAMPLE.264.850855443
SYSAUX.262.850855443
SYSTEM.263.850855443
UNDOTBS1.261.850855443
USERS.265.850855443
select * from v$logfile;
GROUP# STATUS TYPE MEMBER IS_
---------- ------- ------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---
  3 ONLINE /dba/app/oracle/oradata/dominic/redo03.log NO
  2 ONLINE /dba/app/oracle/oradata/dominic/redo02.log NO
  1 ONLINE /dba/app/oracle/oradata/dominic/redo01.log NO
  1 ONLINE /dba/app/oracle/redolog/redo01-a.log NO
  2 ONLINE /dba/app/oracle/redolog/redo02-a.log NO
  3 INVALID ONLINE /dba/app/oracle/redolog/redo03-a.log NO
6 rows selected.
SQL> alter database rename file '/dba/app/oracle/redolog/redo01-a.log' to '+LOG_DISK';
Database altered.
SQL> alter database rename file '/dba/app/oracle/redolog/redo02-a.log' to '+LOG_DISK';
Database altered.
SQL> alter database rename file '/dba/app/oracle/redolog/redo03-a.log' to '+LOG_DISK';
Database altered.
SQL> alter database rename file '/dba/app/oracle/oradata/dominic/redo02.log' to '+DATA_DISK';
Database altered.
SQL> alter database rename file '/dba/app/oracle/oradata/dominic/redo03.log' to '+DATA_DISK';
Database altered.
SQL> select * from v$logfile;
    GROUP# STATUS TYPE MEMBER IS_
---------- ------- ------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---
  3 ONLINE +DATA_DISK NO
  2 ONLINE +DATA_DISK NO
  1 ONLINE +DATA_DISK NO
  1 ONLINE +LOG_DISK YES
  2 ONLINE +LOG_DISK YES
  3 INVALID ONLINE +LOG_DISK YES
6 rows selected.

recover 数据库

       在运行restore的节点运行,由于备份文件在该节点上。

RMAN> recover database;

Starting recover at 21-JUN-14

using channel ORA_DISK_1

starting media recovery

unable to find archived log

archived log thread=1 sequence=11

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

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

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

RMAN-03002: failure of recover command at 06/21/2014 21:02:01

RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 11 and starting SCN of 995895

RMAN> recover database until scn 995895;

Starting recover at 21-JUN-14

using channel ORA_DISK_1

starting media recovery

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

Finished recover at 21-JUN-14

RMAN> restore archivelog all;

Starting restore at 21-JUN-14

using channel ORA_DISK_1

channel ORA_DISK_1: starting archived log restore to default destination

channel ORA_DISK_1: restoring archived log

archived log thread=1 sequence=5

channel ORA_DISK_1: restoring archived log

archived log thread=1 sequence=6

channel ORA_DISK_1: restoring archived log

archived log thread=1 sequence=7

channel ORA_DISK_1: restoring archived log

archived log thread=1 sequence=8

channel ORA_DISK_1: restoring archived log

archived log thread=1 sequence=9

channel ORA_DISK_1: restoring archived log

archived log thread=1 sequence=10

channel ORA_DISK_1: reading from backup piece /dba/app/rmanbak/DOMINIC_arch_0ap9pjij_20140601

channel ORA_DISK_1: piece handle=/dba/app/rmanbak/DOMINIC_arch_0ap9pjij_20140601 tag=TAG20140601T232715

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:03

Finished restore at 21-JUN-14

SQL> startup

ORACLE instance started.

Total System Global Area 1152450560 bytes

Fixed Size 2252584 bytes

Variable Size 855638232 bytes

Database Buffers 285212672 bytes

Redo Buffers 9347072 bytes

Database mounted.

ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

SQL> alter database open resetlogs;

Database altered.

SQL> select name,open_mode from v$database;

NAME OPEN_MODE

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

DOMINIC READ WRITE

SQL> select comp_name, version, status from sys.dba_registry;

COMP_NAME

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

VERSION STATUS

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

OWB

11.2.0.4.0 VALID

Oracle Application Express

3.2.1.00.12 VALID

Oracle Enterprise Manager

11.2.0.4.0 VALID

COMP_NAME

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

VERSION STATUS

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

OLAP Catalog

11.2.0.4.0 VALID

Spatial

11.2.0.4.0 VALID

Oracle Multimedia

11.2.0.4.0 VALID

COMP_NAME

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

VERSION STATUS

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

Oracle XML Database

11.2.0.4.0 VALID

Oracle Text

11.2.0.4.0 VALID

Oracle Expression Filter

11.2.0.4.0 VALID

COMP_NAME

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

VERSION STATUS

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

Oracle Rules Manager

11.2.0.4.0 VALID

Oracle Workspace Manager

11.2.0.4.0 VALID

Oracle Database Catalog Views

11.2.0.4.0 VALID

COMP_NAME

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

VERSION STATUS

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

Oracle Database Packages and Types

11.2.0.4.0 VALID

JServer JAVA Virtual Machine

11.2.0.4.0 VALID

Oracle XDK

11.2.0.4.0 VALID

COMP_NAME

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

VERSION STATUS

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

Oracle Database Java Packages

11.2.0.4.0 VALID

OLAP Analytic Workspace

11.2.0.4.0 VALID

Oracle OLAP API

11.2.0.4.0 VALID

18 rows selected.

SQL> select * from v$option where parameter = 'Real Application Clusters';

PARAMETER

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

VALUE

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

Real Application Clusters

TRUE

SQL> show parameter cluster

NAME TYPE VALUE

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

cluster_database boolean TRUE

cluster_database_instances integer 2

cluster_interconnects string

SQL> show parameter thread;

NAME TYPE VALUE

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

parallel_threads_per_cpu integer 2

thread integer 1

SQL> show parameter instance_number

NAME TYPE VALUE

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

instance_number integer 1

SQL> show parameter cluster_database;

NAME TYPE VALUE

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

cluster_database boolean TRUE

cluster_database_instances integer 2

SQL> show parameter cluster_database_instances

NAME TYPE VALUE

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

cluster_database_instances integer 2

创建节点2的undo 表空间

 

SYS@anqing1(rac1)> show parameter undo_tablespace

 

NAME                   TYPE        VALUE

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

undo_tablespace            string      UNDOTBS1

 

       这个是rac1上节点的信息。我们在之前的在spfile參数指定的rac2节点的undo 空间是UNDOTBS2.

       所以这里我们创建该undo 表空间,并指定相关參数。

 

SYS@dominic(rac1)> create undo tablespace UNDOTBS2 datafile '+DATA/ANQING/datafile/undotbs02.dbf' size 500m;

SQL> create undo tablespace UNDOTBS2 datafile '+DATA_DISK/DOMINIC/datafile/undotbs02.dbf' size 500m;

Tablespace created.

SQL> show parameter undo

NAME TYPE VALUE

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

undo_management string AUTO

undo_retention integer 900

undo_tablespace string UNDOTBS1

SQL> select name from v$datafile;

NAME

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

+DATA_DISK/dominic/datafile/system.263.850855443

+DATA_DISK/dominic/datafile/sysaux.262.850855443

+DATA_DISK/dominic/datafile/undotbs1.261.850855443

+DATA_DISK/dominic/datafile/users.265.850855443

+DATA_DISK/dominic/datafile/example.264.850855443

+DATA_DISK/dominic/datafile/dominic_tbs.260.850855443

+DATA_DISK/dominic/datafile/undotbs02.dbf

ASMCMD> pwd

+data_disk/dominic/datafile

ASMCMD> ls

DOMINIC_TBS.260.850855443

EXAMPLE.264.850855443

SYSAUX.262.850855443

SYSTEM.263.850855443

UNDOTBS1.261.850855443

UNDOTBS2.269.850858531

USERS.265.850855443

undotbs02.dbf

SQL> SELECT NAME FROM V$TABLESPACE;

NAME

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

SYSTEM

SYSAUX

UNDOTBS1

USERS

TEMP

EXAMPLE

DOMINIC_TBS

UNDOTBS2

加入rac2 节点的redo 文件

SQL> alter database add logfile thread 2 group 4 ('+DATA_DISK','+LOG_DISK')
SIZE 50M ;

Database altered.

SQL> alter database add logfile thread 2 group 5('+DATA_DISK','+LOG_DISK')
SIZE 50M ;

Database altered.

SQL> alter database add logfile thread 2 group 6('+DATA_DISK','+LOG_DISK')
SIZE 50M;

Database altered.

=========================

SQL> alter database add logfile thread 1 group5('+data/myrac/onlinelog/myrac1_redolog_group5_01') size 100m;
SQL> alter database add logfile member '+data/myrac/onlinelog/myrac1_redolog_group5_02' to group 5;
SQL> alter database add logfile thread 2 group 6('+data/myrac/onlinelog/myrac1_redolog_group6_01')size 100m;
SQL> alter database add logfile member '+data/myrac/onlinelog/myrac1_redolog_group6_02' to group 6;

=================================

SQL> alter database enable thread 2;

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.   ---- 重新启动节点1和节点2 上的实例。使相关參数生效

=====(一下在节点2 上)

 查看节点二 參数。添加參数 export
ORACLE_UNQNAME=dominic

 

[oracle@dominic2 ~]$ cat .bash_profile

# .bash_profile

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

 . ~/.bashrc

fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

export ORACLE_SID=dominic2

export ORACLE_UNQNAME=dominic

export ORACLE_BASE=/dba/app/oracle

export ORACLE_HOME=$ORACLE_BASE/product/11.2/dbhome_1

export PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin

export LANG=C

export LD_LIBRARY_PATH=$ORACLE_HOME/lib

umask 022

[oracle@dominic2 ~]$
sqlplus / as sysdba   --启动节点2 

SQL*Plus: Release 11.2.0.4.0 Production on Sat Jun 21 21:52:19 2014

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

Connected to an idle instance.

SQL> startup

ORACLE instance started.

Total System Global Area 1152450560 bytes

Fixed Size 2252584 bytes

Variable Size 855638232 bytes

Database Buffers 285212672 bytes

Redo Buffers 9347072 bytes

Database mounted.

Database opened.

SQL> show parameter cluster

NAME TYPE VALUE

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

cluster_database boolean TRUE

cluster_database_instances integer 2

cluster_interconnects string

SQL> select instance_number,instance_name,host_name from gv$instance;   --最后确认是否起来了!

INSTANCE_NUMBER INSTANCE_NAME HOST_NAME

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

       1 dominic1 dominic1.com

       2 dominic2 dominic2.com

到如今已经是集群了。只是另一些收尾的工作要做。

运行catclust.sql脚本来创建相关视图

SQL> @$ORACLE_HOME/rdbms/admin/catclust.sql

重建Temp 表空间

在恢复的时候,会自己主动创建TEMP 表空间。和一个前辈聊到过这个问题,他说这个temp 文件好像没有起到作用。 尤其是数据量大的时候。他建议重建加入temp 数据文件。

 这个还是小心为好,反正重建一些也不费什么事。

可是万一出问题,就是大麻烦。

SQL> select name from v$tempfile;

NAME

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

/dba/app/oracle/oradata/dominic/temp01.dbf     --两个节点一样

SQL> alter tablespace temp add tempfile '+DATA_DISK' size 400m;

Tablespace altered.

SQL> select name from v$tempfile;

NAME

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

/dba/app/oracle/oradata/dominic/temp01.dbf

+DATA_DISK/dominic/tempfile/temp.273.850859907

SQL> alter database tempfile '/dba/app/oracle/oradata/dominic/temp01.dbf' offline;

Database altered.

SQL> alter database tempfile '/dba/app/oracle/oradata/dominic/temp01.dbf' drop including datafiles;

Database altered.

 ---如今两个节点查看,都是一样的,

SQL> select name from v$tempfile;

NAME

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

+DATA_DISK/dominic/tempfile/temp.273.850859907

加入集群的监听:

之前须要确认: 

[grid@dominic2 ~]$ crs_stat -t

Name Type Target State Host

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

ora....DISK.dg ora....up.type ONLINE ONLINE dominic1

ora....ER.lsnr ora....er.type ONLINE ONLINE dominic1

ora....N1.lsnr ora....er.type ONLINE ONLINE dominic1

ora....DISK.dg ora....up.type ONLINE ONLINE dominic1

ora....DATA.dg ora....up.type ONLINE ONLINE dominic1

ora.asm ora.asm.type ONLINE ONLINE dominic1

ora.cvu ora.cvu.type ONLINE ONLINE dominic1

ora....SM1.asm application ONLINE ONLINE dominic1

ora....C1.lsnr application ONLINE ONLINE dominic1

ora....ic1.gsd application OFFLINE OFFLINE

ora....ic1.ons application ONLINE ONLINE dominic1

ora....ic1.vip ora....t1.type ONLINE ONLINE dominic1

ora....SM2.asm application ONLINE ONLINE dominic2

ora....C2.lsnr application ONLINE ONLINE dominic2

ora....ic2.gsd application OFFLINE OFFLINE

ora....ic2.ons application ONLINE ONLINE dominic2

ora....ic2.vip ora....t1.type ONLINE ONLINE dominic2

ora.gsd ora.gsd.type OFFLINE OFFLINE

ora....network ora....rk.type ONLINE ONLINE dominic1

ora.oc4j ora.oc4j.type ONLINE ONLINE dominic1

ora.ons ora.ons.type ONLINE ONLINE dominic1

ora....ry.acfs ora....fs.type ONLINE ONLINE dominic1

ora.scan1.vip ora....ip.type ONLINE ONLINE dominic1

[grid@dominic1 ~]$ crs_stat -t

Name Type Target State Host

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

ora....DISK.dg ora....up.type ONLINE ONLINE dominic1

ora....ER.lsnr ora....er.type ONLINE ONLINE dominic1

ora....N1.lsnr ora....er.type ONLINE ONLINE dominic1

ora....DISK.dg ora....up.type ONLINE ONLINE dominic1

ora....DATA.dg ora....up.type ONLINE ONLINE dominic1

ora.asm ora.asm.type ONLINE ONLINE dominic1

ora.cvu ora.cvu.type ONLINE ONLINE dominic1

ora....SM1.asm application ONLINE ONLINE dominic1

ora....C1.lsnr application ONLINE ONLINE dominic1

ora....ic1.gsd application OFFLINE OFFLINE

ora....ic1.ons application ONLINE ONLINE dominic1

ora....ic1.vip ora....t1.type ONLINE ONLINE dominic1

ora....SM2.asm application ONLINE ONLINE dominic2

ora....C2.lsnr application ONLINE ONLINE dominic2

ora....ic2.gsd application OFFLINE OFFLINE

ora....ic2.ons application ONLINE ONLINE dominic2

ora....ic2.vip ora....t1.type ONLINE ONLINE dominic2

ora.gsd ora.gsd.type OFFLINE OFFLINE

ora....network ora....rk.type ONLINE ONLINE dominic1

ora.oc4j ora.oc4j.type ONLINE ONLINE dominic1

ora.ons ora.ons.type ONLINE ONLINE dominic1

ora....ry.acfs ora....fs.type ONLINE ONLINE dominic1

ora.scan1.vip ora....ip.type ONLINE ONLINE dominic1  

将其它信息注冊到CRS里

[grid@dominic1 ~]$ srvctl add database -d dominic -o $ORACLE_HOME

[grid@dominic1 ~]$ srvctl add instance -d dominic -i dominic1 -n dominic1 (-n 为hostname, oracle,grid
用户都能够)

[grid@dominic1 ~]$ srvctl add instance -d dominic -i dominic2 -n dominic2

改动instance 和 asm 之间的依赖关系:

srvctl modify instance -d <db_unique_name> -i <SID1> -s <+ASM1>

[oracle@dominic1 ~]$ srvctl modify instance -d dominic -i dominic1 -s +ASM1

Warning:-s option has been deprecated and will be ignored.

[oracle@dominic1 ~]$ srvctl modify instance -d dominic -i dominic2 -s +ASM2

Warning:-s option has been deprecated and will be ignored.

 -----在这里算是能够完毕了:

查询验证一下:

[grid@dominic1 ~]$ crs_stat -t

Name Type Target State Host

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

ora....DISK.dg ora....up.type ONLINE ONLINE dominic1

ora....ER.lsnr ora....er.type ONLINE ONLINE dominic1

ora....N1.lsnr ora....er.type ONLINE ONLINE dominic1

ora....DISK.dg ora....up.type ONLINE ONLINE dominic1

ora....DATA.dg ora....up.type ONLINE ONLINE dominic1

ora.asm ora.asm.type ONLINE ONLINE dominic1

ora.cvu ora.cvu.type ONLINE ONLINE dominic1

ora.dominic.db ora....se.type OFFLINE OFFLINE

ora....SM1.asm application ONLINE ONLINE dominic1

ora....C1.lsnr application ONLINE ONLINE dominic1

ora....ic1.gsd application OFFLINE OFFLINE

ora....ic1.ons application ONLINE ONLINE dominic1

ora....ic1.vip ora....t1.type ONLINE ONLINE dominic1

ora....SM2.asm application ONLINE ONLINE dominic2

ora....C2.lsnr application ONLINE ONLINE dominic2

ora....ic2.gsd application OFFLINE OFFLINE

ora....ic2.ons application ONLINE ONLINE dominic2

ora....ic2.vip ora....t1.type ONLINE ONLINE dominic2

ora.gsd ora.gsd.type OFFLINE OFFLINE

ora....network ora....rk.type ONLINE ONLINE dominic1

ora.oc4j ora.oc4j.type ONLINE ONLINE dominic1

ora.ons ora.ons.type ONLINE ONLINE dominic1

ora....ry.acfs ora....fs.type ONLINE ONLINE dominic1

ora.scan1.vip ora....ip.type ONLINE ONLINE dominic1 

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

[grid@dominic1 ~]$ crsctl status resource -t

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

NAME TARGET STATE SERVER STATE_DETAILS

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

Local Resources

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

ora.DATA_DISK.dg

               ONLINE ONLINE dominic1

               ONLINE ONLINE dominic2

ora.LISTENER.lsnr

               ONLINE ONLINE dominic1

               ONLINE ONLINE dominic2

ora.LOG_DISK.dg

               ONLINE ONLINE dominic1

               ONLINE ONLINE dominic2

ora.OCR_DATA.dg

               ONLINE ONLINE dominic1

               ONLINE ONLINE dominic2

ora.asm

               ONLINE ONLINE dominic1 Started

               ONLINE ONLINE dominic2 Started

ora.gsd

               OFFLINE OFFLINE dominic1

               OFFLINE OFFLINE dominic2

ora.net1.network

               ONLINE ONLINE dominic1

               ONLINE ONLINE dominic2

ora.ons

               ONLINE ONLINE dominic1

               ONLINE ONLINE dominic2

ora.registry.acfs

               ONLINE ONLINE dominic1

               ONLINE ONLINE dominic2

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

Cluster Resources

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

ora.LISTENER_SCAN1.lsnr

      1 ONLINE ONLINE dominic1

ora.cvu

      1 ONLINE ONLINE dominic1

ora.dominic.db

      1 OFFLINE OFFLINE

      2 OFFLINE OFFLINE

ora.dominic1.vip

      1 ONLINE ONLINE dominic1

ora.dominic2.vip

      1 ONLINE ONLINE dominic2

ora.oc4j

      1 ONLINE ONLINE dominic1

ora.scan1.vip

      1 ONLINE ONLINE dominic1  

这里并没有启动,由于我们的服务是刚加入上来的,还没有同步。 我们启动一下就ok了

[grid@dominic1 ~]$ srvctl start database -d dominic

=========================(以上都在节点一操作)

node ->rman to RAC (迁移)的更多相关文章

  1. 数据迁移_老集群RAC迁移数据恢复到新集群RAC

    数据迁移_老集群RAC迁移数据恢复到新集群RAC 作者:Eric 微信:loveoracle11g 1.把老集群RAC备份的数据远程拷贝到新集群RAC [root@old-rac-node1 ~]# ...

  2. Rman实现数据库迁移

    Rman实现数据库迁移(从库A迁移到库B)环境:服务器A:Oracle10g+AS3服务器B:Oracle10g+AS4准备工作: 1 在数据库B上建立与库A相同的目录结构(若由于磁盘空间等原因可以用 ...

  3. Oracle常用脚本——通过RMAN配置RAC环境的分布式磁带机

    RAC的两个节点:node1,node2 RAC的两个实例:dbrac1,dbrac2 用户,密码的东西大家看看就懂了.设置成8能通道的. #!/bin/bash rman target / < ...

  4. Node.js 指南(迁移到安全的Buffer构造函数)

    迁移到安全的Buffer构造函数 移植到Buffer.from()/Buffer.alloc() API. 概述 本指南介绍了如何迁移到安全的Buffer构造函数方法,迁移修复了以下弃用警告: 由于安 ...

  5. oracle 11g rac for linux add node (oracle 11g rac 节点添加)

    说明: Adding Oracle RAC to Nodes with Oracle Clusterware Installed步骤来自ORACLE 官方文档: https://docs.oracle ...

  6. RAC迁移至单机考虑几大因素

    数据库迁移几大因素 1. 停机时间 2. 源端,目标端 操作系统平台,版本,对应的数据库版本 3. 数据量 4. 外界因素,存储空间,网络等

  7. oracle11g 在azure云中使用rman进行实例迁移

    1,開始备份 备份脚本rman_full_backup.sh内容例如以下: #!/bin/sh export DATE=`date +%F` export BACK_DIR='/backupdisk/ ...

  8. Oracle 11G RAC For ASM 利用RMAN COPY进行存储迁移

    转载请注明出处 一.需求背景 客户数据库存储空间接近存满,需购置一台新的存储,进行数据迁移,客户允许少量停机时间. 二.实施方法讨论 利用ASM rebalance 进行迁移 可以实现0宕机进行迁移, ...

  9. 2级迁移类Q201-Oracle RAC 到单机RMAN迁移(同字节序)非公

    项目文档引子系列是根据项目原型,制作的测试实验文档,目的是为了提升项目过程中的实际动手能力,打造精品文档AskScuti. 项目文档引子系列目前不对外发布,仅作为博客记录.如学员在实际工作过程中需提前 ...

随机推荐

  1. BBbacktrace installation

    1: get the installation package https://backtrackbb.readthedocs.io/en/latest/Method.html#overview ht ...

  2. SharePoint Framework 在Visual Studio Code中调试你的托管解决方案

    博客地址:http://blog.csdn.net/FoxDave 上一篇介绍了如何在本地调试你的SharePoint Framework解决方案,本篇介绍如何调试你的SharePoint Onl ...

  3. 强化学习10-Deep Q Learning-fix target

    针对 Deep Q Learning 可能无法收敛的问题,这里提出了一种  fix target 的方法,就是冻结现实神经网络,延时更新参数. 这个方法的初衷是这样的: 1. 之前我们每个(批)记忆都 ...

  4. POJ 2407 Relatives(欧拉函数入门题)

    Relatives Given n, a positive integer, how many positive integers less than n are relatively prime t ...

  5. html 相对路径 问题

    在jsp跳转servlet和servlet跳转jsp过程中,因为servlet和jsp在不同的目录下,所以直接跳转失败.下面是查阅网上的资料,简单的总结下相对路径的问题. 这种情况下index.jsp ...

  6. Vuejs 用$emit 与 $on 来进行兄弟组件之间的数据传输

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  7. error_log

    对于我们做php开发的人员,上了生产环境,一定要把相关debug,display_errors错误提示等关掉.谁还难免不犯个错呢?这样能防止非致命性报错下,导致项目路径.数据库等信息泄漏. 问:那么问 ...

  8. for&while循环

    流程控制: 1. if 2. while 3. for if判断 什么是if判断 判断一个条件成立则做...不成了则做... 为何要有if判断 让计算机像人一样具有判断的能力 什么是循环 循环指的是一 ...

  9. scrapy-CrawlSpider的rules使用规则

    1.allow设置规则的方法:要能够限制在我们想要的url上面.不要跟其他的url产生相同的正则表达式即可: 2.什么情况下使用follow:如果在爬取页面的时候,需要将满足当前条件的url再进行跟进 ...

  10. 【转】C++四种类型转换方式

    C++四种类型转换方式 https://blog.csdn.net/lv_amelia/article/details/79483579 C风格的强制类型转换(Type Case)很简单,不管什么类型 ...