19.2 RCUスキーマの削除
RCUスキーマを削除するには、次のステップを実行します:
- 次を実行して、ヘルパー・ポッドが存在するかどうかを確認します:
例:kubectl get pods -n <domain_namespace> | grep helper
出力は次のようになります。kubectl get pods -n oamns | grep helper
ヘルパー・ポッドが存在しない場合は、次を実行します:helper 1/1 Running 0 26h- Oracle Access Management (OAM)コンテナ・イメージにOracle Container Registryまたは独自のコンテナ・レジストリを使用する場合:
例:kubectl run --image=<image_name-from-registry>:<tag> \ --image-pull-policy="IfNotPresent" \ --overrides='{"apiVersion": "v1", "spec":{"imagePullSecrets": [{"name": "orclcred"}]}}' \ helper -n <domain_namespace> \ -- sleep infinitykubectl run --image=container-registry.oracle.com/middleware/oam_cpu:14.1.2.1.0-jdk17-ol8-<YYMMDD> \ --image-pull-policy="IfNotPresent" \ --overrides='{"apiVersion": "v1","spec":{"imagePullSecrets": [{"name": "orclcred"}]}}' \ helper -n oamns \ -- sleep infinity - コンテナ・レジストリを使用せずに、各ワーカー・ノードにイメージをロードしている場合は、次のコマンドを実行します:
例:kubectl run helper --image <image>:<tag> -n oamns -- sleep infinity
出力は次のようになります:kubectl run helper --image oracle/oam_cpu:14.1.2.1.0-jdk17-ol8-<YYMMDD> -n oamns -- sleep infinitypod/helper created
- Oracle Access Management (OAM)コンテナ・イメージにOracle Container Registryまたは独自のコンテナ・レジストリを使用する場合:
- 次のコマンドを実行して、ヘルパー・ポッド内でBashシェルを起動します:
例:kubectl exec -it helper -n <domain_namespace> -- /bin/bash
これにより、実行中のヘルパー・ポッド内のBashシェルに移動します:kubectl exec -it helper -n oamns -- /bin/bash[oracle@helper ~]$ - ヘルパーBashシェルで、次のコマンドを実行して、環境を設定します:
export CONNECTION_STRING=<db_host.domain>:<db_port>/<service_name>export RCUPREFIX=<rcu_schema_prefix>
説明:echo -e <db_pwd>"\n"<rcu_schema_pwd> > /tmp/pwd.txt<db_host.domain>:<db_port>/<service_name>は、データベース接続文字列です。<rcu_schema_prefix>は、RCUスキーマ接頭辞です。<db_pwd>は、データベースのSYSパスワードです。<rcu_schema_pwd>は、<rcu_schema_prefix>のパスワードです
export CONNECTION_STRING=mydatabasehost.example.com:1521/orcl.example.comexport RCUPREFIX=OAMK8Secho -e <password>"\n"<password> > /tmp/pwd.txtcat /tmp/pwd.txtcat /tmp/pwd.txtコマンドで正しいパスワードが表示されることを確認します。 - ヘルパーBashシェルで、次のようにRCUスキーマを削除します:
/u01/oracle/oracle_common/bin/rcu -silent -dropRepository -databaseType ORACLE -connectString $CONNECTION_STRING \ -dbUser sys -dbRole sysdba -selectDependentsForComponents true -schemaPrefix $RCUPREFIX \ -component MDS -component IAU -component IAU_APPEND -component IAU_VIEWER -component OPSS \ -component WLS -component STB -component OAM -f < /tmp/pwd.txt exitコマンドを発行して、ヘルパーBashシェルを終了します。