在搭建oracle 11g r2环境的时候,用dbca创建数据库的是时候,检测提示rac1没有vip设置,提示信息如下:
Virtual IP address is not configured for cluster node “rac1″. Run “/u01/app/11.2.0/grid/bin/srvctl” as root user to configure
it before performing the “Create a Database” operation.
然后登陆到rac1 ,检测vip,并删除vip设置,当然这里是没有的,然后尝试添加vip
<!-- Crayon Syntax Highlighter v2.7.1 -->
1
2
3
4
5
6
7
8
9
10
|
grid
@
rac1
:
/
opt
>
srvctl
stop
vip
-
n
rac1
-
f
PRKO
-
2439
:
VIP
does
not
exist
.
grid
@
rac1
:
/
opt
>
srvctl
remove
vip
-
i
rac1
Please
confirm
that
you
intend
to
remove
the
VIPs
rac1
(
y
/
[
n
]
)
y
PRCR
-
1001
:
Resource
ora
.
rac1
.
vip
does
not
exist
grid
@
rac1
:
/
opt
>
srvctl
add
vip
-
n
rac1
-
A
192.168.207.100
/
255.255.255.0
/
eth0
-
k
2
PRCN
-
2049
:
The
network
attributes
specified
(
network
number
:
2
,
subnet
:
192.168.207.0
,
adapters
:
eth0
)
conflict
with
an
already
registered
network
(
network
number
:
1
,
subnet
:
192.168.207.0
,
adapters
:
eth0
)
grid
@
rac1
:
/
opt
>
srvctl
add
vip
-
n
rac1
-
A
192.168.207.100
/
255.255.255.0
/
eth0
-
k
1
PRCN
-
2018
:
Current
user
grid
is
not
a
privileged
user
|
在添加的时候提示权限不够,切换至root用户执行:
rac1:~/Desktop # /opt/app/grid/11.2/bin/srvctl add vip -n rac1 -A 192.168.207.100/255.255.255.0/eth0 -k 1
1
|
rac1
:
~
/
Desktop
# /opt/app/grid/11.2/bin/srvctl add vip -n rac1 -A 192.168.207.100/255.255.255.0/eth0 -k 1
|
<!-- [Format Time: 0.0008 seconds] -->
执行成功,然后检测,如果没有启动,则启动即可
<!-- Crayon Syntax Highlighter v2.7.1 -->
grid@rac1:~> srvctl status vip -n rac1 VIP 192.168.207.100 is enabled VIP 192.168.207.100 is not running grid@rac1:~> srvctl start vip -n rac1 grid@rac1:~> srvctl status vip -n rac1 VIP 192.168.207.100 is enabled VIP 192.168.207.100 is running on node: rac1
1
2
3
4
5
6
7
|
grid
@
rac1
:
~
>
srvctl
status
vip
-
n
rac1
VIP
192.168.207.100
is
enabled
VIP
192.168.207.100
is
not
running
grid
@
rac1
:
~
>
srvctl
start
vip
-
n
rac1
grid
@
rac1
:
~
>
srvctl
status
vip
-
n
rac1
VIP
192.168.207.100
is
enabled
VIP
192.168.207.100
is
running
on
node
:
rac1
|
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24162410/viewspace-1814244/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/24162410/viewspace-1814244/