10.2.0.5升级迁移11.2.0.4(rman+dbua)(同平台异机恢复升级)

在10g软件服务器进行升级检查
[oracle@rac1 admin]$ scp utlu112i.sql 192.168.56.11:/home/oracle
-检查SYS与SYSTEM重复对象 
SQL> select object_name, object_type
  2  from dba_objects
  3  where object_name||object_type in
  4     (select object_name||object_type
  5      from dba_objects
  6      where owner = 'SYS')
  7  and owner = 'SYSTEM';
AQ$_SCHEDULES                  TABLE
AQ$_SCHEDULES_PRIMARY          INDEX
DBMS_REPCAT_AUTH               PACKAGE
DBMS_REPCAT_AUTH               PACKAGE BODY


SQL> select 'DROP ' || object_type || ' SYSTEM.' || object_name || ';'
  2  from dba_objects
  3  where object_name||object_type in
  4     (select object_name||object_type
  5      from dba_objects
  6      where owner = 'SYS')
  7  and owner = 'SYSTEM';
DROP TABLE SYSTEM.AQ$_SCHEDULES;
DROP INDEX SYSTEM.AQ$_SCHEDULES_PRIMARY;
DROP PACKAGE SYSTEM.DBMS_REPCAT_AUTH;
DROP PACKAGE BODY SYSTEM.DBMS_REPCAT_AUTH;
-----这四个不删除

检查失效组件
SQL> select substr(comp_name,1,40) comp_name, status, substr(version,1,10) version from dba_registry order by comp_name; 
JServer JAVA Virtual Machine             VALID       10.2.0.5.0
Oracle Database Catalog Views            VALID       10.2.0.5.0
Oracle Database Java Packages            VALID       10.2.0.5.0
Oracle Database Packages and Types       VALID       10.2.0.5.0
Oracle Expression Filter                 VALID       10.2.0.5.0
Oracle Real Application Clusters         VALID       10.2.0.5.0
Oracle Rules Manager                     VALID       10.2.0.5.0
Oracle Workspace Manager                 VALID       10.2.0.5.0
Oracle XDK                               VALID       10.2.0.5.0
Oracle XML Database                      VALID       10.2.0.5.0
Oracle interMedia                        VALID       10.2.0.5.0

--检查失效对象
SQL> select substr(object_name,1,40) object_name,substr(owner,1,15) owner,object_type from dba_objects where status='I' order by owner,object_type;

重新编译失效对象
SQL> @?/rdbms/admin/utlrp.sql

SQL> @/home/oracle/utlu112i.sql
Oracle Database 11.2 Pre-Upgrade Information Tool 12-01-2018 14:22:08
Script Version: 11.2.0.4.0 Build: 001
.
**********************************************************************
Database:
**********************************************************************
--> name:          RAC10
--> version:       10.2.0.5.0
--> compatible:    10.2.0.5.0
--> blocksize:     8192
--> platform:      Linux x86 64-bit
--> timezone file: V4
.
**********************************************************************
Tablespaces: [make adjustments in the current environment]
**********************************************************************
--> SYSTEM tablespace is adequate for the upgrade.
.... minimum required size: 763 MB
--> UNDOTBS1 tablespace is adequate for the upgrade.
.... minimum required size: 400 MB
--> SYSAUX tablespace is adequate for the upgrade.
.... minimum required size: 448 MB
--> TEMP tablespace is adequate for the upgrade.
.... minimum required size: 60 MB
.
**********************************************************************
Flashback: OFF
**********************************************************************
**********************************************************************
Update Parameters: [Update Oracle Database 11.2 init.ora or spfile]
Note: Pre-upgrade tool was run on a lower version 64-bit database.
**********************************************************************
--> If Target Oracle is 32-Bit, refer here for Update Parameters:
-- No update parameter changes are required.
.

