Oracle Grid Infrastructure & DMK
Command completion
srvctl command-completion with bash
If your shell is bash, you can benefit from the command completion function for the srvctl utility of clusterware.
With the [Tab] key you can complete the options, and for some options also the value.
If the substring of the option is not yet unique, press the [Tab]
key 2 or 3 times, then it shows possible choices.
oracle@racp1vm1:~/ [grinf19] srvctl add database -db DB01 -[Tab][Tab]
-acfspath -defaultnetnum -maxmemory -pwfile -startoption
-cpucount -diskgroup -memorytarget -role -stopconcurrency
-css_critical -domain -node -server -stopoption
-db -eval -oraclehome -serverpool -timeout
-dbname -fixed -policy -spfile -verbose
-dbtype -instance -pqpool -startconcurrency
or
srvctl modify listener -listener [Tab][Tab]
shows the existing listeners (can take 1-2sec.) . Afterwards, type the beginning of the listener-name until it is unique, then complete the rest of the name with [Tab]. Generally: to complete values, it can take some seconds. It queries the cluster in the background for possible values.
Status of Clusterware
To show the status of clusterware (crsctl status resource ...) with an easy-to-read output, you can use the status.pl script with parameter crs
, or you can use the alias cstat
:
oracle@racp1vm2:~/ [rdbms1900] cstat
CRS Resource Target State Host(s)
------------------------ ------ ----- ---------------------
ora.ASMNET1LSNR_ASM.lsnr ONL ONL racp1vm1 [racp1vm2](E)
ora.CRSDG.dg ONL ONL racp1vm1 [racp1vm2]
ora.DATA.dg ONL ONL racp1vm1 [racp1vm2]
ora.FRA.dg ONL ONL racp1vm1 [racp1vm2]
ora.LISTENER.lsnr ONL ONL racp1vm1 racp1vm2
ora.LISTENER_SCAN1.lsnr ONL ONL racp1vm2
ora.LISTENER_SCAN2.lsnr ONL ONL racp1vm1
ora.LISTENER_SCAN3.lsnr ONL ONL racp1vm1
ora.asm ONL ONL racp1vm1 [racp1vm2]
ora.asmnet1.asmnetwork ONL ONL racp1vm1 [racp1vm2]
ora.chad ONL ONL racp1vm1 racp1vm2
ora.cvu ONL ONL racp1vm1
ora.net1.network ONL ONL racp1vm1 racp1vm2
ora.ons ONL ONL racp1vm1 racp1vm2
ora.qosmserver ONL ONL racp1vm1
ora.racdb.db ONL ONL racp1vm1 racp1vm2
ora.racp1vm1.vip ONL ONL racp1vm1
ora.racp1vm2.vip ONL ONL racp1vm2
ora.scan1.vip ONL ONL racp1vm2
ora.scan2.vip ONL ONL racp1vm1
ora.scan3.vip ONL ONL racp1vm1
Resource status is: (E) => not OK; (W) => has to be checked
Resource on Host: [host] => OFFLINE, (host) => INTERMEDIATE, host => ONLINE
Status at 2025-03-17 20:07:10
This example is from the non-colored version (variable DMK_COLOR_NO_COLOR
=1)
User-separation (oracle and grid user) with DMK
One major advantage of DMK is the ability to support multiple ORACLE_BASE environments, especially useful for Oracle Grid Infrastructure. Oracle and dbi services recommend separating the duties of an ASMDBA (ASM storage DBA) from an Oracle Database DBA (SYSDBA). In this short chapter we present how one can realize it with DMK.
First, install the DMK under one user as explained in the installation chapter. Before starting with the installation for the second user, set the correct permissions, as presented by the following example:
oracle@vml:/u01/app/oracle/local/ [DB1] chgrp -R oinstall dmk
oracle@vml:/u01/app/oracle/local/ [DB1] chmod -R g+w dmk
oracle@vml:/u01/app/oracle/local/ [DB1] chmod g+x $(find dmk -type d)
oracle@vml:/u01/app/oracle/local/ [DB1] chmod g+s dmk/etc
In the above example the root installation has been done as the oracle
user.
DMK uses the Perl interpreter from the currently set ORACLE_HOME environment. Sometimes, Oracle delivers a Perl that only works for the owner, but not the group. In this case, some privileges must be changed. In the following example, we grant the user oracle
to execute the perl from Grid Infrastructure Oracle Home.
grid@vml:/u01/app/grid/ [grid] chmod g+x $ORACLE_HOME/perl/bin/perl
grid@vml:/u01/app/grid/ [grid] chmod -R g+r $ORACLE_HOME/perl/lib
Example of an error, if missed to change:
2012-06-25_20:38:34::dmk.bash::MainProgram ::CRITICAL ==> Execution permision missing on PERL_EXEC=/u01/app/grid/…
ℹ️The above operations affect the privileges of the grid user, because DMK is installed as user “oracle”, but they are also needed to enable the reverse situation.
Last updated