Wednesday, October 24, 2012

configure new service on oracle database

ISSUE:
user like to use a specific tnsname entry to connect to new database

CAUSE:
It might require a lot effort or time to change tnsname configure on application side to connect. it is required to configure database server to accept request with old tnsname entry with hostname updated.

SOLUTION:
if the tnsname entry use SERVICE_NAME instead of SID_NAME, it can be resolved by configure a new service to match the one in tnsname entry.
if the tnsname entry use SID_NAME, rename your database is the only option as I know.

SOLUTION DETAILS OF CONFIGURE NEW SERVICE:
1. create new service
exec dbms_service.create_service('service_name','service_name');
2. start the service
exec dbms_service.start_service('service_name');
ATTN: manually do it -- alter system set service_names='service1, servcie2, service3'
4. dynamic register the service if local listerner parameter was configured
 alter system register
5. static register the service
add below inot sid_list

            (SID_DESC =
              (GLOBAL_DBNAME=service_name)
              (ORACLE_HOME = /u01/app/oracle/product/11.2.3.0/dbhome)
              (SID_NAME = sid)
              (SERVICE_NAME =srvice_name )
            )


reference:




No comments:

Post a Comment