--> If Target Oracle is 64-Bit, refer here for Update Parameters:
WARNING: --> "sga_target" needs to be increased to at least 596 MB
.
**********************************************************************
Renamed Parameters: [Update Oracle Database 11.2 init.ora or spfile]
**********************************************************************
-- No renamed parameters found. No changes are required.
.
**********************************************************************
Obsolete/Deprecated Parameters: [Update Oracle Database 11.2 init.ora or spfile]
**********************************************************************
--> background_dump_dest         11.1       DEPRECATED   replaced by  "diagnostic_dest"
--> user_dump_dest               11.1       DEPRECATED   replaced by  "diagnostic_dest"
.

**********************************************************************
Components: [The following database components will be upgraded or installed]
**********************************************************************
--> Oracle Catalog Views         [upgrade]  VALID
--> Oracle Packages and Types    [upgrade]  VALID
--> JServer JAVA Virtual Machine [upgrade]  VALID
--> Oracle XDK for Java          [upgrade]  VALID
--> Real Application Clusters    [upgrade]  VALID
--> Oracle Workspace Manager     [upgrade]  VALID
--> Oracle XML Database          [upgrade]  VALID
--> Oracle Java Packages         [upgrade]  VALID
--> Oracle interMedia            [upgrade]  VALID
--> Expression Filter            [upgrade]  VALID
--> Rule Manager                 [upgrade]  VALID
.
**********************************************************************
Miscellaneous Warnings
**********************************************************************
WARNING: --> The "cluster_database" parameter is currently "TRUE"
.... and must be set to "FALSE" prior to running a manual upgrade.
---恢复出参数文件更改
WARNING: --> Database is using a timezone file older than version 14.
.... After the release migration, it is recommended that DBMS_DST package
.... be used to upgrade the 10.2.0.5.0 database timezone version
.... to the latest version which comes with the new release.
WARNING: --> Your recycle bin is turned on and currently contains no objects.
---上传脚本到11g服务器
.... Because it is REQUIRED that the recycle bin be empty prior to upgrading
.... and your recycle bin is turned on, you may need to execute the command:
        PURGE DBA_RECYCLEBIN
.... prior to executing your upgrade to confirm the recycle bin is empty.
.
**********************************************************************
Recommendations
**********************************************************************
Oracle recommends gathering dictionary statistics prior to
upgrading the database.
To gather dictionary statistics execute the following command
while connected as SYSDBA:

    EXECUTE dbms_stats.gather_dictionary_stats;

**********************************************************************
Oracle recommends reviewing any defined events prior to upgrading.

To view existing non-default events execute the following commands
while connected AS SYSDBA:
  Events:
    SELECT (translate(value,chr(13)||chr(10),' ')) FROM sys.v$parameter2
      WHERE  UPPER(name) ='EVENT' AND  isdefault='FALSE'

  Trace Events:
    SELECT (translate(value,chr(13)||chr(10),' ')) from sys.v$parameter2
      WHERE UPPER(name) = '_TRACE_EVENTS' AND isdefault='FALSE'

Changes will need to be made in the init.ora or spfile.

**********************************************************************
SQL> EXECUTE dbms_stats.gather_dictionary_stats;
SQL> PURGE DBA_RECYCLEBIN;
SQL> SELECT (translate(value,chr(13)||chr(10),' ')) FROM sys.v$parameter2
  2        WHERE  UPPER(name) ='EVENT' AND  isdefault='FALSE';

no rows selected
SQL> SELECT (translate(value,chr(13)||chr(10),' ')) from sys.v$parameter2
  2        WHERE UPPER(name) = '_TRACE_EVENTS' AND isdefault='FALSE';

no rows selected

SQL>  select TZ_VERSION from registry$database;

TZ_VERSION
----------
         4

[oracle@rac101 oracle]$ mkdir backup
10g全库备份

RMAN> run{
2> backup as compressed backupset database format '/u01/app/oracle/backup/dbf_%d_%T_%u_%p_%c';
3> sql 'alter system archive log current';
4> backup as compressed backupset  format '/u01/app/oracle/backup/arc_%e_%h_%d_%T_%u_%p_%c' archivelog all;
5> backup current controlfile format '/u01/app/oracle/backup/control_%d_%T_%u_%p_%c';
6> backup spfile format '/u01/app/oracle/backup/spfile_%d_%T_%u_%p_%c';
7> }

