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

The whole process of deploying oracle rac on Qingyun

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

One prepares 1.1 server basic information

Node

Cpu

Memory

OS

Db01

8cores

16G

Oracle Linux Server release 6.6 (x86x64)

Db02

8cores

16G

Oracle Linux Server release 6.6 (x86x64)

[root@db02 software] # cat / etc/issue

Oracle Linux Server release 6.6

Kernel\ r on an\ m

[root@db02 software] # uname-a

Linux db02 3.8.13-55.1.2.el6uek.x86_64 # 2 SMP Thu Dec 18 00:15:51 PST 2014 x86 "64 GNU/Linux

1.2 Software Information

Db11.2.0.4:p13390677_112040_Linux-x86-64_1of7.zip

P13390677_112040_Linux-x86-64_2of7.zip

Grid: p13390677_112040_Linux-x86-64_3of7.zip

The installation media is stored in / u01/software

P13390677_112040_Linux-x86-64_1of7.zip and p13390677_112040_Linux-x86-64_2of7.zip decompress to generate datebase directory

P13390677_112040_Linux-x86-64_3of7.zip decompress to generate grid directory

1.3 Local site configuration

Mount the local disk creation file system of 500GB to the / U01 directory and modify / etc/fstab to automatically mount the / U01 file system on boot.

[root@db01] # df-h

Filesystem Size Used Avail Use% Mounted on

/ dev/vda1 20G 3.0G 16G 16% /

Tmpfs 8.0G 132m 7.9G 2% / dev/shm

/ dev/vdc1 493G 23G 445G 5% / U01

Second basic configuration

The basic configuration needs to be operated on both nodes.

2.1 Network configuration

Node

Hostname

Type

IP Address

Interface

Resolved by

Db01

Db01

Public IP

192.168.0.2

Eth2

HOST FILE

Db01-vip

Virtual IP

192.168.0.102

HOST FILE

Db01-priv

Private IP

192.168.101.2

Eth0

HOST FILE

Db02

Db02

Public IP

192.168.0.3

Eth2

HOST FILE

Db02-vip

Virtual IP

192.168.0.103

HOST FILE

Db02-priv

Private IP

192.168.101.3

Eth0

HOST FILE

Db-scan

SCAN IP

192.168.0.100

HOST FILE

2.1.1 Host Fil

# Public

192.168.0.2 db01

192.168.0.3 db02

# Virtual

192.168.0.102 db01-vip

192.168.0.103 db02-vip

# Private

192.168.101.2 db01-priv

192.168.101.3 db02-priv

# SCAN

192.168.0.100 db-scan

2.1.2 Network profile

Node 1

[root@db01 ~] # cat / etc/sysconfig/network-scripts/ifcfg-eth0

HWADDR=52:54:46:A6:94:40

TYPE=Ethernet

BOOTPROTO=none

IPADDR=192.168.101.2

PREFIX=24

DEFROUTE=yes

IPV4_FAILURE_FATAL=yes

IPV6INIT=no

NAME=eth0

UUID=d790a693-882a-4b5e-bc9f-44ac2706c5b7

ONBOOT=yes

[root@db01 ~] # cat / etc/sysconfig/network-scripts/ifcfg-eth2

DEVICE=eth2

TYPE=Ethernet

IPADDR=192.168.0.2

NETMASK=255.255.255.0

GATEWAY=192.168.0.1

DEFROUTE=yes

NAME=eth2

ONBOOT=yes

HWADDR=52:54:a1:2a:34:3f

[root@db01 ~] #

Node 2

[root@db02 ~] # cat / etc/sysconfig/network-scripts/ifcfg-eth0

HWADDR=52:54:72:2C:50:63

TYPE=Ethernet

BOOTPROTO=none

IPADDR=192.168.101.3

PREFIX=24

DEFROUTE=yes

IPV4_FAILURE_FATAL=yes

IPV6INIT=no

NAME=eth0

UUID=5c37a16a-e9ac-4cf6-a244-c4d0faa592db

ONBOOT=yes

DEVICE=eth0

[root@db02 ~] # cat / etc/sysconfig/network-scripts/ifcfg-eth2

DEVICE=eth2

HWADDR=52:54:b0:c6:97:26

