Open m1nka opened 1 year ago
Issue fixed in the next release: example how to retrieve database connection alias
( $0 ~ /Domain Name:/ ) { DB_DOMAIN=$3 }
( $0 ~ /Host Name:/ ) { HOSTNAME=$3 }
( $0 ~ /Listener Port:/ ) { PORT=$3 }
END {
printf ("db_unique_name=%s\n",DB_UNIQUE_NAME);
printf ("db_domain=%s\n",DB_DOMAIN);
printf ("hostname=%s\n",HOSTNAME);
printf ("port=%s\n",PORT);
printf ("====== TNSALIAS ======\n");
printf ("(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=%s)(PORT=%s))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=%s.%s)))\n",
HOSTNAME,PORT,DB_UNIQUE_NAME,DB_DOMAIN);
}
'
db_unique_name=testdb_fg4_lin
db_domain=vcndns.oraclevcn.com
hostname=host1205
port=1521
====== TNSALIAS ======
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=host1205)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=testdb_fg4_lin.vcndns.oraclevcn.com)))
Hi, the documentation page for connecting to a database that is also linked here does not exist. Thank you.