Configura
Impostare il proxy di Oracle Notification Server
ExtendedSecurityHeader=<header-name>
Ora le notifiche possono contenere un'intestazione di accesso fornita dal publisher. Un campo sui certificati denominato CN (Common Name) assegna un nome al proprietario del certificato. La parte CN del client del DN (Distinguished Name) viene salvata con ogni connessione client. Quando una notifica arriva al server, il client sarà in grado di ricevere la notifica solo se il suo CN è elencato nel nome dell'intestazione configurato per ExtendedSecurityHeader
.
ExtendedSecurityMode=<mode>
none
: Non controllare nulla. I clienti riceveranno sempre tutte le notifiche.
strict
: controllare il client rispetto all'intestazione di accesso alla notifica se esiste, altrimenti il client non riceverà la notifica.
allowunsecuresubscriber=false
Se la connessione sicura è configurata normalmente, qualsiasi tentativo di connessione non sicura verrà rifiutato. Se questo parametro è impostato su yes, a un peer sarà comunque consentito connettersi anche senza cifratura, ma in questo caso non sarà consentito pubblicare.
Se la connessione sicura non è configurata, questo parametro viene ignorato.
- Opzione 1: configurare il proxy Oracle Notification Server senza wallet e certificati SSL per stabilire la comunicazione tra il proxy Oracle Notification Server e il Oracle Notification Server sui nodi Oracle RAC. Per configurare il proxy di Oracle Notification Server senza wallet e certificati, effettuare le operazioni riportate di seguito.
- Impostare il proxy Oracle Notification Server sull'host Connection Manager.
- Creare il file
$ORACLE_HOME/opmn/conf/onsproxy.properties
con i seguenti contenuti:setConfigHome:/u01/app/oracle/product/23ai/client_1 debug:true addConfig: localport=6100 addConfig: remoteport=6200 addConfig: allowunsecuresubscriber=true addConfig: extendedsecuritymode=partial addConfig: extendedsecurityheader=none addNetwork: nodes.aaa=10.0.1.13:6200,10.0.1.95:6200 addSubscription: ("eventType=database/event/service") addSubscription: ("eventType=database/event/host")
- Verificare che
$ORACLE_HOME/opmn/conf/ons.config
abbia i seguenti contenuti:# Generated by ONS Proxy allowpublish=127.0.0.1,::1 extendedsecurityheader=none allowunsecuresubscriber=true localport=6100 remoteport=6200 extendedsecuritymode=partial
- Avviare il proxy di Oracle Notification Server sull'host CMAN e controllare lo stato.
[oracle@cman-host ~]$ onsctl proxy start Dec 17, 2024 10:35:20 PM oracle.ons.proxy.Proxy$ProxyConfig <init> INFO: Loading configuration: /u01/app/oracle/product/23ai/client_1/opmn/conf/onsproxy.properties Dec 17, 2024 10:35:21 PM oracle.ons.proxy.Proxy setDefaultConfigHome INFO: ORACLE_CONFIG_HOME set to /u01/app/oracle/product/23ai/client_1 Dec 17, 2024 10:35:21 PM oracle.ons.proxy.Proxy validateProxyConfig INFO: Validating configuration Dec 17, 2024 10:35:21 PM oracle.ons.proxy.Proxy updateProxyConfig INFO: Updating configuration Dec 17, 2024 10:35:21 PM oracle.ons.proxy.Proxy initProxy INFO: Initializing onsctl proxy: ons proxy started
- Controllare le connessioni stabilite nel database quando si avvia il proxy Oracle Notification Server sul server
cman-host
. Nella sezione Connessioni client, verificare che l'host Oracle CMAN sia connesso al database Oracle RAC. L'esempio seguente mostra un output troncato dopo la connessione CMAN al server di notifica Oracle in esecuzione su Oracle Grid Infrastructure. La connessione deve essere visualizzata da10.0.0.90
in entrambi i computer Oracle RAC. Poiché questa connessione è stata effettuata senza certificati e wallet SSL, non verrà visualizzata una voceCN=cman-host
nella connessione CMAN di Oracle.[grid ~]$ onsctl debug Client connections: (8) ID CONNECTION ADDRESS PORT FLAGS SNDQ REF PHA SUB -------- --------------------------------------- ----- ------- ---- --- --- --- 0 internal 0 000044a 0 1 IO 1 2 127.0.0.1 62766 000041a 0 1 IO 1 1 127.0.0.1 62770 000041a 0 1 IO 1 3 127.0.0.1 62768 000041a 0 1 IO 1 4 127.0.0.1 62796 000041a 0 1 IO 1 7 127.0.0.1 62838 000041a 0 1 IO 0 26 ::ffff:10.0.0.90 21876 008042a 0 1 IO 2 request 127.0.0.1 12334 0000e1a 0 1 IO 0
- Opzione 2: per motivi di sicurezza, impostare il proxy di Oracle Notification Server con wallet e certificati SSL. SSL richiede certificati autofirmati o un'autorità di certificazione (CA) da un provider sicuro per la connessione client-server. SSL funge da passaporto digitale che verifica le tue credenziali e le credenziali del server Web finale utilizzando chiavi pubbliche e private. Quando entrambe le identità vengono verificate, SSL concede una connessione sicura tramite HTTPS. Questo processo viene eseguito mediante i certificati SSL.
Nota
Se si utilizza un certificato utente emesso da un'autorità di certificazione come Verisign, non è necessario distribuire certificati al client. Aggiungere il certificato radice CA ed eventuali certificati intermedi nella catena al wallet come Certificati sicuri prima di aggiungere il certificato utente.- Creare Oracle wallet e certificati con firma automatica sui nodi Oracle RAC. Eseguire i comandi riportati di seguito su uno dei nodi Oracle RAC come utente
root
.mkdir -p /u01/app/wallet_dir chown grid:oinstall /u01/app/wallet_dir chmod 750 /u01/app/wallet_dir
- Eseguire i comandi seguenti come utente
grid
:$ORACLE_HOME/bin/orapki wallet create -wallet /u01/app/wallet_dir -pwd <Replace With Your Password> -auto_login $ORACLE_HOME/bin/orapki wallet display -wallet /u01/app/wallet_dir $ORACLE_HOME/bin/orapki wallet add -wallet /u01/app/wallet_dir -pwd <Replace With Your Password> -dn "CN=racnode-scan.sub12161926541.onsproxyvcn.oraclevcn.com,OU=ST,O=Oracle,ST=California,C=US" -keysize 2048 -self_signed -validity 365 $ORACLE_HOME/bin/orapki wallet add -wallet /u01/app/wallet_dir -pwd <Replace With Your Password> -dn "CN=racnode-scan,OU=ST,O=Oracle,ST=California,C=US" -keysize 2048 -self_signed -validity 365 $ORACLE_HOME/bin/orapki wallet display -wallet /u01/app/wallet_dir [grid@racnode1 ~]$ $ORACLE_HOME/bin/orapki wallet display -wallet /u01/app/wallet_dir Oracle PKI Tool Release 23.0.0.0.0 - Production Version 23.0.0.0.0 Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved. Requested Certificates: User Certificates: Subject: CN=racnode-scan.sub12161926541.onsproxyvcn.oraclevcn.com,OU=ST,O=Oracle,ST=California,C=US Subject: CN=racnode-scan,OU=ST,O=Oracle,ST=California,C=US Trusted Certificates: Subject: CN=racnode-scan,OU=ST,O=Oracle,ST=California,C=US Subject: CN=racnode-scan.sub12161926541.onsproxyvcn.oraclevcn.com,OU=ST,O=Oracle,ST=California,C=US
- Creare wallet e certificati autofirmati sull'host di Connection Manager. Quando si configura il proxy di Oracle Notification Server per un'esecuzione in un ambiente CMAN e si comunica con i server Oracle Notification Server in esecuzione su entrambi i nodi CMAN e RAC, i certificati SSL sono necessari per garantire una comunicazione sicura.
Nota
Modificare la password in base ai criteri delle password dell'ambiente. - Di seguito è riportato un processo dettagliato per configurare il proxy Oracle Notification Server con certificati SSL.Eseguire i comandi seguenti come utente
root
:mkdir -p /u01/app/oracle/wallet_dir chown oracle:oinstall /u01/app/oracle/wallet_dir chmod 750 /u01/app/oracle/wallet_dir
Eseguire i comandi seguenti come utenteoracle
:$ORACLE_HOME/bin/orapki wallet create -wallet /u01/app/oracle/wallet_dir -pwd <Replace With Your Password> -auto_login $ORACLE_HOME/bin/orapki wallet display -wallet /u01/app/oracle/wallet_dir
Creare i certificati autofirmati come utenteoracle
:$ORACLE_HOME/bin/orapki wallet add -wallet /u01/app/oracle/wallet_dir -pwd <Replace With Your Password> "CN=cman-host.sub12161926540.onsproxyvcn.oraclevcn.com,OU=ST,O=Oracle,ST=California,C=US" -keysize 2048 -self_signed -validity 365 $ORACLE_HOME/bin/orapki wallet add -wallet /u01/app/oracle/wallet_dir -pwd REPLACE WITH YOUR PASSWORD> -dn "CN=cman-host,OU=ST,O=Oracle,ST=California,C=US" -keysize 2048 -self_signed -validity 365
Dopo aver creato il wallet, visualizzarlo come utenteoracle
. Non verranno ancora visualizzate voci perché il certificato non è stato creato.[oracle@cman-host ~] $ $ORACLE_HOME/bin/orapki wallet display -wallet /u01/app/oracle/wallet_dir Oracle PKI Tool Release 23.0.0.0.0 - Production Version 23.0.0.0.0 Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved. Requested Certificates: User Certificates: Subject: CN=cman-host.sub12161926540.onsproxyvcn.oraclevcn.com,OU=ST,O=Oracle,ST=California,C=US Subject: CN=cman-host,OU=ST,O=Oracle,ST=California,C=US Trusted Certificates: Subject: CN=cman-host,OU=ST,O=Oracle,ST=California,C=US Subject: CN=cman-host.sub12161926540.onsproxyvcn.oraclevcn.com,OU=ST,O=Oracle,ST=California,C=US
- Creare wallet e certificati autofirmati sul computer client in Google Cloud. Poiché il proxy Oracle Notification Server sull'host CMAN è configurato con un wallet SSL, il computer client deve disporre anche di un wallet configurato con certificati SSL autofirmati per stabilire una connessione sicura. In questo caso, il client Oracle è installato sull'host client, che fornisce gli strumenti necessari per creare e gestire i wallet.Eseguire i comandi seguenti come utente
root
:mkdir -p /u01/app/client/wallet_dir chown oracle:oinstall /u01/app/client/wallet_dir chmod 750 /u01/app/client/wallet_dir
Eseguire i comandi seguenti come utenteoracle
:$ORACLE_HOME/bin/orapki wallet create -wallet /u01/app/client/wallet_dir -pwd <Replace With Your Password>-auto_login $ORACLE_HOME/bin/orapki wallet display -wallet /u01/app/client/wallet_dir
Creare il certificato autofirmato come utenteoracle
:$ORACLE_HOME/bin/orapki wallet add -wallet /u01/app/client/wallet_dir -pwd <Replace With Your Password> -dn "CN=client-host.c.oraoperator-on-gke.internal,OU=ST,O=Oracle,ST=California,C=US" -keysize 2048 -self_signed -validity 365 $ORACLE_HOME/bin/orapki wallet add -wallet /u01/app/client/wallet_dir -pwd <Replace With Your Password>-dn "CN=client-host,OU=ST,O=Oracle,ST=California,C=US" -keysize 2048 -self_signed -validity 365
Dopo aver creato il wallet, visualizzarlo come utenteoracle
. Non verranno ancora visualizzate voci perché il certificato non è stato creato.[oracle@client-host ~]$ $ORACLE_HOME/bin/orapki wallet display -wallet /u01/app/client/wallet_dir Oracle PKI Tool Release 23.0.0.0.0 - Production Version 23.0.0.0.0 Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved. Requested Certificates: User Certificates: Subject: CN=client-host.c.oraoperator-on-gke.internal,OU=ST,O=Oracle,ST=California,C=US Subject: CN=client-host,OU=ST,O=Oracle,ST=California,C=US Trusted Certificates: Subject: CN=client-host.c.oraoperator-on-gke.internal,OU=ST,O=Oracle,ST=California,C=US Subject: CN=client-host,OU=ST,O=Oracle,ST=California,C=US
- Dopo aver impostato il wallet e i certificati SSL in Oracle RAC e aver configurato i computer CMAN e client, esportare i certificati autofirmati in Connection Manager e nel nodo 1 di Oracle RAC utilizzando le seguenti procedure: Eseguire i comandi seguenti nel nodo 1 di Oracle RAC come utente
grid
:$ORACLE_HOME/bin/orapki wallet export -wallet /u01/app/wallet_dir -pwd <Replace With Your Password> -dn "CN=racnode-scan,OU=ST,O=Oracle,ST=California,C=US" -cert "/tmp/scan_app1.crt" $ORACLE_HOME/bin/orapki wallet export -wallet /u01/app/wallet_dir -pwd <Replace With Your Password> -dn "CN=racnode-scan.sub12161926541.onsproxyvcn.oraclevcn.com,OU=ST,O=Oracle,ST=California,C=US" -cert "/tmp/scan_app2.crt"
Eseguire i comandi seguenti nel nodo 1 di Oracle RAC come utenteoracle
:$ORACLE_HOME/bin/orapki wallet export -wallet /u01/app/oracle/wallet_dir -pwd <Replace With Your Password> -dn "CN=cman-host,OU=ST,O=Oracle,ST=California,C=US" -cert "/tmp/cman1.crt" $ORACLE_HOME/bin/orapki wallet export -wallet /u01/app/oracle/wallet_dir -pwd <Replace With Your Password> -dn "CN=cman-host.sub12161926540.onsproxyvcn.oraclevcn.com,OU=ST,O=Oracle,ST=California,C=US" -cert "/tmp/cman2.crt"
- Dopo l'esportazione dei certificati, importare i certificati in modo che il proxy CMAN Oracle Notification Server possa eseguire l'handshake con Oracle RAC Oracle Notification Server.Copiare i wallet di Connection Manager nel nodo 1 di Oracle RAC e importare i certificati:
scp /tmp/cman* grid@racnode1.sub12161926541.onsproxyvcn.oraclevcn.com:/tmp/ $ORACLE_HOME/bin/orapki wallet add -wallet /u01/app/wallet_dir -pwd <Replace With Your Password> -trusted_cert -cert /tmp/cman1.crt $ORACLE_HOME/bin/orapki wallet add -wallet /u01/app/wallet_dir -pwd <Replace With Your Password> -trusted_cert -cert /tmp/cman2.crt
Copiare i wallet dall'host Oracle RAC Node1 all'host CMAN e importare i certificati:scp grid@racnode1.sub12161926541.onsproxyvcn.oraclevcn.com:/tmp/scan_app* /tmp/ $ORACLE_HOME/bin/orapki wallet add -wallet /u01/app/oracle/wallet_dir -pwd <Replace With Your Password> -trusted_cert -cert /tmp/scan_app1.crt $ORACLE_HOME/bin/orapki wallet add -wallet /u01/app/oracle/wallet_dir -pwd <Replace With Your Password> -trusted_cert -cert /tmp/scan_app2.crt
- Copia del wallet dal nodo 1 di Oracle RAC al nodo 2 di Oracle RAC:Eseguire i comandi seguenti nel nodo 1 di Oracle RAC come utente
root
:mkdir -p /u01/app/wallet_dir chown grid:oinstall /u01/app/wallet_dir chmod 750 /u01/app/wallet_dirscp grid@racnode1.sub12161926541.onsproxyvcn.oraclevcn.com:/u01/app/wallet_dir/* /u01/app/wallet_dir
Eseguire i comandi seguenti nel nodo 1 di Oracle RAC come utentegrid
:[grid@racnode1 ~]$ $ORACLE_HOME/bin/orapki wallet display -wallet /u01/app/wallet_dir Oracle PKI Tool Release 23.0.0.0.0 - Production Version 23.0.0.0.0 Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved. Requested Certificates: User Certificates: Subject: CN=racnode-scan.sub12161926541.onsproxyvcn.oraclevcn.com,OU=ST,O=Oracle,ST=California,C=US Subject: CN=racnode-scan,OU=ST,O=Oracle,ST=California,C=US Trusted Certificates: Subject: CN=racnode-scan,OU=ST,O=Oracle,ST=California,C=US Subject: CN=cman-host,OU=ST,O=Oracle,ST=California,C=US Subject: CN=cman-host.sub12161926540.onsproxyvcn.oraclevcn.com,OU=ST,O=Oracle,ST=California,C=US Subject: CN=racnode-scan.sub12161926541.onsproxyvcn.oraclevcn.com,OU=ST,O=Oracle,ST=California,C=US [grid@racnode2 ~]$ $ORACLE_HOME/bin/orapki wallet display -wallet /u01/app/wallet_dir Oracle PKI Tool Release 23.0.0.0.0 - Production Version 23.0.0.0.0 Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved. Requested Certificates: User Certificates: Subject: CN=racnode-scan.sub12161926541.onsproxyvcn.oraclevcn.com,OU=ST,O=Oracle,ST=California,C=US Subject: CN=racnode-scan,OU=ST,O=Oracle,ST=California,C=USTrusted Certificate Subject: CN=racnode-scan,OU=ST,O=Oracle,ST=California,C=US Subject: CN=cman-host,OU=ST,O=Oracle,ST=California,C=US Subject: CN=cman-host.sub12161926540.onsproxyvcn.oraclevcn.com,OU=ST,O=Oracle,ST=California,C=US Subject: CN=racnode-scan.sub12161926541.onsproxyvcn.oraclevcn.com,OU=ST,O=Oracle,ST=California,C=US
- Seguire questi passi per copiare il wallet dal computer client in Google Cloud al computer CMAN su OCI:Eseguire i comandi riportati di seguito per esportare i wallet nel computer
client-host
.$ORACLE_HOME/bin/orapki wallet export -wallet /u01/app/client/wallet_dir -pwd <Replace With Your Password> -dn "CN=client-host,OU=ST,O=Oracle,ST=California,C=US" -cert "/tmp/cert_app1.crt" $ORACLE_HOME/bin/orapki wallet export -wallet /u01/app/client/wallet_dir -pwd <Replace With Your Password> -dn "CN=client-host.c.oraoperator-on-gke.internal,OU=ST,O=Oracle,ST=California,C=US" -cert "/tmp/cert_app2.crt"
Copiare il wallet daclient-host
acman-host
nella directory/tmp
:scp -i /tmp/gcp oracle@client-host.c.oraoperator-on-gke.internal:/tmp/cert_app* /tmp/
Copiare il wallet CMAN dacman-host
inclient-host
nella directory/tmp
:scp -i /tmp/gcp /tmp/cman* oracle@client-host.c.oraoperator-on-gke.internal:/tmp/
- Eseguire i comandi riportati di seguito per importare i wallet di
client-host
nel computercman-host
.$ORACLE_HOME/bin/orapki wallet add -wallet /u01/app/oracle/wallet_dir -pwd <Replace With Your Password> -trusted_cert -cert /tmp/cert_app1.crt $ORACLE_HOME/bin/orapki wallet add -wallet /u01/app/oracle/wallet_dir -pwd <Replace With Your Password> -trusted_cert -cert /tmp/cert_app2.crt [oracle@cman-host ~]$ $ORACLE_HOME/bin/orapki wallet display -wallet /u01/app/oracle/wallet_dirOracle PKI Tool Release 23.0.0.0.0 - Production Version 23.0.0.0.0 Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved. Requested Certificates: User Certificates: Subject: CN=cman-host,OU=ST,O=Oracle,ST=California,C=US Subject: CN=cman-host.sub12161926540.onsproxyvcn.oraclevcn.com,OU=ST,O=Oracle,ST=California,C=US Trusted Certificates: Subject: CN=client-host.c.oraoperator-on-gke.internal,OU=ST,O=Oracle,ST=California,C=US Subject: CN=racnode-scan.sub12161926541.onsproxyvcn.oraclevcn.com,OU=ST,O=Oracle,ST=California,C=US Subject: CN=cman-host,OU=ST,O=Oracle,ST=California,C=US Subject: CN=cman-host.sub12161926540.onsproxyvcn.oraclevcn.com,OU=ST,O=Oracle,ST=California,C=US Subject: CN=racnode-scan,OU=ST,O=Oracle,ST=California,C=US Subject: CN=client-host,OU=ST,O=Oracle,ST=California,C=US
Eseguire i comandi riportati di seguito per importare i wallet dicman-host
nel computerclient-host
.$ORACLE_HOME/bin/orapki wallet add -wallet /u01/app/client/wallet_dir -pwd <Replace With Your Password> -trusted_cert -cert /tmp/cman1.crt $ORACLE_HOME/bin/orapki wallet add -wallet /u01/app/client/wallet_dir -pwd <Replace With Your Password> -trusted_cert -cert /tmp/cman2.crt [oracle@client-host ~]$ $ORACLE_HOME/bin/orapki wallet display -wallet /u01/app/client/wallet_dir Oracle PKI Tool Release 23.0.0.0.0 - Production Version 23.0.0.0.0 Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved. Requested Certificates: User Certificates: Subject: CN=client-host.c.oraoperator-on-gke.internal,OU=ST,O=Oracle,ST=California,C=US Subject: CN=client-host,OU=ST,O=Oracle,ST=California,C=USTrusted Certificates: Subject: CN=cman-host,OU=ST,O=Oracle,ST=California,C=US Subject: CN=client-host.c.oraoperator-on-gke.internal,OU=ST,O=Oracle,ST=California,C=US Subject: CN=cman-host.sub12161926540.onsproxyvcn.oraclevcn.com,OU=ST,O=Oracle,ST=California,C=US Subject: CN=client-host,OU=ST,O=Oracle,ST=California,C=US
- Impostare Oracle Notification Server sui nodi Oracle RAC.Eseguire i comandi seguenti come utente
grid
per impedire che le connessioni che non corrispondono al CN nel wallet vengano impostate su Oracle Notification Server e consentire le connessioni solo ai client sicuri.$ORACLE_HOME/bin/crsctl modify res ora.ons -attr "ALLOW_UNSECURE_SUBSCRIBER=no" -unsupported $ORACLE_HOME/bin/srvctl modify nodeapps -clientdata /u01/app/wallet_dir/cwallet.sso $ORACLE_HOME/opmn/bin/onsctl reload
Eseguire questo comando per controllare la configurazione sia nel nodo 1 di Oracle RAC che nel nodo 2 di Oracle RAC come utentegrid
:[grid@racnode1 ~]$ cat /u01/app/23.0.0.0/grid/opmn/conf/ons.config.racnode1 usesharedinstall=true allowgroup=true localport=6100 # line added by Agent remoteport=6200 # line added by Agent nodes=racnode1-priv:6200,racnode2-priv:6200 # line added by Agent walletfile=/u01/app/grid/crsdata/racnode1/onswallet/ # line added by Agent allowunsecuresubscriber=no # line added by Agent [grid@racnode2 ~]$ cat /u01/app/23.0.0.0/grid/opmn/conf/ons.config.racnode2 usesharedinstall=true allowgroup=true localport=6100 # line added by Agent remoteport=6200 # line added by Agent nodes=racnode1-priv:6200,racnode2-priv:6200 # line added by Agent walletfile=/u01/app/grid/crsdata/racnode2/onswallet/ # line added by Agent allowunsecuresubscriber=no # line added by Agent
Eseguire questo comando per controllare il wallet in entrambi i nodi Oracle RAC come utentegrid
.[grid@racnode1 ~]$ $ORACLE_HOME/bin/orapki wallet display -wallet /u01/app/grid/crsdata/racnode1/onswallet Oracle PKI Tool Release 23.0.0.0.0 - Production Version 23.0.0.0.0 Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved. Requested Certificates: User Certificates: Subject: CN=racnode-scan.sub12161926541.onsproxyvcn.oraclevcn.com,OU=ST,O=Oracle,ST=California,C=US Subject: CN=racnode-scan,OU=ST,O=Oracle,ST=California,C=USTrusted Certificates: Subject: CN=racnode-scan,OU=ST,O=Oracle,ST=California,C=US Subject: CN=cman-host,OU=ST,O=Oracle,ST=California,C=US Subject: CN=cman-host.sub12161926540.onsproxyvcn.oraclevcn.com,OU=ST,O=Oracle,ST=California,C=US Subject: CN=racnode-scan.sub12161926541.onsproxyvcn.oraclevcn.com,OU=ST,O=Oracle,ST=California,C=US [grid@racnode2 ~]$ $ORACLE_HOME/bin/orapki wallet display -wallet /u01/app/grid/crsdata/racnode2/onswallet Oracle PKI Tool Release 23.0.0.0.0 - Production Version 23.0.0.0.0 Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved. Requested Certificates: User Certificates: Subject: CN=racnode-scan.sub12161926541.onsproxyvcn.oraclevcn.com,OU=ST,O=Oracle,ST=California,C=US ubject: CN=racnode-scan,OU=ST,O=Oracle,ST=California,C=USTrusted Certificates: Subject: CN=racnode-scan,OU=ST,O=Oracle,ST=California,C=US Subject: CN=cman-host,OU=ST,O=Oracle,ST=California,C=US Subject: CN=cman-host.sub12161926540.onsproxyvcn.oraclevcn.com,OU=ST,O=Oracle,ST=California,C=US Subject: CN=racnode-scan.sub12161926541.onsproxyvcn.oraclevcn.com,OU=ST,O=Oracle,ST=California,C=US
- Creare Oracle wallet e certificati con firma automatica sui nodi Oracle RAC. Eseguire i comandi riportati di seguito su uno dei nodi Oracle RAC come utente
- Impostare il proxy Oracle Notification Server sull'host Connection Manager.Creare un file
$ORACLE_HOME/opmn/conf/onsproxy.properties
con i seguenti contenuti:setConfigHome: /u01/app/oracle/product/23ai/client_1 debug: true addConfig: localport=6100 addConfig: remoteport=6200 addConfig: walletfile=/u01/app/oracle/wallet_dir addNetwork: nodes.aaa=10.0.1.13:6200,10.0.1.95:6200|walletfile=/u01/app/oracle/wallet_dir/cwallet.sso addSubscription: ("eventType=database/event/service") addSubscription: ("eventType=database/event/host")
Creare$ORACLE_HOME/opmn/conf/ons.config
con i seguenti contenuti:# Generated by ONS Proxy allowpublish=127.0.0.1,::1 extendedsecurityheader=tenant_id allowunsecuresubscriber=false walletfile=/u01/app/oracle/wallet_dir localport=6100 remoteport=6400 =strict
- Verificare le connessioni stabilite nel database. Controllare le connessioni stabilite alla fine del database all'avvio del proxy Oracle Notification Server sul server
cman-host
. - Aggiornare l'ID tenant con Nome computer host client. Eseguire il login a
SQLPLUS
con privilegiSYSDBA
e aggiornare l'ID tenant con il nome del computer host clientclient-host
in questo caso. - Eseguire il login a
SQLPLUS
con privilegiSYSDBA
e aggiornare l'ID tenant con il nome del computer host client, ad esempioclient-host
, in questo caso.Nota
Assicurarsi che corrisponda al nome utilizzato nel CN del wallet client.SQL> alter session set container=ORCLPDB; Session altered SQL> alter pluggable database orclpdb tenant_id = 'client-host'; Pluggable database altered. SQL> select con_id, name, tenant_id from v$pdbs where name = 'ORCLPDB'; CON_ID NAME TENANT_ID ---------- ------------- ------------------------ 3 ORCLPDB client-host
Crea servizio di database Oracle RAC
Creare il servizio di database Oracle RAC ed eseguire il test della connessione dall'host Oracle RAC al database Oracle RAC. Avviare l'applicazione sul computer client per stabilire una connessione SQL al database Oracle RAC utilizzando la connessione Oracle RAC e ONS con Oracle Notification Server in esecuzione sull'host CMAN. Simulare gli eventi di avvio e arresto del servizio sul database server e controllare gli eventi FAN ricevuti sul client.
- Eseguire il seguente comando come utente
oracle
per creare servizi di database.su - oracle srvctl add service -d ORCLCDB_8p7_phx -preferred ORCLCDB1,ORCLCDB2 -s raconssvc2 -pdb ORCLPDB -notification TRUE
- Eseguire il comando seguente per avviare i servizi di database:
[oracle@racnode1 ~]$ srvctl start service -d ORCLCDB_8p7_phx -s raconssvc2
- Eseguire il comando seguente per reimpostare la password per l'utente
system
. Utilizzare un <PASSWORD> in base ai criteri dell'ambiente in uso:SQL> alter user system identified by <PASSWORD>;User altered.
- Per connettersi al database dal computer
cman-host
, effettuare le operazioni riportate di seguito.[oracle@cman-host ~]$ $ORACLE_HOME/bin/sqlplus system/<PASSWORD>@//cman-host.sub12161926540.onsproxyvcn.oraclevcn.com:1521/raconssvc2.sub12161926541.onsproxyvcn.oraclevcn.com SQL*Plus: Release 23.0.0.0.0 - for Oracle Cloud and Engineered Systems on Thu Dec 19 01:49:12 2024 Version 23.5.0.24.07 Copyright (c) 1982, 2024, Oracle. All rights reserved. Last Successful login time: Wed Dec 18, 2024, 00:59:27 +00:00 Connected to:Oracle Database 23ai EE Extreme Perf Release 23.0.0.0.0 - for Oracle Cloud and Engineered Systems Version 23.6.0.24.10 SQL>
- Per connettersi al database dal computer
client-host
, effettuare le operazioni riportate di seguito.[oracle@client-host ~]$ $ORACLE_HOME/bin/sqlplus system//<PASSWORD>@//cman-host.sub12161926540.onsproxyvcn.oraclevcn.com:1521/raconssvc2.sub12161926541.onsproxyvcn.oraclevcn.com
Nota
Assicurarsi che la connessione sia riuscita prima di passare al passo successivo.
Configurare fanWatcher
sull'host client
FANWatcher
sul computer host del client, effettuare le operazioni riportate di seguito.
- Copiare il codice
fanWatcher
e posizionarlo nell'area intermedia del computerclient-host
nella cartella/tmp/app
.[oracle@client-host response]$ mkdir /tmp/app [oracle@client-host response]$ export CLASSPATH="/tmp/app:$ORACLE_HOME/opmn/lib/ons.jar:$ORACLE_HOME/jlib/oraclepki.jar:$ORACLE_HOME/jlib/osdt_core.jar:$ORACLE_HOME/jlib/osdt_cert.jar:$ORACLE_HOME/jdbc/lib/ojdbc8.jar:." [oracle@client-host ~]$ cd /tmp/app/ [oracle@client-host app]$ ls -rlt total 8 -rw-r--r--. 1 oracle oinstall 6434 Dec 17 21:00 fanWatcher.java
- Configurare il file
fanWatcher.java
.[oracle@client-host app]$ javac fanWatcher.java Note: fanWatcher.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. [oracle@client-host app]$[oracle@client-host app]$ [oracle@client-host app]$ export user=system [oracle@client-host app]$ export password=<PASSWORD> [oracle@client-host app]$ export url='jdbc:oracle:thin:@cman-host.sub12161926540.onsproxyvcn.oraclevcn.com:1521/raconssvc2' [oracle@client-host app]$ $ORACLE_HOME/jdk/bin/java -Doracle.ons.walletfile=/u01/app/client/wallet_dir -classpath ${CLASSPATH} fanWatcher "nodes=cman-host.sub12161926540.onsproxyvcn.oraclevcn.com:6200" Subscribing to events of type: Opening FAN Subscriber Window ...