TYPE=Ethernet

IPADDR=192.168.0.3

NETMASK=255.255.255.0

GATEWAY=192.168.0.1

DEFROUTE=yes

NAME=eth2

ONBOOT=yes

Both nodes need to be operated:

Close networkmanager

[root@i-zq8ytr3k network-scripts] # chkconfig NetworkManager-- list

NetworkManager 0:off 1:off 2:on 3:on 4:on 5:on 6:off

[root@i-zq8ytr3k network-scripts] # chkconfig NetworkManager off

[root@i-zq8ytr3k network-scripts] # chkconfig NetworkManager-- list

NetworkManager 0:off 1:off 2:off 3:off 4:off 5:off 6:off

Restart the network:

Service network restart

Turn off the firewall

Service iptables stop

Chkconfig iptables off

Close selinux

Modify: / etc/selinux/config content to: SELINUX=disabled

Setenforce 0

2.2 create a user

Both nodes need to be operated:

Groupadd-g 500 dba

Groupadd-g 501 oinstall

Groupadd-g 502 asmadmin

Useradd-g oinstall-u 500 oracle

Useradd-g oinstall-u 501 grid

Usermod-G dba oracle

Usermod-G dba grid

Usermod-aG asmadmin grid

[root@db02 software] # id oracle

Uid=500 (oracle) gid=501 (oinstall) group = 501 (oinstall), 500 (dba)

[root@db02 software] # id grid

Uid=501 (grid) gid=501 (oinstall) group = 501,500 (dba), 502 (asmadmin)

[root@db01 ~] # id oracle

Uid=500 (oracle) gid=501 (oinstall) groups=501 (oinstall), 500 (dba)

[root@db01 ~] # id grid

Uid=501 (grid) gid=501 (oinstall) groups=501 (oinstall), 500 (dba), 502 (asmadmin)

[root@db01 ~] #

2.2.1 set up profile

Later, change the environment variable ORACLE_SID of oracle to oadb1 and oadb2, respectively.

Node 1:

Oracle user

[oracle@db01 ~] $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

TMP=/tmp; export TMP

TMPDIR=$TMP; export TMPDIR

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE

ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME

ORACLE_SID=db1; export ORACLE_SID

ORACLE_TERM=xterm; export ORACLE_TERM

PATH=/usr/sbin:$PATH; export PATH

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

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

Grid users:

[grid@db01 ~] $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

TMP=/tmp; export TMP

TMPDIR=$TMP; export TMPDIR

ORACLE_SID=+ASM1; export ORACLE_SID

ORACLE_BASE=/u01/app/grid; export ORACLE_BASE

ORACLE_HOME=/u01/app/11.2.0/grid/product/db_1; export ORACLE_HOME

NLS_DATE_FORMAT= "yyyy-mm-dd HH24:MI:SS"; export NLS_DATE_FORMAT

THREADS_FLAG=native; export THREADS_FLAG

PATH=$ORACLE_HOME/bin:$PATH; export PATHTHREADS_FLAG=native; export THREADS_FLAG

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

Node 2

Oracle users:

[oracle@db02 ~] $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

TMP=/tmp; export TMP

TMPDIR=$TMP; export TMPDIR

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE

ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME

ORACLE_SID=db2; export ORACLE_SID

ORACLE_TERM=xterm; export ORACLE_TERM

PATH=/usr/sbin:$PATH; export PATH

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

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

Grid users:

[grid@db02 ~] $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

TMP=/tmp; export TMP

TMPDIR=$TMP; export TMPDIR

ORACLE_SID=+ASM2; export ORACLE_SID

ORACLE_BASE=/u01/app/grid; export ORACLE_BASE

ORACLE_HOME=/u01/app/11.2.0/grid/product/db_1; export ORACLE_HOME

NLS_DATE_FORMAT= "yyyy-mm-dd HH24:MI:SS"; export NLS_DATE_FORMAT

THREADS_FLAG=native; export THREADS_FLAG

PATH=$ORACLE_HOME/bin:$PATH; export PATHTHREADS_FLAG=native; export THREADS_FLAG

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

2.3 configuration path

Both servers need to be configured:

Mkdir-p / u01/app

