database:oracle:rac:commands
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| database:oracle:rac:commands [2018/12/03 10:46] – odefta | database:oracle:rac:commands [2023/07/04 16:36] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 178: | Line 178: | ||
| "Hard Limit: maximum open file descriptors" | "Hard Limit: maximum open file descriptors" | ||
| </ | </ | ||
| + | |||
| + | ===== Check if instances are running in RAC ===== | ||
| + | |||
| + | Suppose global SID name is SNT: | ||
| + | |||
| + | < | ||
| + | srvctl status database -db SNT | ||
| + | </ | ||
| + | |||
| + | Output should be: | ||
| + | |||
| + | < | ||
| + | Instance SNT1 is running on node lptxrac122n1 | ||
| + | Instance SNT2 is running on node lptxrac122n2 | ||
| + | </ | ||
| + | |||
| + | ===== Find server pool name ===== | ||
| + | |||
| + | < | ||
| + | srvctl status srvpool | ||
| + | </ | ||
| + | |||
| + | Possible output: | ||
| + | |||
| + | < | ||
| + | Server pool name: Free | ||
| + | Active servers count: 0 | ||
| + | Server pool name: Generic | ||
| + | Active servers count: 2 | ||
| + | </ | ||
| + | |||
| + | ===== Automate start / stop PDB ===== | ||
| + | |||
| + | Adding the service (for admin-managed database) with PDB name SNTL: | ||
| + | |||
| + | < | ||
| + | srvctl add service -db SNT -service plug -preferred SNT1 -available SNT2 -tafpolicy BASIC -policy AUTOMATIC -failovertype SELECT -failovermethod BASIC -failoverretry 5 -pdb SNTL -verbose | ||
| + | </ | ||
| + | |||
| + | Start the service: | ||
| + | |||
| + | < | ||
| + | srvctl start service -db SNT -s plug | ||
| + | </ | ||
| + | |||
| + | Check that the PDB is started: | ||
| + | |||
| + | < | ||
| + | sqlplus / as sysdba | ||
| + | SQL*Plus: Release 12.2.0.1.0 Production on Mon Dec 3 20:11:28 2018 | ||
| + | |||
| + | Copyright (c) 1982, 2016, Oracle. | ||
| + | |||
| + | |||
| + | Connected to: | ||
| + | Oracle Database 12c Standard Edition Release 12.2.0.1.0 - 64bit Production | ||
| + | |||
| + | SQL> COLUMN NAME FORMAT A15 | ||
| + | SQL> COLUMN RESTRICTED FORMAT A10 | ||
| + | SQL> COLUMN OPEN_TIME FORMAT A30 | ||
| + | SQL> SELECT NAME, OPEN_MODE, RESTRICTED, OPEN_TIME FROM V$PDBS; | ||
| + | |||
| + | NAME OPEN_MODE | ||
| + | --------------- ---------- ---------- ------------------------------ | ||
| + | PDB$SEED | ||
| + | 00 | ||
| + | |||
| + | SNTL READ WRITE NO | ||
| + | 00 | ||
| + | |||
| + | |||
| + | SQL> exit | ||
| + | </ | ||
| + | |||
| + | Full custom URL to connect from java: | ||
| + | |||
| + | < | ||
| + | jdbc: | ||
| + | </ | ||
| + | |||
| + | |||
database/oracle/rac/commands.1543834004.txt.gz · Last modified: (external edit)
