Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Restore a RAC backup set to a single instance database

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Introduction of experimental environment

Source database: 1 1.2.0.1 rac library 2 nodes

Target library: 11.2.0. 1 RHEL6.5

1.2.4 introduction to this article

This article can also be understood as how to migrate the database to the single-instance database environment in the rac environment. The default target library has been installed with the same database version as the source database.

In addition, note that I use a yellow background and a red font to express the areas that require special attention in the code part of BLOG. For example, in the following example, the maximum archive log number of thread 1 is 3, and the maximum archive log number of 3, 3, and 43 is the place that requires special attention.

List of Archived Logs in backup set 11

Thrd Seq Low SCN Low Time Next SCN Next Time

-

1 32 1621589 2015-05-29 11:09:52 1625242 2015-05-29 11:15:48

1 33 1625242 2015-05-29 11:15:48 1625293 2015-05-29 11:15:58

2 42 1613951 2015-05-29 10:41:18 1625245 2015-05-29 11:15:49

2 43 1625245 2015-05-29 11:15:49 1625253 2015-05-29 11:15:53

1.3 Experimental Section 1.3.1 Experimental objectives

Back up and restore the rac library under 11.2.0.1 to the single instance environment under 11.2.0.1.

1.3.2 Source rac library execution

The rac library needs to perform a backup and pass it to the target library.

1.3.2.1 viewing the rac environment and creating test tables

[root@node2 ~] # cat / etc/hosts

# Do not remove the following line, or various programs

# that require network functionality will fail.

127.0.0.1 localhost.localdomain localhost

:: 1 localhost6.localdomain6 localhost6

# public

192.168.1.31 node1

192.168.1.32 node2

# vip

192.168.1.131 node1-vip

192.168.1.132 node2-vip

# priv

9.9.9.31 node1-priv

9.9.9.32 node2-priv

# scan

192.168.1.35 cluster-scan

[root@node2 ~] # ifconfig

Eth0 Link encap:Ethernet HWaddr 00:0C:29:79:BA:86

Inet addr: 192.168.1.32 Bcast:192.168.1.255 Mask:255.255.255.0

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:150190 errors:0 dropped:0 overruns:0 frame:0

TX packets:109804 errors:0 dropped:0 overruns:0 carrier:0

Collisions:0 txqueuelen:1000

RX bytes:205303912 (195.7 MiB) TX bytes:20182601 (19.2 MiB)

Eth0:1 Link encap:Ethernet HWaddr 00:0C:29:79:BA:86

Inet addr:192.168.1.132 Bcast:192.168.1.255 Mask:255.255.255.0

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

Eth2 Link encap:Ethernet HWaddr 00:0C:29:79:BA:90

Inet addr:9.9.9.32 Bcast:9.9.9.255 Mask:255.255.255.0

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:49075 errors:0 dropped:0 overruns:0 frame:0

TX packets:49811 errors:0 dropped:0 overruns:0 carrier:0

Collisions:0 txqueuelen:1000

RX bytes:23642469 (22.5 MiB) TX bytes:31528595 (30.0 MiB)

Lo Link encap:Local Loopback

Inet addr:127.0.0.1 Mask:255.0.0.0

UP LOOPBACK RUNNING MTU:16436 Metric:1

RX packets:16496 errors:0 dropped:0 overruns:0 frame:0

TX packets:16496 errors:0 dropped:0 overruns:0 carrier:0

Collisions:0 txqueuelen:0

RX bytes:15118447 (14.4 MiB) TX bytes:15118447 (14.4 MiB)

[root@node2 ~] #

[root@node2 ~] # crsstat

Name Type Target State Host

-

Ora.ARCH.dg ora.diskgroup.type ONLINE ONLINE node1

Ora.DATA.dg ora.diskgroup.type ONLINE ONLINE node1

Ora.LISTENER.lsnr ora.listener.type ONLINE ONLINE node1

Ora.LISTENER_SCAN1.lsnr ora.scan_listener.type ONLINE ONLINE node1

Ora.OVDISK.dg ora.diskgroup.type ONLINE ONLINE node1

Ora.TEST.dg ora.diskgroup.type ONLINE ONLINE node1

Ora.asm ora.asm.type ONLINE ONLINE node1

Ora.db.db ora.database.type OFFLINE OFFLINE

Ora.eons ora.eons.type ONLINE ONLINE node1

Ora.gsd ora.gsd.type OFFLINE OFFLINE

Ora.jmrac.db ora.database.type ONLINE ONLINE node1

Ora.jmrac..svc ora.service.type ONLINE ONLINE node1

Ora.net1.network ora.network.type ONLINE ONLINE node1