Chown-R root:oinstall / u01/app

Mkdir-p / u01/app/11.2.0/

Mkdir-p / u01/app/grid/

Mkdir-p / u01/app/oracle/

Chown-R grid:oinstall / u01/app/11.2.0

Chown-R grid:oinstall / u01/app/grid

Chown-R oracle:oinstall / u01/app/oracle

2.4 install the RPM package

Configure a local mirror

Mount the iso file

Mount-t iso9660-o loop / u01/software/V52218-01-OEL-6.6.iso / u01/software/mnt

Rename a previous file

Mv / etc/yum.repos.d/public-yum-ol6.repo / etc/yum.repos.d/public-yum-ol6.repo_bak

[root@db02 ~] # cat / etc/yum.repos.d/public-yum-ol6.repo

[Server]

Name=Oracle Linux $releasever Beta-$basearch-Server

Baseurl= file:///u01/software/mnt

Enabled=1

Gpgcheck=1

Gpgkey= file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle

Install rpm

Yum install gcc compat-libstdc++-33 elfutils-libelf-devel gcc-c++ libaio-devel libstdc++-devel ksh-y

Some new packages may need to be installed later, depending on the actual situation, which can be found in / u01/software/mnt/Packages

2.5 sysctl.conf Fil

Modify / etc/sysctl.conf

Newly added

# # add by oracle

Kernel.shmmax = 4294967295

Kernel.shmall = 2097152

Kernel.shmmni = 4096

Kernel.sem = 1100 32000 100 128

Fs.file-max = 6815744

Net.ipv4.ip_local_port_range = 9000 65000

Net.core.rmem_default = 1048576

Net.core.rmem_max = 4194304

Net.core.wmem_default = 262144

Net.core.wmem_max = 1048576

Vm.min_free_kbytes= 1048576

Fs.aio-max-nr= 1048576

The setting takes effect:

/ sbin/sysctl-p

2.6 limit Fil

/ etc/security/limits.conf add:

# add by oracle

Oracle hard nofile 65536

Oracle soft nofile 4096

Oracle hard nproc 16384

Oracle soft nproc 2047

Grid hard nofile 65536

Grid soft nofile 1024

Grid hard nproc 16384

Grid soft nproc 2047

2.7 shared disk installation

After allocating shared storage on the cloud platform, it is best to set the client that can access the shared storage on the interface. This setting is: iqn.2014-12.com.qingcloud:e594a0ee9b82

And iqn.2014-12.com.qingcloud:5ba958139a1

1 installation kit

Yum install-y iscsi-initiator-utils

2 generate client id based on prefix

Iscsi-iname-p iqn.2014-12.com.qingcloud

Results:

[root@db02] # iscsi-iname-p iqn.2014-12.com.qingcloud

Iqn.2014-12.com.qingcloud:e594a0ee9b82

[root@db01] # iscsi-iname-p iqn.2014-12.com.qingcloud

Iqn.2014-12.com.qingcloud:5ba958139a1

3 modify the configuration file

/ etc/iscsi/initiatorname.iscsi is modified to the following information (the name is seen on the interface)

Node 1:

[root@db01 ~] # cat / etc/iscsi/initiatorname.iscsi

InitiatorName=iqn.2014-12.com.qingcloud:5ba958139a1

Node 2:

[root@db02 ~] # cat / etc/iscsi/initiatorname.iscsi

InitiatorName=iqn.2014-12.com.qingcloud:e594a0ee9b82

4 client discovery (both servers need to be configured)

[root@db01 iscsi] # iscsiadm-m discovery-t st-p 192.168.0.8

Starting iscsid: [OK]

192.168.0.8 iqn.2014 3260 iqn.2014-12.com.qingcloud.s2:sn.data

[root@i-zq8ytr3k iscsi] # iscsiadm-m node

192.168.0.8 iqn.2014 3260 iqn.2014-12.com.qingcloud.s2:sn.data

5 Registration (both servers need to be configured)

[root@db01 iscsi] # iscsiadm-m node-T iqn.2014-12.com.qingcloud.s2:sn.data-p 192.168.0.8-- login

Logging in to [iface: default, target: iqn.2014-12.com.qingcloud.s2:sn.data, portal: 192.168.0.8 Magi 3260] (multiple)

