Thứ Hai, 19 tháng 1, 2026

Sử dụng SRVCTL trong Oracle RAC

Thực thi các lệnh bên dưới với  tư cách người sở hữu bản cài đặt phần mềm Oracle hoặc RDBMS .

Xin lưu ý rằng ở đây, mydb là DB_UNIQUE_NAME được sử dụng trong tất cả các lệnh srvctl.
rac1 và rac2 là tên máy chủ của các nút trong cụm.

#Command to list the DB_UNIQUE_NAME configured in srvctl. This is required if you don't know the DB_UNIQUE_NAME configured in srvctl.
[oracle@rac1 ~]$ srvctl config db
mydb

#Command to check the srvctl configuration for the mentioned DB_UNIQUE_NAME. 
[oracle@rac1 ~]$ srvctl config db -d mydb
Database unique name: mydb
Database name: mydb
Oracle home: /u01/app/oracle/product/12.1.0.2/dbhome_1
Oracle user: oracle
Spfile: +DATA/MYDB/PARAMETERFILE/spfile.268.1162771255
Password file: +DATA/MYDB/PASSWORD/pwdmydb.256.1162770639
Domain: 
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: 
Disk Groups: DATA,REDO1
Mount point paths: 
Services: 
Type: RAC
Start concurrency: 
Stop concurrency: 
OSDBA group: dba
OSOPER group: oper
Database instances: mydb1,mydb2
Configured nodes: rac1,rac2
Database is administrator managed

#Command to check the srvctl configuration with verbose modes for the mentioned DB_UNIQUE_NAME. 
[oracle@rac1 ~]$ srvctl config db -d mydb -v
Database unique name: mydb
Database name: mydb
Oracle home: /u01/app/oracle/product/12.1.0.2/dbhome_1
Oracle user: oracle
Spfile: +DATA/MYDB/PARAMETERFILE/spfile.268.1162771255
Password file: +DATA/MYDB/PASSWORD/pwdmydb.256.1162770639
Domain: 
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: 
Disk Groups: DATA,REDO1
Mount point paths: 
Services: 
Type: RAC
Start concurrency: 
Stop concurrency: 
OSDBA group: dba
OSOPER group: oper
Database instances: mydb1,mydb2
Configured nodes: rac1,rac2
Database is administrator managed

OR

[oracle@rac1 ~]$ srvctl config db -d mydb -verbose
Database unique name: mydb
Database name: mydb
Oracle home: /u01/app/oracle/product/12.1.0.2/dbhome_1
Oracle user: oracle
Spfile: +DATA/MYDB/PARAMETERFILE/spfile.268.1162771255
Password file: +DATA/MYDB/PASSWORD/pwdmydb.256.1162770639
Domain: 
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: 
Disk Groups: DATA,REDO1
Mount point paths: 
Services: 
Type: RAC
Start concurrency: 
Stop concurrency: 
OSDBA group: dba
OSOPER group: oper
Database instances: mydb1,mydb2
Configured nodes: rac1,rac2
Database is administrator managed

#Check the status of DB instances mentioned DB_UNIQUE_NAME.
[oracle@rac1 ~]$ srvctl status db -d mydb
Instance mydb1 is running on node rac1
Instance mydb2 is running on node rac2

#Check the SCAN configuration
[oracle@rac1 ~]$ srvctl config scan
SCAN name: rac-scan, Network: 1
Subnet IPv4: 192.168.28.0/255.255.255.0/eth3, static
Subnet IPv6: 
SCAN 0 IPv4 VIP: 192.168.28.201
SCAN VIP is enabled.
SCAN VIP is individually enabled on nodes: 
SCAN VIP is individually disabled on nodes: 
SCAN 1 IPv4 VIP: 192.168.28.202
SCAN VIP is enabled.
SCAN VIP is individually enabled on nodes: 
SCAN VIP is individually disabled on nodes: 
SCAN 2 IPv4 VIP: 192.168.28.203
SCAN VIP is enabled.
SCAN VIP is individually enabled on nodes: 
SCAN VIP is individually disabled on nodes: 

