And here's the simple result:
Remember? In our environment, oracle's .bash_profile runs an additional script, which prints all - at this very moment existing - oracle databases, listeners, their status and the according ORACLE_HOMEs to STDOUT. Output looks like this:
######################################################
# Following Databases/Aliases are on the ODA oda-o1234
######################################################
================================================================================
SID/PROCESS STATUS E_ORACLE_HOME
--------------------------------------------------------------------------------
+ASM1 up /u01/app/12.2.0.1/oracle
TEST1 up /u01/app/oracle/product/12.1.0.2/dbhome_1
TEST2c up /u01/app/oracle/product/12.1.0.2/dbhome_1
TEST2D up /u01/app/oracle/product/12.1.0.2/dbhome_1
TEST2E up /u01/app/oracle/product/12.1.0.2/dbhome_1
LISTENER up /u01/app/12.2.0.1/oracle
The easy test:
Add two 'echo' lines to oracle's .bash_profile that it looks like this:
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
umask 022
echo "1111111111111111111111111111111111111111111111111"
echo "2222222222222222222222222222222222222222222222222"
Create a database using the 'odacli create-database' command:
odacli create-database -m -dh 665b9ce4-3a13-4a04-8ccd-548e66556def -n TEST2F -r ACFSWhen the database is created, issue an 'odacli list-databases' and, subsequently, an 'odacli describe-database -i <id of that database>' - check the DBID (concatenated echo "1"s plus the echo "2"s plus the 'real' DBID):
Database details
----------------------------------------------------------------
ID: 2a5426bc-8db9-4d07-ba87-b54f06dbbcc3
Description: TEST2F
DB Name: TEST2F
DB Version: 12.1.0.2
DB Type: Si
DB Edition: EE
DBID: 111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222498916505
Instance Only Database: false
CDB: false
PDB Name:
PDB Admin User Name:
Class: OLTP
Shape: Odb1
Storage: ACFS
CharacterSet: AL32UTF8
National CharacterSet: AL16UTF16
Language: AMERICAN
Territory: AMERICA
Home ID: 665b9ce4-3a13-4a04-8ccd-548e66556def
Console Enabled: false
Level 0 Backup Day: Sunday
AutoBackup Disabled: false
Created: November 7, 2018 12:58:45 PM CET
DB Domain Name: world
The database's DBID - which is the last portion in odacli's DBID:
SQL> select dbid from v$database;
DBID
----------
2498916505
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.