Login to [iface: default, target: iqn.2014-12.com.qingcloud.s2:sn.data, portal: 192.168.0.8 Magi 3260] successful.

6 View the results

[root@db02 ~] # lsblk

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT

Sda 8:0 0 10G 0 disk

Sdb 8:16 0 500G 0 disk

Sdc 8:32 0 10G 0 disk

Sdd 8:48 0 10G 0 disk

Vda 251:0 0 20G 0 disk

`- vda1 251 1 0 20G 0 part /

Vdb 251:16 0 16G 0 disk [SWAP]

Vdc 251:32 0 500G 0 disk

`- vdc1 251virtual 33 0 500G 0 part / U01

[root@db01 ~] # lsblk

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT

Sda 8:0 0 10G 0 disk

Sdb 8:16 0 500G 0 disk

Sdc 8:32 0 10G 0 disk

Sdd 8:48 0 10G 0 disk

Vda 251:0 0 20G 0 disk

`- vda1 251 1 0 20G 0 part /

Vdb 251:16 0 16G 0 disk [SWAP]

Vdc 251:32 0 500G 0 disk

`- vdc1 251virtual 33 0 500G 0 part / U01

7 configure to turn on automatic start recognition

Iscsiadm-m node-T iqn.2014-12.com.qingcloud.s2:sn.data-p 192.168.0.8-- op update-n node.startup-v automatic

8 configure the disk recognized by asm

Echo "options=--whitelisted-- replace-whitespace" > / etc/scsi_id.config

Rm-f / etc/udev/rules.d/99-oracle-asmdevices.rules

I, 1

Id=''

For x in a b c d

Do

Id= `SCSI _ id-- whitelisted-- replace-whitespace-- device=/dev/sd$ x`

Echo "KERNEL==\" sd*\ ", SUBSYSTEM==\" block\ ", PROGRAM==\" / sbin/scsi_id-- whitelisted-- replace-whitespace-- device=/dev/\ $name\ ", RESULT==\" $id\ ", NAME=\" asm-disk$i\ ", OWNER=\" grid\ ", GROUP=\" asmadmin\ ", MODE=\" 0660\ "> > / etc/udev/rules.d/99-oracle-asmdevices.rules

Let iTunes +

Done

/ sbin/start_udev

The / etc/udev/rules.d/99-oracle-asmdevices.rules file generated by the final file is:

[root@db01 ~] # cat / etc/udev/rules.d/99-oracle-asmdevices.rules

KERNEL== "sd*", SUBSYSTEM== "block", PROGRAM== "/ sbin/scsi_id-whitelisted-replace-whitespace-device=/dev/$name", RESULT== "36001405745529a22afc4f8fb1a685e36", NAME= "asm-disk1", OWNER= "grid", GROUP= "asmadmin", MODE= "0660"

KERNEL== "sd*", SUBSYSTEM== "block", PROGRAM== "/ sbin/scsi_id-whitelisted-replace-whitespace-device=/dev/$name", RESULT== "36001405e371bbbb031b4547b5fe217d1", NAME= "asm-disk2", OWNER= "grid", GROUP= "asmadmin", MODE= "0660"

KERNEL== "sd*", SUBSYSTEM== "block", PROGRAM== "/ sbin/scsi_id-whitelisted-replace-whitespace-device=/dev/$name", RESULT== "36001405ff11eeac99ac40f69e34a3ec5", NAME= "asm-disk3", OWNER= "grid", GROUP= "asmadmin", MODE= "0660"

KERNEL== "sd*", SUBSYSTEM== "block", PROGRAM== "/ sbin/scsi_id-whitelisted-replace-whitespace-device=/dev/$name", RESULT== "3600140517aafddef37c4305a3e6930ee", NAME= "asm-disk4", OWNER= "grid", GROUP= "asmadmin", MODE= "0660"

View the generated device symbol

[root@db01 ~] # ll / dev/asm*

Brw-rw---- 1 grid asmadmin 8, 0 Mar 23 19:12 / dev/asm-disk1

Brw-rw---- 1 grid asmadmin 8, 16 Mar 23 19:12 / dev/asm-disk2

