Tuesday, November 10, 2015

dbaascli - CLI for different tools to be used with Oracle Cloud DB

[oracle@ATLAS:/home/oracle]$ rpm -qa|grep -i dbaastools
dbaastools-1.0-1+15.3.6.0.0_150928.2115.x86_64
[oracle@ATLAS:/home/oracle]$ which dbaascli
/usr/bin/dbaascli
[oracle@ATLAS:/home/oracle]$ ls -ltra /usr/bin/dbaascli
lrwxrwxrwx 1 root root 33 Sep 29 06:43 /usr/bin/dbaascli -> /var/opt/oracle/dbaascli/dbaascli
[oracle@ATLAS:/var/opt/oracle/dbaascli]$ ll
total 40
-r-xr-xr-x 1 oracle oinstall 20701 Sep 29 04:55 dbaascli
drwxr-xr-x 2 oracle oinstall 4096 Sep 29 06:43 Documentation
drwxr-xr-x 12 oracle oinstall 4096 Sep 29 06:43 modules
drwxr-xr-x 3 oracle oinstall 4096 Sep 29 06:43 modulesperllib
drwxr-xr-x 9 oracle oinstall 4096 Sep 29 06:43 perllib
[oracle@ATLAS:/var/opt/oracle/dbaascli]$ ll modules/
total 52
drwxr-xr-x 2 oracle oinstall 4096 Sep 29 06:43 database
drwxr-xr-x 2 oracle oinstall 4096 Sep 29 06:43 dataguard
-r-xr-xr-x 1 oracle oinstall 1882 Sep 29 04:55 dbpatchm.pm
drwxr-xr-x 4 oracle oinstall 4096 Nov 10 19:13 dv
drwxr-xr-x 3 oracle oinstall 4096 Sep 29 06:43 examples
drwxr-xr-x 2 oracle oinstall 4096 Sep 29 06:43 glassfish
drwxr-xr-x 2 oracle oinstall 4096 Sep 29 06:43 listener
-r-xr-xr-x 1 oracle oinstall 2268 Sep 29 04:55 mrec.pm
drwxr-xr-x 5 oracle oinstall 4096 Sep 29 06:43 netsec
drwxr-xr-x 2 oracle oinstall 4096 Sep 29 06:43 ore
-r-xr-xr-x 1 oracle oinstall 2978 Sep 29 04:55 orec.pm
drwxr-xr-x 3 oracle oinstall 4096 Sep 29 06:43 tde
drwxr-xr-x 2 oracle oinstall 4096 Sep 29 06:43 tfa
[oracle@ATLAS:/var/opt/oracle/dbaascli]$ ll Documentation/
total 16
-r-xr-xr-x 1 oracle oinstall 714 Sep 29 04:55 CliDocumentation.txt
-r-xr-xr-x 1 oracle oinstall 7835 Sep 29 04:55 Module_Design_Guide.txt
-r-xr-xr-x 1 oracle oinstall 830 Sep 29 04:55 template.pm
##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##
##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##
[oracle@ATLAS:/home/oracle]$ dbaascli help
DBAAS CLI version 1.0.0
Help for dbaascli
dbaascli is a command line interface for different tools to be used with Oracle Cloud DB.
This command line interface supports logging, command history and autocomplete.
Logging is done on a session level. Each time dbaascli is run the last log is overwritten.
To access command history use the up/down arrow keys as you would normally do in a terminal.
Autocomplete uses the Tab key. Autocomplete will complete to the longest common string in case there is not an exact match.
To obtain help on a command use the help keyword at the begining or end.
Autocomplete is supported if the first word is the "help" keyword.
Special commands are available.
The list of special commands is:
-H
-HELP
? - Get dbaascli help
CLEAR - Clear the screen
HELP - Get dbaascli help
HIST - Print command line history
HISTORY - Print command line history
LIST - List available commands
Q - Exit Command Line Interface
QUIT - Exit Command Line Interface
##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##
##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##
[oracle@ATLAS:/home/oracle]$ dbaascli list
DBAAS CLI version 1.0.0
Very Long Text, press q to quit
Available commands:
database bounce
database start
database status
database stop
dataguard failover
dataguard status
dataguard switchover
dbpatchm
dv off
dv off cdb
dv off pdb
dv on
dv on cdb
dv on pdb
glassfish start
glassfish status
glassfish stop
listener bounce
listener start
listener status
listener stop
mrec
netsec config
netsec config encryption
netsec config integrity
netsec deconfig
netsec deconfig encryption
netsec deconfig integrity
netsec status
netsec status encryption
netsec status integrity
ore setup
orec
tde config
tde rotate
tde rotate masterkey
tde status
tfa install
tfa uninstall
##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##
##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##
[oracle@ATLAS:/home/oracle]$ dbaascli database help
DBAAS CLI version 1.0.0
Executing command database help
Valid Subcommands:
bounce
stop
status
start
[oracle@ATLAS:/home/oracle]$ dbaascli dataguard help
DBAAS CLI version 1.0.0
Executing command dataguard help
Valid Subcommands:
switchover
status
failover
[oracle@ATLAS:/home/oracle]$ dbaascli listener help
DBAAS CLI version 1.0.0
Executing command listener help
Valid Subcommands:
bounce
stop
status
start
[oracle@ATLAS:/home/oracle]$ # Database Vault
[oracle@ATLAS:/home/oracle]$ dbaascli dv help
DBAAS CLI version 1.0.0
Executing command dv help
Valid Subcommands:
on
off
[oracle@ATLAS:/home/oracle]$ dbaascli dbpatchm help
DBAAS CLI version 1.0.0
Executing command dbpatchm help
Command: dbpatchm
Help for DB patching
Parameters:
--run Format: Not defined Required: YES
dbpatchm --run -prereq
dbpatchm --run -setup
dbpatchm --run -config
dbpatchm --run -apply
dbpatchm --run -clonedb
dbpatchm --run -cleanup
dbpatchm --run -reset
dbpatchm --run -list_patches
dbpatchm --run -rollback
[oracle@ATLAS:/home/oracle]$ # Media Recovery
[oracle@ATLAS:/home/oracle]$ dbaascli mrec help
DBAAS CLI version 1.0.0
Executing command mrec help
Command: mrec
Help for MREC tool.
Parameters:
--args Format: Not defined Required: NO
Usage:
mrec --args -oss_cfgfile <cfgfile> -old_hostname <vm_name>
mrec --args -oss_cfgfile <cfgfile> -old_hostname <vm_name> -sid <oracle_sid>
Where:
-help = Print this help.
-oss_cfgfile = full path to OSS config file.
-old_hostname = Name of the host to recover.
-sid = ORACLE SID of the DB instance to recover. Default is orcl
Examples:
mrec --args -oss_cfgfile /var/opt/oracle/mrec/oss.cfg -old_hostname vmprod01
mrec --args -oss_cfgfile /var/opt/oracle/mrec/oss.cfg -old_hostname vmprod01 -sid orcl
##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##
##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##--~~##
[oracle@ATLAS:/var/opt/oracle/dbaascli/modules]$ dbaascli list | grep database
database bounce
database start
database status
database stop
[oracle@ATLAS:/var/opt/oracle/dbaascli/modules/database]$ ls -l
total 16
-r-xr-xr-x 1 oracle oinstall 2377 Sep 29 04:55 bounce.pm
-r-xr-xr-x 1 oracle oinstall 3634 Sep 29 04:55 start.pm
-r-xr-xr-x 1 oracle oinstall 3437 Sep 29 04:55 status.pm
-r-xr-xr-x 1 oracle oinstall 3007 Sep 29 04:55 stop.pm
[oracle@ATLAS:/home/oracle]$ dbaascli database status
DBAAS CLI version 1.0.0
Executing command database status
Database Status:
Database is open
Database name: ATLAS
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
PL/SQL Release 12.1.0.2.0 - Production
CORE 12.1.0.2.0 Production
TNS for Linux: Version 12.1.0.2.0 - Production
NLSRTL Version 12.1.0.2.0 - Production
##--~~##--~~##--~~##--~~##--~~##--~~##--~~##
[oracle@ATLAS:/var/opt/oracle/dbaascli/modules]$ dbaascli list | grep listener
listener bounce
listener start
listener status
listener stop
[oracle@ATLAS:/var/opt/oracle/dbaascli/modules/listener]$ ls -l
total 16
-r-xr-xr-x 1 oracle oinstall 1255 Sep 29 04:55 bounce.pm
-r-xr-xr-x 1 oracle oinstall 1337 Sep 29 04:55 start.pm
-r-xr-xr-x 1 oracle oinstall 1336 Sep 29 04:55 status.pm
-r-xr-xr-x 1 oracle oinstall 1331 Sep 29 04:55 stop.pm
[oracle@ATLAS:/home/oracle]$ dbaascli listener status
DBAAS CLI version 1.0.0
Executing command listener status
Starting listener
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 10-NOV-2015 19:02:44
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=XXXX.compute-xxxxxxxx.oraclecloud.internal)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 2: No such file or directory
[oracle@ATLAS:/home/oracle]$ dbaascli listener start
DBAAS CLI version 1.0.0
Executing command listener start
Starting listener
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 10-NOV-2015 19:03:02
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Starting /u01/app/oracle/product/12.1.0/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 12.1.0.2.0 - Production
System parameter file is /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/ATLAS/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=XXXX.compute-xxxxxxxx.oraclecloud.internal)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=XXXX.compute-xxxxxxxx.oraclecloud.internal)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date 10-NOV-2015 19:03:02
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/ATLAS/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=XXXX.compute-xxxxxxxx.oraclecloud.internal)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully
##--~~##--~~##--~~##--~~##--~~##--~~##--~~##
[oracle@ATLAS:/var/opt/oracle/dbaascli/modules]$ dbaascli list | grep netsec
netsec config
netsec config encryption
netsec config integrity
netsec deconfig
netsec deconfig encryption
netsec deconfig integrity
netsec status
netsec status encryption
netsec status integrity
[oracle@ATLAS:/var/opt/oracle/dbaascli/modules/netsec]$ ls -lR
.:
total 24
drwxr-xr-x 2 oracle oinstall 4096 Sep 29 06:43 config
-r-xr-xr-x 1 oracle oinstall 3847 Sep 29 04:55 config.pm
drwxr-xr-x 2 oracle oinstall 4096 Sep 29 06:43 deconfig
-r-xr-xr-x 1 oracle oinstall 1751 Sep 29 04:55 deconfig.pm
drwxr-xr-x 2 oracle oinstall 4096 Sep 29 06:43 status
-r-xr-xr-x 1 oracle oinstall 1596 Sep 29 04:55 status.pm
./config:
total 8
-r-xr-xr-x 1 oracle oinstall 2390 Sep 29 04:55 encryption.pm
-r-xr-xr-x 1 oracle oinstall 2433 Sep 29 04:55 integrity.pm
./deconfig:
total 8
-r-xr-xr-x 1 oracle oinstall 2330 Sep 29 04:55 encryption.pm
-r-xr-xr-x 1 oracle oinstall 2316 Sep 29 04:55 integrity.pm
./status:
total 8
-r-xr-xr-x 1 oracle oinstall 1677 Sep 29 04:55 encryption.pm
-r-xr-xr-x 1 oracle oinstall 1657 Sep 29 04:55 integrity.pm
[oracle@ATLAS:/var/opt/oracle/dbaascli/modules/database]$ dbaascli netsec status
DBAAS CLI version 1.0.0
Executing command netsec status
Displaying configuration for network encryption:
Server encryption type = required
Server encryption methods = AES256,AES192,AES128
Client encryption status is Disabled
Displaying configuration for network integrity:
Server integrity checksum_level = required
Server integrity methods = SHA1
Client integrity status is Disabled
view raw gistfile1.txt hosted with ❤ by GitHub

No comments:

Post a Comment