1-) Modify service_names parameter and add new service name:
if spfile is used then
alter system set service_names='..., {new_service_name}' scope=both;
if init ora file is used then
- alter system set service_names='..., {new_service_name}';
- modify init ora file and add {new_service_name} to service_names parameter
SID_LIST_... =
( SID_LIST=
(SID_DESC =
(ORACLE_HOME =...)
(SID_NAME = ...))
....
(SID_DESC =
(GLOBAL_DBNAME={new_service_name})
(SID_NAME = {oracle_sid})
(ORACLE_HOME ={oracle_home}))
)
3-) Restart listener.
Now you may connect to database using following tnsnames.ora configuration:
{tnsname}.WORLD = (DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(Host = {host_name})(Port = {port}))(CONNECT_DATA =(SERVICE_NAME = {new_service_name})))
After login if you query v$session system view, you will see new service name in SERVICE_NAME column for your session.
2 comments:
thanks you Very Much ...
Thanks a lot, this helped a lot.
Post a Comment