Brw-rw---- 1 grid asmadmin 8, 32 Mar 23 19:12 / dev/asm-disk3

Brw-rw---- 1 grid asmadmin 8, 48 Mar 23 19:12 / dev/asm-disk4

[root@db02 ~] # ll / dev/asm*

Brw-rw---- 1 grid asmadmin 8, 0 Mar 23 19:12 / dev/asm-disk1

Brw-rw---- 1 grid asmadmin 8, 16 Mar 23 19:12 / dev/asm-disk2

Brw-rw---- 1 grid asmadmin 8, 32 Mar 23 19:12 / dev/asm-disk3

Brw-rw---- 1 grid asmadmin 8, 48 Mar 23 19:12 / dev/asm-disk4

Where asm-disk2 is 500GB and is used as data. The other 3 10GB disks are used as cluster vote disk.

2.8Down ntp.

Service ntpd stop

Chkconfig ntpd off

2.9 configure operating system user trust

Modify the ssh configuration file: / etc/ssh/ssh_config and comment on the following two lines

# StrictHostKeyChecking no

# UserKnownHostsFile / dev/null

Both Oracle and grid users need to operate

Mkdir / .ssh

Chmod 700. ssh

Ssh-keygen-t rsa

Ssh-keygen-t dsa

On node 1:

$cat ~ / .ssh/id_rsa.pub > > ~ / .ssh/authorized_keys

$cat ~ / .ssh/id_dsa.pub > > ~ / .ssh/authorized_keys

$ssh db02 cat ~ / .ssh/id_rsa.pub > > ~ / .ssh/authorized_keys

$ssh db02 cat ~ / .ssh/id_dsa.pub > > ~ / .ssh/authorized_keys

$scp ~ / .ssh/authorized_keys db02:~/.ssh/authorized_keys

Then use grid and oracle users to run on both nodes:

Ssh db01

Ssh db02

Ssh db01-priv

Ssh db02-priv

Enter yes according to the prompt. If you do not enter the password, you can log in normally and indicate that it is normal.

Three pre-inspection

Node 1, using the grid user, change to the directory:

/ u01/software/u01, run the command:

. / runcluvfy.sh stage-pre crsinst-n db01,db02-fixup-verbose

The result is as follows: reinstall rpm as required to make failed successful:

[grid@db01 grid] $. / runcluvfy.sh stage-pre crsinst-n db01,db02-fixup-verbose

Four graphical installation

In order to avoid disconnection in the middle of the network, all graphics are operated on the web console using grid and oracle users logging in to db01 respectively.

4.1 install grid software

Log in to db01 using the grid user and change to the directory:

/ u01/software/grid

Execute. / runInstaller

Select / dev/asm-disk1, / dev/asm-disk3,/dev/asm-disk4 with a size of 10G

Here you need to click "change discovery path" and set the path to / dev/asm*

An error will be reported during an environmental check.

This warning is also stated on Qingyun platform:

Note that a bug in the grid installation environment check script on Oracle Linux 6 caused the error "PRVF-9802" not to be resolved, for the specific reason, see Debug Cluvfy error ERROR: PRVF-9802.

Check to ignore this warning.

The pop-up script is executed on both servers using root:

/ u01/app/oraInventory/orainstRoot.sh

/ u01/app/11.2.0/grid/product/db_1/root.sh

The second script will take better time to execute, about 20 minutes.

4.1.1 execute script

Node 1

[root@db01 ~] # / u01/app/oraInventory/orainstRoot.sh

Changing permissions of / u01/app/oraInventory.

Adding read,write permissions for group.

Removing read,write,execute permissions for world.

Changing groupname of / u01/app/oraInventory to oinstall.

The execution of the script is complete.

[root@db01 ~] # / u01/app/11.2.0/grid/product/db_1/root.sh

[root@db01 ~] # su-grid

[grid@db01] $crs_stat-t

Name Type Target State Host

Ora.CRS.dg ora....up.type ONLINE ONLINE db01

Ora....N1.lsnr ora....er.type ONLINE ONLINE db01

Ora.asm ora.asm.type ONLINE ONLINE db01

Ora.cvu ora.cvu.type ONLINE ONLINE db01

