|
38 | 38 |
|
39 | 39 | package commons |
40 | 40 |
|
| 41 | +const CONTAINER_LISTENER_PORT int32 = 1521 |
| 42 | + |
| 43 | +const CONTAINER_TCPS_PORT int32 = 1522 |
| 44 | + |
41 | 45 | const ORACLE_UID int64 = 54321 |
42 | 46 |
|
43 | 47 | const ORACLE_GUID int64 = 54321 |
@@ -318,12 +322,12 @@ const InitORDSCMD string = "if [ -f $ORDS_HOME/config/ords/defaults.xml ]; then |
318 | 322 | "\numask 022" |
319 | 323 |
|
320 | 324 | const GetSessionInfoSQL string = "select s.sid || ',' || s.serial# as Info FROM v\\$session s, v\\$process p " + |
321 | | - "WHERE (s.username = 'ORDS_PUBLIC_USER' or "+ |
322 | | - "s.username = 'APEX_PUBLIC_USER' or "+ |
323 | | - "s.username = 'APEX_REST_PUBLIC_USER' or "+ |
324 | | - "s.username = 'APEX_LISTENER' or "+ |
325 | | - "s.username = 'C##_DBAPI_CDB_ADMIN' or "+ |
326 | | - "s.username = 'C##_DBAPI_PDB_ADMIN' ) AND p.addr(+) = s.paddr;" |
| 325 | + "WHERE (s.username = 'ORDS_PUBLIC_USER' or " + |
| 326 | + "s.username = 'APEX_PUBLIC_USER' or " + |
| 327 | + "s.username = 'APEX_REST_PUBLIC_USER' or " + |
| 328 | + "s.username = 'APEX_LISTENER' or " + |
| 329 | + "s.username = 'C##_DBAPI_CDB_ADMIN' or " + |
| 330 | + "s.username = 'C##_DBAPI_PDB_ADMIN' ) AND p.addr(+) = s.paddr;" |
327 | 331 |
|
328 | 332 | const KillSessionSQL string = "alter system kill session '%[1]s';" |
329 | 333 |
|
@@ -426,13 +430,12 @@ const ConfigureApexRest string = "if [ -f ${ORDS_HOME}/config/apex/apex_rest_con |
426 | 430 | "echo -e \"%[1]s\n%[1]s\" | %[2]s ; else echo \"Apex Folder doesn't exist\" ; fi ;" |
427 | 431 |
|
428 | 432 | const AlterApexUsers string = "\nALTER SESSION SET CONTAINER=%[2]s;" + |
429 | | - "\n ALTER USER APEX_PUBLIC_USER IDENTIFIED BY \\\"%[1]s\\\" ACCOUNT UNLOCK; "+ |
| 433 | + "\n ALTER USER APEX_PUBLIC_USER IDENTIFIED BY \\\"%[1]s\\\" ACCOUNT UNLOCK; " + |
430 | 434 | "\n ALTER USER APEX_REST_PUBLIC_USER IDENTIFIED BY \\\"%[1]s\\\" ACCOUNT UNLOCK;" + |
431 | 435 | "\n ALTER USER APEX_LISTENER IDENTIFIED BY \\\"%[1]s\\\" ACCOUNT UNLOCK;" + |
432 | 436 | "\nexec APEX_UTIL.set_workspace(p_workspace => 'INTERNAL');" + |
433 | 437 | "\nexec APEX_UTIL.EDIT_USER(p_user_id => APEX_UTIL.GET_USER_ID('ADMIN'), p_user_name => 'ADMIN', p_web_password => '%[1]s', p_new_password => '%[1]s');\n" |
434 | 438 |
|
435 | | - |
436 | 439 | const CopyApexImages string = " ( while true; do sleep 60; echo \"Copying Apex Images...\" ; done ) & mkdir -p /opt/oracle/oradata/${ORACLE_SID^^}_ORDS/apex/images && " + |
437 | 440 | " cp -R /opt/oracle/oradata/${ORACLE_SID^^}/apex/images/* /opt/oracle/oradata/${ORACLE_SID^^}_ORDS/apex/images; chown -R oracle:oinstall /opt/oracle/oradata/${ORACLE_SID^^}_ORDS/apex; kill -9 $!;" |
438 | 441 |
|
@@ -480,3 +483,15 @@ const SetApexUsers string = "\numask 177" + |
480 | 483 |
|
481 | 484 | // Get Sid, Pdbname, Edition for prebuilt db |
482 | 485 | const GetSidPdbEditionCMD string = "echo $ORACLE_SID,$ORACLE_PDB,$ORACLE_EDITION,Edition;" |
| 486 | + |
| 487 | +// Command to enable TCPS as a formatted string. The parameter would be the port at which TCPS is enabled. |
| 488 | +const EnableTcpsCMD string = "$ORACLE_BASE/$CONFIG_TCPS_FILE" |
| 489 | + |
| 490 | +// Command for TCPS certs renewal to prevent their expiry. It is same as the EnableTcpsCMD |
| 491 | +const RenewCertsCMD string = EnableTcpsCMD |
| 492 | + |
| 493 | +// Command to disable TCPS |
| 494 | +const DisableTcpsCMD string = "$ORACLE_BASE/$CONFIG_TCPS_FILE disable" |
| 495 | + |
| 496 | +// TCPS clientWallet update command |
| 497 | +const ClientWalletUpdate string = "sed -i -e 's/HOST.*$/HOST=%s)/g' -e 's/PORT.*$/PORT=%d)/g' ${ORACLE_BASE}/oradata/clientWallet/${ORACLE_SID}/tnsnames.ora" |
0 commit comments