Starting backup at 01-DEC-18
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=152 instance=rac101 devtype=DISK
channel ORA_DISK_1: starting compressed full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=+DATA/rac10/datafile/system.259.993580769
input datafile fno=00002 name=+DATA/rac10/datafile/undotbs1.260.993580771
input datafile fno=00004 name=+DATA/rac10/datafile/undotbs2.263.993580773
input datafile fno=00003 name=+DATA/rac10/datafile/sysaux.261.993580773
input datafile fno=00005 name=+DATA/rac10/datafile/users.264.993580775
channel ORA_DISK_1: starting piece 1 at 01-DEC-18
channel ORA_DISK_1: finished piece 1 at 01-DEC-18
piece handle=/u01/app/oracle/backup/dbf_RAC10_20181201_0itjmmus_1_1 tag=TAG20181201T163123 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting compressed full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 01-DEC-18
channel ORA_DISK_1: finished piece 1 at 01-DEC-18
piece handle=/u01/app/oracle/backup/dbf_RAC10_20181201_0jtjmmvl_1_1 tag=TAG20181201T163123 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 01-DEC-18

sql statement: alter system archive log current

Starting backup at 01-DEC-18
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting compressed archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=25 recid=7 stamp=993585494
input archive log thread=1 sequence=26 recid=9 stamp=993585891
input archive log thread=1 sequence=27 recid=12 stamp=993585897
input archive log thread=1 sequence=28 recid=13 stamp=993592937
input archive log thread=1 sequence=29 recid=15 stamp=993737931
input archive log thread=1 sequence=30 recid=16 stamp=993745912
input archive log thread=1 sequence=31 recid=19 stamp=993745918
input archive log thread=2 sequence=4 recid=8 stamp=993585519
input archive log thread=2 sequence=5 recid=10 stamp=993585894
input archive log thread=2 sequence=6 recid=11 stamp=993585897
input archive log thread=2 sequence=7 recid=14 stamp=993737930
input archive log thread=2 sequence=8 recid=17 stamp=993745914
input archive log thread=2 sequence=9 recid=18 stamp=993745917
channel ORA_DISK_1: starting piece 1 at 01-DEC-18
channel ORA_DISK_1: finished piece 1 at 01-DEC-18
piece handle=/u01/app/oracle/backup/arc_9_2_RAC10_20181201_0ktjmn02_1_1 tag=TAG20181201T163202 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:04
Finished backup at 01-DEC-18

Starting backup at 01-DEC-18
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
channel ORA_DISK_1: starting piece 1 at 01-DEC-18
channel ORA_DISK_1: finished piece 1 at 01-DEC-18
piece handle=/u01/app/oracle/backup/control_RAC10_20181201_0ltjmn07_1_1 tag=TAG20181201T163207 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 01-DEC-18

Starting backup at 01-DEC-18
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 01-DEC-18
channel ORA_DISK_1: finished piece 1 at 01-DEC-18
piece handle=/u01/app/oracle/backup/spfile_RAC10_20181201_0mtjmn09_1_1 tag=TAG20181201T163209 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 01-DEC-18


scp传备份到相同位置 
 scp * 192.168.56.33:/u01/app/oracle/backup/
--上传升级所需脚本
put DBMS_DST_scriptsV1.9.zip


--创建密码文件

orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=oracle force=y entries=5           

恢复参数文件

RMAN> startup nomount

startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initrac101.ora'

starting Oracle instance without parameter file for retrieval of spfile
Oracle instance started

Total System Global Area    1068937216 bytes

Fixed Size                     2260088 bytes
Variable Size                281019272 bytes
Database Buffers             780140544 bytes
Redo Buffers 


RMAN> restore spfile to pfile '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initrac101.ora' from '/u01/app/oracle/backup/spfile_RAC10_20181201_0mtjmn09_1_1';

Starting restore at 01-DEC-18
using channel ORA_DISK_1

channel ORA_DISK_1: restoring spfile from AUTOBACKUP /u01/app/oracle/backup/spfile_RAC10_20181201_0mtjmn09_1_1
channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete
Finished restore at 01-DEC-1