Ora....SM1.asm application ONLINE ONLINE db01

Ora.db01.gsd application OFFLINE OFFLINE

Ora.db01.ons application ONLINE ONLINE db01

Ora.db01.vip ora....t1.type ONLINE ONLINE db01

Ora.gsd ora.gsd.type OFFLINE OFFLINE

Ora....network ora....rk.type ONLINE ONLINE db01

Ora.oc4j ora.oc4j.type ONLINE ONLINE db01

Ora.ons ora.ons.type ONLINE ONLINE db01

Ora.scan1.vip ora....ip.type ONLINE ONLINE db01

Node 2

[root@db02 ~] # / u01/app/oraInventory/orainstRoot.sh

Changing permissions of / u01/app/oraInventory.

Adding read,write permissions for group.

Removing read,write,execute permissions for world.

Changing groupname of / u01/app/oraInventory to oinstall.

The execution of the script is complete.

[root@db02 ~] # / u01/app/11.2.0/grid/product/db_1/root.sh

[root@db02 ~] # su-grid

[grid@db02] $crs_stat-t

4.2 create asm disk group 4.3 install oracle software

Oracle users log in and change to the directory:

/ u01/software/database

Run. / runInstaller

Root logs in to the two machines to execute the script:

[root@db01 ~] # / u01/app/oracle/product/11.2.0/db_1/root.sh

Performing root user operation for Oracle 11g

The following environment variables are set as:

ORACLE_OWNER= oracle

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

Enter the full pathname of the local bin directory: [/ usr/local/bin]:

The contents of "dbhome" have not changed. No need to overwrite.

The contents of "oraenv" have not changed. No need to overwrite.

The contents of "coraenv" have not changed. No need to overwrite.

Entries will be added to the / etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root script.

Now product-specific root actions will be performed.

Finished product-specific root actions.

Other 5.1 start_udev restart autorun

Check whether start_udev is booted and run automatically, modify / etc/rc.d/rc.sysinit file

Add: / sbin/start_udev

5.2 Ocr backup

[root@db01] # / u01/app/11.2.0/grid/product/db_1/bin/ocrconfig-manualbackup

Db02 2018-03-23 19:29:16 / u01/app/11.2.0/grid/product/db_1/cdata/db-cluster/backup_20180323_192916.ocr

[root@db02 rc.d] # cp / u01/app/11.2.0/grid/product/db_1/cdata/db-cluster/backup_20180323_192916.ocr / root/orc-bak-20180323.ocr

/ root/orc-bak-20180323.ocr the file generated for the copy.

5.3 Asm metadata backup

Grid users run asmcmd

ASMCMD > md_backup / home/grid/oradgbackup20180323

Disk group metadata to be backed up: CRS

Disk group metadata to be backed up: DATA

Current alias directory path: db-cluster/OCRFILE

Current alias directory path: db-cluster

Current alias directory path: db-cluster/ASMPARAMETERFILE

Current alias directory path: OADB

Current alias directory path: OADB/ARCHIVELOG/2018_03_23

Current alias directory path: OADB/TEMPFILE

Current alias directory path: OADB/ARCHIVELOG

Current alias directory path: OADB/ONLINELOG

Current alias directory path: OADB/CONTROLFILE

Current alias directory path: OADB/PARAMETERFILE

Current alias directory path: OADB/DATAFILE

Six-case test

Last login: Fri Mar 23 19:37:05 2018 from 172.18.19.194

[root@db01 ~] # su-oracle

[oracle@db01 ~] $sqlplus system/Oracle_sys123@192.168.0.100:1521/oadb

SQL*Plus: Release 11.2.0.4.0 Production on Fri Mar 23 19:42:53 2018

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, Real Application Clusters, Automatic Storage Management, OLAP

Data Mining and Real Application Testing options

SQL > create table test0323 as select * from dual

Table created.

SQL > select * from test0323

D

-

X

SQL > drop table test0323

Table dropped.

SQL >

Create and delete operations can be carried out normally.

TNS

Oadb =

(DESCRIPTION =

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

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = oadb)

)

)

You can use the above TNS configuration to connect to the database.

Note:

The SID of the Db01 node database is oadb1

The SID of the Db02 node database is oadb2

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