srvctl常用檢視與停庫命令
檢查節點應用程式狀態
vip db1vip is enabled
vip db1vip is running on node: db1
vip db2vip is enabled
vip db2vip is running on node: db2
network is enabled
network is running on node: db1
network is running on node: db2
gsd is disabled
gsd is not running on node: db1
gsd is not running on node: db2
ons is enabled
ons daemon is running on node: db1
ons daemon is running on node: db2
檢查節點vip狀態及配置
[grid@db1 ~]$ srvctl status vip -n db1
vip db1vip is enabled
vip db1vip is running on node: db1
[grid@db1 ~]$ srvctl status vip -n db2
vip db2vip is enabled
vip db2vip is running on node: db2
[grid@db1 ~]$ srvctl config vip -n db1
vip exists: /db1vip/10.200.0.105/10.200.0.0/255.255.255.0/eth0, hosting node db1
[grid@db1 ~]$ srvctl config vip -n db2
vip exists: /db2vip/10.200.0.107/10.200.0.0/255.255.255.0/eth0, hosting node db2
檢查節點監聽與監聽配置
[grid@db1 ~]$ srvctl status listener
listener listener is enabled
listener listener is running on node(s): db1,db2
grid@db1 ~]$ srvctl config listener -a
name: listener
network: 1, owner: grid
home:
end points: tcp:1521
檢查 資料庫例項狀態
[grid@db1 ~]$ sr
vctl status database -d dmzdb
instance dmzdb1 is running on node db1
instance dmzdb2 is running on node db2
[grid@db1 ~]$ srvctl status instance -d dmzdb -i dmzdb1,dmzdb2
instance dmzdb1 is running on node db1
instance dmzdb2 is running on node db2
資料庫配置
[grid@db1 ~]$ srvctl config database -d dmzdb -a
database unique name: dmzdb
database name: dmzdb
oracle user: oracle
spfile: +data/dmzdb/spfiledmzdb.ora
domain:
start options: open
stop options: immediate
database role: primary
management policy: automatic
server pools: dmzdb
database instances: dmzdb1,dmzdb2
disk groups: data
mount point paths:
services:
type: rac
database is enabled
database is administrator managed
asm狀態及配置
[grid@db1 ~]$ srvctl status asm
asm is running on db1,db2
[grid@db1 ~]$ srvctl config asm -a
asm listener: listener
asm is enabled.
scan狀態及配置
[grid@db1 ~]$ srvctl status scan
scan vip scan1 is enabled
scan vip scan1 is running on node db1
grid@db1 ~]$ srvctl config scan
scan name: dbscan, network: 1/10.200.0.0/255.255.255.0/eth0
scan vip name: scan1, ip: /dbscan/10.200.0.109
停止db1監聽
[grid@db1 ~]$ srvctl stop listener -n db1
[grid@db1 ~]$ srvctl status listener -n db1
listener listener is enabled on node(s): db1
listener listener is not running on node(s): db1
停例項db1
[grid@db1 ~]$ srvctl stop instance -d dmzdb -n db1
[grid@db1 ~]$ srvctl status instance -d dmzdb -n db1
instance dmzdb1 is not running on node db1
instance dmzdb1 is not running on node db1
啟動db1例項
[grid@db1 ~]$ srvctl start instance -d dmzdb -n db1
[grid@db1 ~]$ srvctl status instance -d dmzdb -n db1
instance dmzdb1 is running on node db1
啟動db1監聽
[grid@db1 ~]$ srvctl start listener -n db1
[grid@db1 ~]$ srvctl status listener -n db1
listener listener is enabled on node(s): db1
listener listener is running on node(s): db1
from:
mysql檢視資料庫命令
mysql檢視資料庫命令 開啟的資料庫的命令 mysql use mysql database changed 檢視資料庫的命令 mysql show databases 檢視資料表的詳細結構 mysql desc func 新建資料庫 mysql create database school qu...
常用資料庫命令
檢視所有資料庫 show databases 使用資料庫 use 資料庫名 檢視當前所有的資料庫 select database 建立資料庫 create database 資料庫名 charset utf8 例 create database python charset utf8 刪除資料庫 d...
Oracle常用啟停命令
一 監聽啟停 oracle監聽的啟動 停止和狀態檢視 oracle監聽啟動 lsnrctl start oracle監聽停止 lsnrctl stop oracle監聽狀態 lsnrctl status oracle監聽的過載 lsnrctl reload 注 如果對監聽配置檔案做了修改,又不想停止...