91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

在青云上部署oracle rac全過程

發布時間:2020-08-17 03:16:10 來源:ITPUB博客 閱讀:385 作者:datapeng 欄目:關系型數據庫
一 準備

1.1 服務器基本信息

節點

Cpu

內存

OS

db01

8cores

16G

Oracle Linux Server release 6.6 (x86_64)

db02

8cores

16G

Oracle Linux Server release 6.6 (x86_64)

 

[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 x86_64 x86_64 GNU/Linux

1.2 軟件信息

Db11.2.0.4p13390677_112040_Linux-x86-64_1of7.zip

p13390677_112040_Linux-x86-64_2of7.zip

grid       p13390677_112040_Linux-x86-64_3of7.zip 

安裝介質存放在/u01/software

p13390677_112040_Linux-x86-64_1of7.zipp13390677_112040_Linux-x86-64_2of7.zip解壓生成datebase目錄;

p13390677_112040_Linux-x86-64_3of7.zip 解壓生成grid目錄

1.3 本地盤配置

500GB的本地盤創建文件系統掛載到/u01目錄下面,并修改/etc/fstab,讓開機自動掛載/u01文件系統。

[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

二 基礎配置

基礎配置需要在兩個節點都要操作的。

2.1 網絡配置

節點

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文件

#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 網絡配置文件

節點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 ~]#

節點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

兩個節點都要操作:

關閉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

重啟網絡:

service network restart

關閉防火墻

service iptables stop

chkconfig iptables off

關閉selinux

修改:/etc/selinux/config 內容改為:SELINUX=disabled

setenforce  0

2.2 創建用戶

兩個節點都要操作:

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) =501(oinstall),500(dba)

[root@db02 software]# id grid

uid=501(grid) gid=501(oinstall) =501(oinstall),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 設置profile

后續要將oracle的環境變量ORACLE_SID分別改為oadb1 oadb2

節點1

Oracle用戶

[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用戶:

[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

節點2

Oracle用戶:

[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用戶:

[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 配置路徑

兩臺服務器都要配置:

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 安裝rpm

配置本地鏡像

iso文件掛載

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

重命名之前的文件

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

安裝rpm

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

后續根據實際情況也許需要安裝一些新的包,都可以在/u01/software/mnt/Packages中找到

2.5 sysctl.conf文件

修改/etc/sysctl.conf

新加

##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

設置生效:

/sbin/sysctl -p

2.6 limit文件

/etc/security/limits.conf 添加:

#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共享盤安裝

在云平臺上分配共享存儲之后,最好在界面上設置可以訪問共享存儲的客戶端,本次設置的是:iqn.2014-12.com.qingcloud:e594a0ee9b82

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

1 安裝工具包

yum install -y iscsi-initiator-utils

2 根據前綴生成客戶端id

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

結果:

[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 修改配置文件

/etc/iscsi/initiatorname.iscsi  修改為下面的信息(名稱是界面上看到的)

節點1:

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

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

節點2

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

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

4 客戶端發現(兩個服務器都要配置)

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

Starting iscsid:                                           [  OK  ]

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

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

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

5 注冊(兩個服務器都要配置)

[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,3260] (multiple)

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

6 查看結果

[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 251: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 251:33   0  500G  0 part /u01

7 配置開啟自動啟動識別

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 配置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 i++

  done

  /sbin/start_udev

最后文件生成的/etc/udev/rules.d/99-oracle-asmdevices.rules文件是:

[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"

查看生成的設備符號

[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

其中asm-disk2 500GB,用作數據。另外310GB的盤用作集群vote disk

2.8 關閉ntp

Service ntpd stop

Chkconfig ntpd off

2.9 配置操作系統用戶互信

修改ssh配置文件:/etc/ssh/ssh_config,注釋下面兩行

        #StrictHostKeyChecking no

        #UserKnownHostsFile /dev/null

Oracle grid用戶都要操作

mkdir ~/.ssh

 chmod 700 ~/.ssh

 ssh-keygen -t rsa

 ssh-keygen -t dsa

在節點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

之后分別使用gridoracle用戶在兩個節點都運行:

Ssh db01

ssh db02

ssh db01-priv

ssh db02-priv

按照提示輸入yes,不輸入密碼能正常登陸表示正常

三 預檢查

節點1,使用grid用戶,切換至目錄:

/u01/software/u01,運行命令:

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

結果如下,按照需求再安裝rpm,讓failed成功:

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

四 圖形化安裝

為避免網絡中途掉線,所有圖形化均在web控制臺上分別使用gridoracle用戶登陸db01進行操作。

4.1 安裝grid軟件

使用grid用戶登陸db01,切換至目錄:

/u01/software/grid

執行./runInstaller

選擇大小為10G/dev/asm-disk1, /dev/asm-disk3,/dev/asm-disk4

這里需要點擊“change discovery path”,設置路徑為/dev/asm*

在進行環境檢查時,會報錯

這個警告在青云平臺也有說明:

注解 grid安裝環境檢查腳本在Oracle Linux 6上面的一個bug導致錯誤”PRVF-9802”無法解決,具體原因請見Debug Cluvfy error ERROR: PRVF-9802

勾選忽略這個警告。

彈出腳本分別使用root在兩個服務器執行:

/u01/app/oraInventory/orainstRoot.sh

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

第二個腳本執行會比較好時間,大概20分鐘。

4.1.1執行腳本

節點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

節點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 創建asm磁盤組

4.3 安裝oracle軟件

Oracle用戶登陸,切換至目錄:

/u01/software/database

運行./runInstaller

Root登陸兩臺機器分別執行腳本:

[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.

五 其他

5.1 start_udev重啟自動運行

查看start_udev是否開機自動運行,修改/etc/rc.d/rc.sysinit文件

添加:/sbin/start_udev

5.2 Ocr備份

[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 為拷貝生成的文件。

 

5.3 Asm元數據備份

Grid用戶運行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

 

 

六 實例測試

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>

可以正常進行創建刪除操作。

TNS

oadb =

  (DESCRIPTION =

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

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = oadb)

    )

  )

可使用上述TNS配置連接數據庫。

備注:

Db01節點數據庫的SIDoadb1

Db02節點數據庫的SIDoadb2

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

揭西县| 福安市| 青阳县| 高尔夫| 个旧市| 左云县| 呈贡县| 淳化县| 家居| 云安县| 文成县| 大连市| 西和县| 瑞昌市| 柏乡县| 云安县| 伽师县| 鄂托克前旗| 明光市| 平陆县| 雷州市| 灵武市| 三河市| 太仆寺旗| 舒城县| 永修县| 含山县| 苍山县| 淅川县| 孝感市| 义乌市| 都安| 河北区| 抚宁县| 堆龙德庆县| 太原市| 泰来县| 时尚| 桂平市| 盐城市| 达尔|