Tuesday, February 4, 2014

Modify / Change DB_DOMAIN GLOBAL_NAME of the Database



Here We are going to change the DB_UNIQUE_NAME of the RAC database. Changing the Global Name doesn't need a database bounce but db_domain parameter needs database bounce.

**************************************** Step By Step Procedure ******************************************************

#########################################
# 1) Check Present Values
#########################################

SQL> sho parameter uniq
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_unique_name                       string      db01
SQL> sho parameter dom
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_domain                            string
SQL> select * from global_name;
GLOBAL_NAME
--------------------------------------------------------------------------------
db01

=====================================================================================================================
 Here Domain Name is Set to Null, So Global Name just retrieves as db01
=====================================================================================================================

#########################################
# 2) check for the Database service
#########################################

PMON register the instance in the listener whenever a database comes to MOunt stage. Here we can see that LISTENER is listener to a service called "db01"

[oracle@host01 ~]$ lsnrctl  services | grep db01
Service "db01" has 1 instance(s).
  Instance "db011", status READY, has 1 handler(s) for this service...
Service "db01XDB" has 1 instance(s).
  Instance "db011", status READY, has 1 handler(s) for this service...
[oracle@host01 ~]$

=====================================================================================================================

#########################################
# 3) Modify Database Parameters
#########################################

Now we Will alter the DB_Domain Parameter in spfile as this is a STATIC parameter.

Alter system set db_domain="stepintooracledba.com" scope=spfile sid='*';

SQL> Alter system set db_domain="stepintooracledba.com" scope=spfile sid='*';
System altered.

Lets see Listener Status after Parameter change. Still it remains same.

oracle@host01 ~]$ lsnrctl services | grep db01
Service "db01" has 1 instance(s).
  Instance "db011", status READY, has 1 handler(s) for this service...
Service "db01XDB" has 1 instance(s).
  Instance "db011", status READY, has 1 handler(s) for this service...

=====================================================================================================================

#########################################
# 4) Shutdown / Startup Database
#########################################

[oracle@host01 ~]$ srvctl stop database -d db01

[oracle@host01 ~]$ srvctl start database -d db01

[oracle@host01 ~]$ lsnrctl services | grep db01
Service "db01.stepintooracledba.com" has 1 instance(s).
  Instance "db011", status READY, has 1 handler(s) for this service...
Service "db01XDB.stepintooracledba.com" has 1 instance(s).
  Instance "db011", status READY, has 1 handler(s) for this service...
[oracle@host01 ~]$ 

SQL> select * from global_name;

GLOBAL_NAME
--------------------------------------------------------------------------------
db01.stepintooracledba.com

=====================================================================================================================
 Now We can See that PMON has registered the instance service name as "db01.stepintooracledba.com"
=====================================================================================================================

=====================================================================================================================
 Comments Are Always welcome
=====================================================================================================================

1 comment:

Unknown said...

hello

when i chech my db_domain name it shows this

SQL>select * from global_name;

GLOBAL_NAME
--------------------------------------------------------------------------------
orcl.localdomain

now i want to remove that .localdomain

please tell me how should i remove that?????help