修改db_unique_name参数

在搭建Dataguard或RAC集群的过程中,经常需要修改db_unique_name参数。以下是修改实例:

[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

需要注意的是,参数改完后要重启数据库才能生效。

posted on 2019-04-04 10:22  djq002  阅读(2446)  评论(0编辑  收藏  举报

导航