RMAN> shutdown immediate

Oracle instance shut down


RMAN> startup nomount pfile='/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initrac101.ora'

connected to target database (not started)
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of startup command at 12/01/2018 16:37:02
RMAN-04014: startup failed: ORA-00119: invalid specification for system parameter REMOTE_LISTENER
ORA-00132: syntax error or unresolved network name 'LISTENERS_RAC10'
RMAN-04017: startup error description: ORA-32006: BACKGROUND_DUMP_DEST initialization parameter has been deprecated
ORA-32006: USER_DUMP_DEST initialization parameter has been deprecated

去掉废弃参数和REMOTE_LISTENER
修改*.cluster_database=false

创建审计目录

mkdir -p /u01/app/oracle/admin/rac10/adump

RMAN> startup nomount pfile='/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initrac101.ora'


Oracle instance started

Total System Global Area     597098496 bytes

Fixed Size                     2255552 bytes
Variable Size                289408320 bytes
Database Buffers             301989888 bytes
Redo Buffers                   3444736 bytes


恢复控制文件


RMAN> restore controlfile  from '/u01/app/oracle/backup/control_RAC10_20181201_0ltjmn07_1_1';

Starting restore at 01-DEC-18
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=30 device type=DISK

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=+DATA/rac10/controlfile/current.264.993746373
output file name=+ARC/rac10/controlfile/current.268.993746373
Finished restore at 01-DEC-18

RMAN> shutdown immedaite

修改参数文件中控制文件位置

RMAN> startup nomount pfile='/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initrac101.ora'
RMAN> alter database mount;

database mounted
released channel: ORA_DISK_1

恢复数据文件


RMAN> run { 
2> allocate channel c1 device type disk;
3> allocate channel c2 device type disk;
4> set newname for datafile 1 to '+DATA';
5> set newname for datafile 2 to '+DATA';
6> set newname for datafile 3 to '+DATA';
7> set newname for datafile 4 to '+DATA';
8> set newname for datafile 5 to '+DATA';
9> set newname for tempfile 1 to '+DATA';
10> restore database;             
11> switch datafile all; 
12> release channel c1;
13> release channel c2;
14> }

allocated channel: c1
channel c1: SID=30 device type=DISK

allocated channel: c2
channel c2: SID=32 device type=DISK

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 01-DEC-18
Starting implicit crosscheck backup at 01-DEC-18
Crosschecked 3 objects
Crosschecked 16 objects
Finished implicit crosscheck backup at 01-DEC-18

Starting implicit crosscheck copy at 01-DEC-18
Finished implicit crosscheck copy at 01-DEC-18

searching for all files in the recovery area
cataloging files...
no files cataloged


channel c1: starting datafile backup set restore
channel c1: specifying datafile(s) to restore from backup set
channel c1: restoring datafile 00001 to +DATA
channel c1: restoring datafile 00002 to +DATA
channel c1: restoring datafile 00003 to +DATA
channel c1: restoring datafile 00004 to +DATA
channel c1: restoring datafile 00005 to +DATA
channel c1: reading from backup piece /u01/app/oracle/backup/dbf_RAC10_20181201_0itjmmus_1_1
channel c1: piece handle=/u01/app/oracle/backup/dbf_RAC10_20181201_0itjmmus_1_1 tag=TAG20181201T163123
channel c1: restored backup piece 1
channel c1: restore complete, elapsed time: 00:00:45
Finished restore at 01-DEC-18

datafile 1 switched to datafile copy
input datafile copy RECID=6 STAMP=993746554 file name=+DATA/rac10/datafile/system.257.993746509
datafile 2 switched to datafile copy
input datafile copy RECID=7 STAMP=993746554 file name=+DATA/rac10/datafile/undotbs1.258.993746509
datafile 3 switched to datafile copy
input datafile copy RECID=8 STAMP=993746554 file name=+DATA/rac10/datafile/sysaux.260.993746509
datafile 4 switched to datafile copy
input datafile copy RECID=9 STAMP=993746554 file name=+DATA/rac10/datafile/undotbs2.265.993746509
datafile 5 switched to datafile copy
input datafile copy RECID=10 STAMP=993746554 file name=+DATA/rac10/datafile/users.266.993746509