Ora.node1.ASM1.asm application ONLINE ONLINE node1

Ora.node1.LISTENER_NODE1.lsnr application ONLINE ONLINE node1

Ora.node1.gsd application OFFLINE OFFLINE

Ora.node1.ons application ONLINE ONLINE node1

Ora.node1.vip ora.cluster_vip_net1.type ONLINE ONLINE node1

Ora.node2.ASM2.asm application ONLINE ONLINE node2

Ora.node2.LISTENER_NODE2.lsnr application ONLINE ONLINE node2

Ora.node2.gsd application OFFLINE OFFLINE

Ora.node2.ons application ONLINE ONLINE node2

Ora.node2.vip ora.cluster_vip_net1.type ONLINE ONLINE node2

Ora.oc4j ora.oc4j.type OFFLINE OFFLINE

Ora.ons ora.ons.type ONLINE ONLINE node1

Ora.ora11g.db ora.database.type OFFLINE OFFLINE

Ora.registry.acfs ora.registry.acfs.type ONLINE ONLINE node1

Ora.scan1.vip ora.scan_vip.type ONLINE ONLINE node1

[root@node2 ~] #

[oracle@node2 ~] $ORACLE_SID= jmrac2

[oracle@node2 ~] $sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Fri May 29 10:58:42 2015

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

Connected to:

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

With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP

Data Mining and Real Application Testing options

SQL > show parameter cluster

NAME TYPE VALUE

-

Cluster_database boolean TRUE

Cluster_database_instances integer 2

Cluster_interconnects string

SQL > show parameter name

NAME TYPE VALUE

-

Db_file_name_convert string

Db_name string jmrac

Db_unique_name string jmrac

Global_names boolean FALSE

Instance_name string jmrac2

Lock_name_space string

Log_file_name_convert string

Service_names string HAHA

SQL > archive log list

Database log mode Archive Mode

Automatic archival Enabled

Archive destination USE_DB_RECOVERY_FILE_DEST

Oldest online log sequence 41

Next log sequence to archive 42

Current log sequence 42

SQL >

SQL > create table lhr.rac_to_single_test as select * from dba_objects

Table created.

SQL > select count (1) from lhr.rac_to_single_test

COUNT (1)

-

72510

SQL >

SQL > set line 9999 pagesize 9999

SQL > col FILE_NAME format A60

SQL > select 'datafile' file_type, file#,name FILE_NAME,status,enabled from v$datafile

2 union all

3 select 'tempfile',file#,name FILE_NAME,status,enabled from v$tempfile

4 union all

5 select 'logfile',group# file#,member FILE_NAME,status,'' from v$logfile

6 union all

7 select 'controlfile', to_number (''), name FILE_NAME,status,'' from v$controlfile

8

FILE_TYPE FILE# FILE_NAME STATUS ENABLED

Datafile 1 + DATA/jmrac/datafile/system.268.877470209 SYSTEM READ WRITE

Datafile 2 + DATA/jmrac/datafile/sysaux.269.877470211 ONLINE READ WRITE

Datafile 3 + DATA/jmrac/datafile/undotbs1.270.877470213 ONLINE READ WRITE

Datafile 4 + DATA/jmrac/datafile/users.271.877470213 ONLINE READ WRITE

Datafile 5 + DATA/jmrac/datafile/example.279.877470401 ONLINE READ WRITE

Datafile 6 + DATA/jmrac/datafile/undotbs2.280.877470779 ONLINE READ WRITE

Tempfile 1 + DATA/jmrac/tempfile/temp.278.877470381 ONLINE READ WRITE

Logfile 2 + DATA/jmrac/onlinelog/group_2.276.877470349

Logfile 2 + DATA/jmrac/onlinelog/group_2.277.877470349

Logfile 1 + DATA/jmrac/onlinelog/group_1.274.877470345

Logfile 1 + DATA/jmrac/onlinelog/group_1.275.877470345

Logfile 3 + DATA/jmrac/onlinelog/group_3.281.877470929

Logfile 3 + DATA/jmrac/onlinelog/group_3.282.877470931

Logfile 4 + DATA/jmrac/onlinelog/group_4.283.877470937

Logfile 4 + DATA/jmrac/onlinelog/group_4.284.877470943

Controlfile + DATA/jmrac/controlfile/current.273.877470341

Controlfile + DATA/jmrac/controlfile/current.272.877470343

17 rows selected.

SQL >

I will later perform the operation on the second node of 192.168.1.32, that is, rac. The db_name is jmrac, the database is in archive mode, and the test table lhr.rac_to_single_test is created with 72510 rows of data. There is a crsstat command, which can be referred to: [RAC] how to make the Oracle RAC crs_stat command display completely.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report