#Check the ASM configuration
[oracle@rac1 ~]$ srvctl config asm
ASM home: <CRS home>
Password file: +DG_OCR/orapwASM
ASM listener: LISTENER

#Check the ASM configuration in detail.
[oracle@rac1 ~]$ srvctl config asm -detail
ASM home: <CRS home>
Password file: +DG_OCR/orapwASM
ASM listener: LISTENER
ASM is enabled.
ASM is individually enabled on nodes: 
ASM is individually disabled on nodes: 
 
#Check the status of Oracle SCAN.
[oracle@rac1 ~]$ srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node rac1
SCAN VIP scan2 is enabled
SCAN VIP scan2 is running on node rac1
SCAN VIP scan3 is enabled
SCAN VIP scan3 is running on node rac1

#Check the SCAN Listener configuration with PORT.
[oracle@rac1 ~]$ srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1530
Registration invited nodes: 
Registration invited subnets: 
SCAN Listener is enabled.
SCAN Listener is individually enabled on nodes: 
SCAN Listener is individually disabled on nodes: 
SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1530
Registration invited nodes: 
Registration invited subnets: 
SCAN Listener is enabled.
SCAN Listener is individually enabled on nodes: 
SCAN Listener is individually disabled on nodes: 
SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1530
Registration invited nodes: 
Registration invited subnets: 
SCAN Listener is enabled.
SCAN Listener is individually enabled on nodes: 
SCAN Listener is individually disabled on nodes: 

#Check the status of Oracle SCAN Listener.
[oracle@rac1 ~]$ srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node rac1
SCAN Listener LISTENER_SCAN2 is enabled
SCAN listener LISTENER_SCAN2 is running on node rac1
SCAN Listener LISTENER_SCAN3 is enabled
SCAN listener LISTENER_SCAN3 is running on node rac1

#Check the status of Oracle Database
[oracle@rac1 ~]$ srvctl status db -d mydb
Instance mydb1 is running on node rac1
Instance mydb2 is running on node rac2

#Check the status of Oracle Database with verbose mode.
[oracle@rac1 ~]$ srvctl status db -d mydb -v
Instance mydb1 is running on node rac1. Instance status: Open.
Instance mydb2 is running on node rac2. Instance status: Open.

OR

[oracle@rac1 ~]$ srvctl status db -d mydb -verbose
Instance mydb1 is running on node rac1. Instance status: Open.
Instance mydb2 is running on node rac2. Instance status: Open.
 
#Check the status of Oracle RAC instances on specific node.
[oracle@rac1 ~]$ srvctl status instance -d mydb -i mydb2
Instance mydb2 is running on node rac2

OR

[oracle@rac1 ~]$ srvctl status instance -d mydb -n rac2
Instance mydb2 is running on node rac2