released channel: c1

released channel: c2

恢复归档

RMAN> run{
2> set  archivelog  destination  to  '+ARC';
3> restore  archivelog  all;
4> }

executing command: SET ARCHIVELOG DESTINATION

Starting restore at 01-DEC-18
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=30 device type=DISK

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 12/01/2018 16:45:32
RMAN-06026: some targets not found - aborting restore
RMAN-06025: no backup of archived log for thread 2 with sequence 3 and starting SCN of 289581 found to restore
RMAN-06025: no backup of archived log for thread 2 with sequence 2 and starting SCN of 289471 found to restore
RMAN-06025: no backup of archived log for thread 2 with sequence 1 and starting SCN of 287132 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 24 and starting SCN of 289578 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 23 and starting SCN of 289468 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 22 and starting SCN of 286669 found to restore

recover数据文件

RMAN> recover database;

Starting recover at 01-DEC-18
using channel ORA_DISK_1

starting media recovery

channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=2 sequence=8
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=30
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=31
channel ORA_DISK_1: restoring archived log
archived log thread=2 sequence=9
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/backup/arc_9_2_RAC10_20181201_0ktjmn02_1_1
channel ORA_DISK_1: piece handle=/u01/app/oracle/backup/arc_9_2_RAC10_20181201_0ktjmn02_1_1 tag=TAG20181201T163202
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
archived log file name=+ARC/rac10/archivelog/2018_12_01/thread_1_seq_30.300.993746761 thread=1 sequence=30
archived log file name=+ARC/rac10/archivelog/2018_12_01/thread_2_seq_8.301.993746761 thread=2 sequence=8
archived log file name=+ARC/rac10/archivelog/2018_12_01/thread_1_seq_31.303.993746763 thread=1 sequence=31
archived log file name=+ARC/rac10/archivelog/2018_12_01/thread_2_seq_9.298.993746763 thread=2 sequence=9
unable to find archived log
archived log thread=2 sequence=10
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 12/01/2018 16:46:05
RMAN-06054: media recovery requesting unknown archived log for thread 2 with sequence 10 and starting SCN of 381181

处理redo(temp已set new name)
alter database rename file '+DATA/rac10/log/redo1.log' to '+DATA/rac10/onlinelog/redo1.log';

升级
SQL> alter database open RESETLOGS;
alter database open RESETLOGS
*
ERROR at line 1:
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00704: bootstrap process failure
ORA-39700: database must be opened with UPGRADE option
Process ID: 15474
Session ID: 33 Serial number: 17

开启flashback database

SQL> startup mount;
ORACLE instance started.

Total System Global Area  597098496 bytes
Fixed Size                  2255552 bytes
Variable Size             293602624 bytes
Database Buffers          297795584 bytes
Redo Buffers                3444736 bytes
Database mounted.
SQL>  alter database flashback on;

Database altered.

SQL> create restore point  point_rollback guarantee flashback database;

Restore point created.
 

upgrade 模式打开数据库


SQL> select FLASHBACK_ON from v$database;

FLASHBACK_ON
------------------
YES

SQL> select name from v$restore_point;

NAME
--------------------------------------------------------------------------------
POINT_ROLLBACK

SQL> startup upgrade;
ORACLE instance started.

Total System Global Area  597098496 bytes
Fixed Size                  2255552 bytes
Variable Size             226493760 bytes
Database Buffers          364904448 bytes
Redo Buffers                3444736 bytes
Database mounted.
Database opened.

