在搭建Dataguard或RAC集羣的過程當中,常常須要修改db_unique_name參數。如下是修改實例:sql
[oracle@oracle02 ~]$ sqlplus / as sysdba SQL*Plus: Release 12.1.0.2.0 Production on Thu Apr 4 18:08:28 2019 Copyright (c) 1982, 2014, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options SQL> show parameter db_name NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_name string orcl SQL> show parameter db_unique_name NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_unique_name string orcl SQL> host clear SQL> alter system set db_unique_name='orcl_dg02' scope=spfile; SQL> show parameter db_unique_name NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_unique_name string orcl SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> startup showORACLE instance started. Total System Global Area 767557632 bytes Fixed Size 2929112 bytes Variable Size 583011880 bytes Database Buffers 176160768 bytes Redo Buffers 5455872 bytes host clearDatabase mounted. Database opened. SQL> show parameter db_unique_name NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_unique_name string orcl_dg02
須要注意的是,參數改完後要重啓數據庫才能生效。數據庫