A PL/SQLゲートウェイ・ユーザーの設定

この項では、次の構成方法について説明します。
  • APEXのPL/SQLゲートウェイ・ユーザー
  • PL/SQLゲートウェイ・リクエストを直接処理するためのPL/SQLゲートウェイ・ユーザー

A.1 APEXのPL/SQLゲートウェイ・ユーザーの構成

この項では、APEXのPL/SQLゲートウェイ・ユーザーを構成する方法について説明します。

ORDSおよびAPEXをインストールし、APEX PL/SQLゲートウェイ・ユーザーを構成する必要がある場合は、次を実行します。

  1. ORDSの修復。
  2. データベース・プールの構成設定が正しく設定されているかどうかを確認します。
    ords --config <config path> config --db-pool <pool name> list

    ノート:

    単一のデータベース・プール(defaultという名前のプールなど)のみがある場合は、--db-poolオプションを省略します。
    設定plsql.gateway.modeが存在しないか、またはproxiedに設定されていない場合は、次のコマンドを実行します。
    ords --config <config path> config --db-pool <pool name> set plsql.gateway.mode
        proxied

A.2 PL/SQLゲートウェイ・リクエストを直接処理するためのPL/SQLゲートウェイ・ユーザーの構成

データベース・プールでPL/SQLゲートウェイ・リクエストを直接処理する場合は、オプション--gateway-user <database user>および--gateway-mode directを指定して、PL/SQLゲートウェイ・ユーザーを構成します。

A.2.1 PL/SQLゲートウェイ・ユーザーのインストール/アップグレード

この項では、ORDSのインストールまたはアップグレード中にPL/SQLゲートウェイ・ユーザーを構成する方法について説明します。

ORDSをインストールまたはアップグレードするようにPL/SQLゲートウェイを構成するには、次のいずれかの方法を使用します。

  • ORDSのインストール/アップグレードおよび対話モードでのPL/SQLゲートウェイの構成
  • ORDSのインストール/アップグレードおよび非対話型(サイレント)モードでのPL/SQLゲートウェイの構成

ORDSのインストール/アップグレードおよび対話モードでのPL/SQLゲートウェイの構成

対話モードを使用してインストールするには、対話型のords install -iコマンドを使用して、--gateway-userおよび--gateway-modeオプションを指定します。

ords --config <config path> install -i --gateway-user <database user> --gateway-mode direct
 
ords --config /path/to/config install -i --gateway-user EXAMPLE_USER1 --gateway-mode direct
このコマンドは、ゲートウェイ・ユーザーの接続情報とパスワードの入力を求めます。ゲートウェイ・ユーザーのパスワードは、データベース・ユーザーの既存のパスワードと一致する必要があります。次のオプションが表示され、変更できます。
...
 
Oracle REST Data Services - Interactive Install
 
  Enter a number to select the database connection type to use
    [1] Basic (host name, port, service name)
    [2] TNS (TNS alias, TNS directory)
    [3] Custom database URL
  Choose [1]: 
  Enter the database host name [localhost]: 
  Enter the database listen port [1521]: 
  Enter the database service name [orcl]: pdb1
  Enter the PL/SQL Gateway database password for EXAMPLE_USER1: 
Confirm password: 
Connecting to database user: EXAMPLE_USER1 url: jdbc:oracle:thin:@//localhost:1521/pdb1
  Provide database user name with administrator privileges.
    Enter the administrator username: sys
  Enter the database password for SYS AS SYSDBA: 
 
Retrieving information.
ORDS is not installed in the database. ORDS installation is required.
 
  Enter a number to update the value or select option A to Accept and Continue
    [1] Connection Type: Basic
    [2] Basic Connection: HOST=localhost PORT=1521 SERVICE_NAME=pdb1
           Administrator User: SYS AS SYSDBA
    [3] Database password for ORDS runtime user (ORDS_PUBLIC_USER): <generate>
    [4] Database password for ORDS gateway user (EXAMPLE_USER1): *****
    [5] ORDS runtime user and schema tablespaces:  Default: SYSAUX Temporary TEMP
    [6] Configure and start ORDS in Standalone Mode: Yes
    [7]    Protocol: HTTP
    [8]       HTTP Port: 8080
    [9]   APEX static resources location: 
    [A] Accept and Continue - Create configuration and Install ORDS in the database
    [Q] Quit - Do not proceed. No changes
  Choose [A]:

ORDSのインストール/アップグレードおよび非対話型(サイレント)モードでのPL/SQLゲートウェイの構成

非対話モードを使用してインストールするには、ords installコマンドを使用し、--gateway-userおよび--gateway-modeオプションを指定して、PL/SQLゲートウェイ・ユーザーを構成します。インストールおよび構成には、追加の接続情報オプションと管理者ユーザーが必要です。

ords --config <path> install --db-pool <pool name> --admin-user <administrator user> 
--db-hostname <hostname> --db-port <port> --db-servicename <database servicename> 
--gateway-user <username> --gateway-mode direct --password-stdin < secret.txt
 
ords --config /path/to/config install --db-pool db1 --admin-user SYS  
--db-hostname localhost --db-port 1521 --db-servicename pdb1 --gateway-user EXAMPLE_USER1 
--gateway-mode direct --password-stdin < secret.txt

A.2.2 PL/SQLゲートウェイ・ユーザーの構成

次のいずれかのモードを使用して、PL/SQLゲートウェイを構成できます。
  • 対話モードでの実行
  • 非対話型(サイレント)モードでの実行

対話モードでの実行

PL/SQLゲートウェイ・ユーザーを構成するには、ords install -i --config-only対話型コマンドを使用し、--gateway-userおよび--gateway-modeオプションを指定します。

ords install -i --config-only --gateway-user <username> --gateway-mode direct

非対話型(サイレント)モードでの実行

PL/SQLゲートウェイ・ユーザーを構成するには、ords install --config-onlyサイレント・コマンドを使用し、--gateway-userおよび--gateway-modeオプションを指定します。

ords --config <path> install --config-only --db-pool <pool name> --admin-user <administrator user> 
--db-hostname <hostname> --db-port <port> --db-servicename <database servicename> 
--gateway-user <username> --gateway-mode direct --password-stdin < secret.txt
 
たとえば:
ords --config /path/to/config install --config-only --db-pool db1 --admin-user SYS  --db-hostname localhost 
--db-port 1521 --db-servicename pdb1 --gateway-user EXAMPLE_USER1 --gateway-mode direct --password-stdin < secret.txt