执行升级脚本catupgrd.sql
SQL> spool upgrade.log
SQL> @?/rdbms/admin/catupgrd.sql
执行升级脚本catuppst.sql
SQL> startup
SQL> @?/rdbms/admin/catuppst.sql
编译失效对象
SQL> @?/rdbms/admin/utlrp.sql
更新时区信息
SQL> @/soft/DBMS_DST_scriptsV1.9/countstarTSTZ.sql
SQL> @/soft/DBMS_DST_scriptsV1.9/countstatsTSTZ.sql
清除日志
SQL> exec dbms_scheduler.purge_log;
执行upg_tzv_check.sql脚本
SQL> @/soft/DBMS_DST_scriptsV1.9/upg_tzv_check.sql
执行upg_tzv_apply.sql脚本
SQL> @/soft/DBMS_DST_scriptsV1.9/upg_tzv_apply.sql
查看更新后的TZ信息
SQL> select TZ_VERSION from registry$database;
TZ_VERSION
----------
        14
关库
SQL> shutdown immediate
修改参数文件
*.cluster_database=ture
*.REMOTE_LISTENER=scan-ip:1521
*.compatible='11.2.0.4.0'
*.optimizer_features_enable='10.2.0.5'

创建spfile

SQL> create spfile='+DATA/rac10/initrac10.ora' from pfile='/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initrac101.ora';

File created.


[oracle@rac1 dbs]$ cat > /u01/app/oracle/product/11.2.0/dbhome_1/dbs/initrac101.ora << EOF
> spfile='+DATA/rac10/initrac10.ora'
> EOF
拷贝pfile文件、口令文件到2节点
[oracle@rac1 dbs]$ scp /u01/app/oracle/product/11.2.0/dbhome_1/dbs/initrac101.ora 192.168.56.44:/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initrac102.ora
[oracle@rac1 dbs]$ scp  orapwrac101 192.168.56.44:/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwrac102
将DB信息添加到集群里面
[oracle@rac1 dbs]$ srvctl add database -d rac10 -o $ORACLE_HOME -c RAC -p +DATA/rac10/initrac10.ora -y automatic -a DATA,OCR,ARC
添加instance信息到集群
[oracle@rac1 dbs]$ srvctl add instance -d rac10 -i rac101 -n rac1
[oracle@rac1 dbs]$ srvctl add instance -d rac10 -i rac102 -n rac2
将DB改成自动启动模式
[root@rac1 bin]# ./crsctl modify res ora.rac10.db -attr AUTO_START=1
重启集群

[root@rac1 bin]# ./crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ARC.dg
               ONLINE  ONLINE       rac1                                         
               ONLINE  ONLINE       rac2                                         
ora.DATA.dg
               ONLINE  ONLINE       rac1                                         
               ONLINE  ONLINE       rac2                                         
ora.LISTENER.lsnr
               ONLINE  ONLINE       rac1                                         
               ONLINE  ONLINE       rac2                                         
ora.OCR.dg
               ONLINE  ONLINE       rac1                                         
               ONLINE  ONLINE       rac2                                         
ora.asm
               ONLINE  ONLINE       rac1                     Started             
               ONLINE  ONLINE       rac2                     Started             
ora.gsd
               OFFLINE OFFLINE      rac1                                         
               OFFLINE OFFLINE      rac2                                         
ora.net1.network
               ONLINE  ONLINE       rac1                                         
               ONLINE  ONLINE       rac2                                         
ora.ons
               ONLINE  ONLINE       rac1                                         
               ONLINE  ONLINE       rac2                                         
ora.registry.acfs
               ONLINE  ONLINE       rac1                                         
               ONLINE  ONLINE       rac2                                         
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       rac1                                         
ora.cvu
      1        ONLINE  ONLINE       rac1                                         
ora.oc4j
      1        ONLINE  ONLINE       rac1                                         
ora.rac1.vip
      1        ONLINE  ONLINE       rac1                                         
ora.rac10.db
      1        ONLINE  ONLINE       rac2                     Open                
      2        ONLINE  ONLINE       rac1                     Open                
ora.rac2.vip
      1        ONLINE  ONLINE       rac2                                         
ora.scan1.vip
      1        ONLINE  ONLINE       rac1  

 

关闭flashback

SQL> alter database flashback off;

Database altered.

SQL> drop restore point POINT_ROLLBACK;

Restore point dropped.

SQL> select FLASHBACK_ON from v$database;

FLASHBACK_ON
------------------
NO

 

                           

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值