Fra og med Oracle Database 18c kan du konfigurere et Oracle-hjem i skrivebeskyttet tilstand. Fordele ved et skrivebeskyttet Oracle Home:
– Muliggør problemfri patching og opdatering af Oracle-databaser uden forlænget nedetid
– Forenkler patching og masseudrulning, da ét billede vil være nok til at distribuere en patch til mange servere
– Forenkler klargøring ved at implementere adskillelse af installation og konfiguration
SYNTAKS
$ roohctl -help Usage: roohctl [<flag>] [<command> <option>] Following are the possible flags: -help Following are the possible commands: -enable Enable Read-only Oracle Home [-nodeList List of nodes in a cluster environment]
orabasetab filen ligger i ORACLE_HOME/install/orabasetab og kan bruges til at bestemme, om en ORACLE_HOME er skrivebeskyttet eller læse/skrive. Det sidste felt er 'N ' og betyder, at skrivebeskyttet oracle home er deaktiveret.
$ cat $ORACLE_HOME/install/orabasetab #orabasetab file is used to track Oracle Home associated with Oracle Base /u01/app/oracle/product/18.0.0.0/dbhome_1:/u01/app/oracle:c10_DbHome_1:N:
Aktiver skrivebeskyttet Oracle Home
Hvis værktøjet "roohctl ” finder en eksisterende database eller lytter relateret til dette Oracle Home vil det returnere fejlen:
$ roohctl -enable Enabling Read-Only Oracle home. Cannot enable Read-Only Oracle home in a configured Oracle home. The Oracle Home is configured with databases 'cpdbanq01,cpdbcmi10,cpdbdcd1'.
Der er en udokumenteret "-force" parameter at tilføje til "roohctl -enable":
$ roohctl -enable -force Enabling Read-Only Oracle home. The Oracle Home is configured with databases databases 'cpdbanq01,cpdbcmi10,cpdbdcd1'. Update orabasetab file to enable Read-Only Oracle home. Orabasetab file has been updated successfully. Create bootstrap directories for Read-Only Oracle home. Bootstrap directories have been created successfully. Bootstrap files have been processed successfully. Read-Only Oracle home has been enabled successfully.
Se indholdet af orabasetab-filen. Det sidste felt er 'Y ' og betyder, at skrivebeskyttet oracle home er aktiveret.
$ cat $ORACLE_HOME/install/orabasetab #orabasetab file is used to track Oracle Home associated with Oracle Base /u01/app/oracle/product/18.0.0.0/dbhome_1:/u01/app/oracle:c10_DbHome_1:Y:
Deaktiver skrivebeskyttet Oracle Home
Du deaktiverer et Read Only Oracle Home med ‘roohctl -disable ‘:
$ roohctl -disable -force Disabling Read-Only Oracle home. Update orabasetab file to disable Read-Only Oracle home. Orabasetab file has been updated successfully. Read-Only Oracle home has been disabled successfully. Check the log file /u01/app/oracle/cfgtoollogs/roohctl/roohctl-210110PM125527.log.