ODA Basic Commands
A. Get Help
# Get help on oakcli and other commands
oakcli -h
B. Check System
# Check ODA model
oakcli show env_hw
# Check ODA software version
oakcli show version
oakcli show version -detail
# Lists all the records from the oak inventory
oakcli inventory -q
# Run default checks of system
oakcli validate -d
# Check if oakcli daemon is running
ps -ef|grep oakd
oakcli show ismaster
# Restart the oakd; this will hand the Master oakd process to the other node
oakcli restart oak
# Perform best practice check and recommended patch check
oakcli orachk
# List all database and corresponding home
oakcli show databases
# Show all Oracle RDBMS version installed
oakcli show dbhomes
# List all file system for database – must from Node 0
oakcli show dbstorage
# Validate ODA components
Oakcli validate -a
C. Create/Delete Database, etc. – All commands have to issue from Node 0
# Get db template name – only specifying block size and NLS character sets
oakcli show db_config_params
oakcli show db_config_params -conf amanda -detail
Example: creating ABCDEV12 under existing 12c home (Note: no –h specified a new Oracle home will be created)
oakcli create database -db XYZDEV12 -oh OraDb12102_home1 -params
Example: deleting ABCDEV12 (make sure the database is open; if it is nomount, the job will fail; bug)
oakcli delete database -db ABCDEV12
D. Upgrade/Patch
a. Download patch bundle(s) from Oracle Support
b. Copy bundle(s) to both nodes
c. Unpack patch bundle(s) on both nodes
d. Verify the component that is being patch is patchable
e. Apply patch (could be done in one step; it is better to patch the OS first, then the grid infrastructure, lastly the rdbms)
f. Upgrade database to the higher version
Example: patch to 12.1.2.3.0
Download:
p20690087_121230_Linux-x86-64_1of2.zip
p20690087_121230_Linux-x86-64_2of2.zip
On both nodes:
Copy to /tmp on both nodes
Unpack:
oakcli unpack –package /tmp/p20690087_121230_Linux-x86-64_1of2.zip
oakcli unpack –package /tmp/p20690087_121230_Linux-x86-64_2of2.zip
Verify:
oakcli update -patch 12.1.2.3.0 –verify
From Node 0:
Apply:
oakcli update -patch 12.1.2.3.0 –infra
oakcli update -patch 12.1.2.3.0 –gi
oakcli update -patch 12.1.2.3.0 --database
Upgrade:
oakcli upgrade database --db DWTST12 -to OraDb12102_home1
E. Check ASM
# Login as grid, set the proper environment
asmcmd
asmcmd>lsdg
asmcmd>lsof
asmcmd> volinfo --all ( or -a depending on the ODA version)
F. Collect System Diagnostic Information
# Collect all diag info, excluding adr, chmos
oakcli manage diagcollect
No comments:
Post a Comment