B Non-Interactive ORDS CLI Commands Examples

This section provides some examples for non-interactive install/upgrade, and uninstall.

The following are examples for non-interactive install/upgrade, and uninstall.

The password file must contain the password(s) in the correct order to match the order of the user(s), option(s) that are specified on the command-line.

The following examples can be used for a PDB, CDB. Ensure that the --db-servicename option contains the correct value for the servicename for the CDB, PDB.

If the --log-folder <FOLDER> option is specified and the log folder does not exist, then the folder is created.

B.1 Non-Interactive Install/Upgrade

This section explains how to create a proxied APEX_PUBLIC_USER.

If APEX is installed and the APEX_PUBLIC_USER exists in the database, then the APEX_PUBLIC_USER is automatically configured to be a proxied user.

cat password.txt

<password for admin-user>

<password for proxy-user>

ords --config /path/to/test/config install --db-pool pdb1 --admin-user SYS --proxy-user --db-hostname localhost --db-port 1521 --db-servicename orcl --feature-sdw true --log-folder /path/to/logs --password-stdin < password.txt

B.2 Non-Interactive Install/Upgrade (create a proxied PLSQL Gateway User)

This section explains how to create a proxied PLSQL Gateway User.

Specify a PL/SQL gateway user and --gateway-mode proxied.

ords --config /path/to/test/config install --db-pool pdb2 --admin-user SYS --proxy-user --db-hostname localhost --db-port 1521 --db-servicename pdb2 --feature-sdw true --gateway-user EXAMPLE_USER1 --gateway-mode proxied --log-folder /path/to/logs --password-stdin < password.txt

B.3 Non-Interactive Install/Upgrade (specify PLSQL Gateway User and not using RESTful Services)

This section explains how to specify PLSQL Gateway User not using RESTful Services.

Specify a PL/SQL gateway user and --gateway-mode direct. The direct mode indicates that you are only using the PL/SQL GATEWAY and not RESTful Services. The gateway user password is required for direct mode.

cat gatewaypwd.txt

<password for admin-user>

<password for proxy-user>

<password for gateway-user>

ords --config /path/to/test/config install --db-pool pdb3 --admin-user SYS --proxy-user --db-hostname localhost --db-port 1521 --db-servicename pdb3 --gateway-user EXAMPLE_USER2 --gateway-mode direct --log-folder /path/to/logs --password-stdin < gatewaypwd.txt

B.4 Non-Interactive Install/Upgrade (disable a configured PLSQL Gateway)

This section explains how to disable a configured PLSQL Gateway.

Disables the proxied PL/SQL gateway user.

ords --config /path/to/test/config install --db-pool pdb2 --admin-user SYS --proxy-user --db-hostname localhost --db-port 1521 --db-servicename pdb2 --feature-sdw true --gateway-mode disabled --log-folder /path/to/logs --password-stdin < password.txt

B.5 Non-Interactive Uninstall ORDS

This section explains how to uninstall ORDS in the database.

To uninstall ORDS, execute the following commands:

cat adminpwd.txt
<password for admin-user>

ords --config /path/to/test/config uninstall --admin-user SYS --db-hostname localhost --db-port 1521 
--db-servicename orcl --log-folder /path/to/logs < adminpwd.txt

B.6 config CLI Examples

This section provides config CLI examples.

Non-Interactive Update Wallet

If you want to change the password in the wallet, then specify the following:

ords --config /path/to/test/config config secret --password-stdin db.password < userpwd.txt

If you want to view the password in the wallet, then specify the following:

ords --config /path/to/test/config config get --secret db.password

Where:

userpwd.txt contains the password.

Note:

If you are changing the wallet for a specific pool, then you must provide the --db-pool option. The preceding example updates the default pool.

B.7 Resolving 570 Server Error Response Code

This section provides the steps to resolve a 570 Server Error Response code.

This issue is commonly encountered during an upgrade or repair when the ORDS_PUBLIC_USER password has been changed. When ORDS starts, it attempts to connect to the target database using the credentials stored in the associated Wallet (.SSO file).

If the wallet password does not match the database password, ORDS attempts to login three times. Repeated failures locks the account. Perform the following steps to resolve this issue:

Perform the following steps to resolve this issue:

  1. Stop the affected ORDS instance/process.
  2. Unlock the ORDS_PUBLIC_USER account using the following command:
    alter user ORDS_PUBLIC_USER unlock;
    1. Verify the account status using the following command:
      select username, account_status from dba_users where 
      username ='ORDS_PUBLIC_USER';
  3. You can either change or update the ORDS_PUBLIC_USER password (to match the current database password) or verify the password that is stored in the ORDS Wallet (.SSO file).
    • To change the ORDS_PUBLIC_USER password, use the following command:
      ords --config <PATH TO ORDS CONFIG> config secret db.password 
    • To verify the password, use the following command:
      ords --config <PATH TO ORDS CONFIG> config get --secret db.password
  4. If you change the password in the .SSO wallet, restart your shell or terminal session and then retry the upgrade or repair:
    ords --config <Path to your ORDS configuration folder> install
    When prompted, choose the database pool associated with the mismatched wallet password.

    Note:

    During installation, the ORDS installer updates the database password if it detects a difference in the password.