#Check the status of services configured for the database. Here, no services are configured.
[oracle@rac1 ~]$ srvctl status service -d mydb
[oracle@rac1 ~]$ 
=============================
TƯ VẤN: Click hoặc Hotline/Zalo 090.29.12.888
=============================
Website không chứa bất kỳ quảng cáo nào, mọi đóng góp để duy trì phát triển cho website (donation) xin vui lòng gửi về STK 90.2142.8888 - Ngân hàng Vietcombank Thăng Long - TRAN VAN BINH
=============================
Nếu bạn không muốn bị AI thay thế và tiết kiệm 3-5 NĂM trên con đường trở thành DBA chuyên nghiệp hay làm chủ Database thì hãy đăng ký ngay KHOÁ HỌC ORACLE DATABASE A-Z ENTERPRISE, được Coaching trực tiếp từ tôi với toàn bộ bí kíp thực chiến, thủ tục, quy trình của gần 20 năm kinh nghiệm (mà bạn sẽ KHÔNG THỂ tìm kiếm trên Internet/Google) từ đó giúp bạn dễ dàng quản trị mọi hệ thống Core tại Việt Nam và trên thế giới, đỗ OCP.
- CÁCH ĐĂNG KÝ: Gõ (.) hoặc để lại số điện thoại hoặc inbox https://m.me/tranvanbinh.vn hoặc Hotline/Zalo 090.29.12.888
- Chi tiết tham khảo:
https://bit.ly/oaz_w
=============================
2 khóa học online qua video giúp bạn nhanh chóng có những kiến thức nền tảng về Linux, Oracle, học mọi nơi, chỉ cần có Internet/4G:
- Oracle cơ bản: https://bit.ly/admin_1200
- Linux: https://bit.ly/linux_1200
=============================
KẾT NỐI VỚI CHUYÊN GIA TRẦN VĂN BÌNH:
📧 Mail: binhoracle@gmail.com
☎️ Mobile/Zalo: 0902912888
👨 Facebook: https://www.facebook.com/BinhOracleMaster
👨 Inbox Messenger: https://m.me/101036604657441 (profile)
👨 Fanpage: https://www.facebook.com/tranvanbinh.vn
👨 Inbox Fanpage: https://m.me/tranvanbinh.vn
👨👩 Group FB: https://www.facebook.com/groups/DBAVietNam
👨 Website: https://www.tranvanbinh.vn
👨 Blogger: https://tranvanbinhmaster.blogspot.com
🎬 Youtube: https://www.youtube.com/@binhguru
👨 Tiktok: https://www.tiktok.com/@binhguru
👨 Linkin: https://www.linkedin.com/in/binhoracle
👨 Twitter: https://twitter.com/binhguru
👨 Podcast: https://www.podbean.com/pu/pbblog-eskre-5f82d6
👨 Địa chỉ: Tòa nhà Sun Square - 21 Lê Đức Thọ - Phường Mỹ Đình 1 - Quận Nam Từ Liêm - TP.Hà Nội

=============================
cơ sở dữ liệu, cơ sở dữ liệu quốc gia, database, AI, trí tuệ nhân tạo, artificial intelligence, machine learning, deep learning, LLM, ChatGPT, DeepSeek, Grok, oracle tutorial, học oracle database, Tự học Oracle, Tài liệu Oracle 12c tiếng Việt, Hướng dẫn sử dụng Oracle Database, Oracle SQL cơ bản, Oracle SQL là gì, Khóa học Oracle Hà Nội, Học chứng chỉ Oracle ở đầu, Khóa học Oracle online,sql tutorial, khóa học pl/sql tutorial, học dba, học dba ở việt nam, khóa học dba, khóa học dba sql, tài liệu học dba oracle, Khóa học Oracle online, học oracle sql, học oracle ở đâu tphcm, học oracle bắt đầu từ đâu, học oracle ở hà nội, oracle database tutorial, oracle database 12c, oracle database là gì, oracle database 11g, oracle download, oracle database 19c/21c/23c/23ai, oracle dba tutorial, oracle tunning, sql tunning , oracle 12c, oracle multitenant, Container Databases (CDB), Pluggable Databases (PDB), oracle cloud, oracle security, oracle fga, audit_trail,oracle RAC, ASM, oracle dataguard, oracle goldengate, mview, oracle exadata, oracle oca, oracle ocp, oracle ocm , oracle weblogic, postgresql tutorial, mysql tutorial, mariadb tutorial, ms sql server tutorial, nosql, mongodb tutorial, oci, cloud, middleware tutorial, docker, k8s, micro service, hoc solaris tutorial, hoc linux tutorial, hoc aix tutorial, unix tutorial, securecrt, xshell, mobaxterm, putty

ĐỌC NHIỀU

Trần Văn Bình - Oracle Database Master