Create new service for database [message #466099] |
Fri, 16 July 2010 20:15 |
casttree
Messages: 83 Registered: August 2008
|
Member |
|
|
I hope to create a new DB service and apply the load , then I need to verify the service load from Enterprise Manager or table V$SERVICEMETRIC .
Below are what I did
Quote:
I tried to add service in tnsnames.ora like below
SERVICE = (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(PORT=25057)(HOST=dadvmc))(CONNECT_DATA=(SID=tgc4)))
/************
Also I tried the serviceName like below, but not working when I conneted SALES1 from sqlplus
SALES1 = (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(PORT=25057)(HOST=dadvmc))(CONNECT_DATA=(SERVICE_NAME=host.us.xxx.com)))
**********/
and login as
sqlplus scott/tiger@SERVICE[/email][/email]
then lock table EMP in exclusive mode in two session.
I can see the load is added to service SYS$USERS , but I can't see the new service from V$SERVICEMETRIC or Enterprise Manager.
select
SERVICE_NAME
from V$SERVICEMETRIC
Do I missed any step? How could we create the new DB service?
Thanks,
[Updated on: Fri, 16 July 2010 20:19] Report message to a moderator
|
|
|
|
Re: Create new service for database [message #466105 is a reply to message #466099] |
Fri, 16 July 2010 23:18 |
casttree
Messages: 83 Registered: August 2008
|
Member |
|
|
I used the steps in the URL http://download.oracle.com/docs/cd/B14117_01/server.101/b12170/ch4.htm , but am not sure if it is the right process.
Quote:
To use a net service name (alias), it must have an entry in the tnsnames.ora file on the machine running SQL*Plus, or for iSQL*Plus, the machine running the iSQL*Plus Application Server. An entry in tnsnames.ora is not required if you use a connection identifier.
Example 4-1 tnsnames.ora entry for the sales database
SALES1 =
(DESCRIPTION =
(ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=1521) )
(CONNECT_DATA=
(SERVICE_NAME=sales.us.acme.com) ) )
Example 4-2 Start a command-line session to the sales database using the net service name
SQLPLUS hr/password@SALES1[/email]
See the Oracle Net Services Reference Guide and the Oracle Net Services Administrator's Guide for more information about database connections and net service name definitions.
Probably I didn't get the right URL to create the DB service. If there are better link explaining the process to create the DB service, could you let me know?
My Steps are
I tried to add service in tnsnames.ora like below.
SERVICE = (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(PORT=25057)(HOST=dadvmc))(CONNECT_DATA=(SID=tgc4)))
and login as
sqlplus scott/tiger@SERVICE[/email]
SQL> lock table EMP in exclusive mode;
Table(s) Locked.
Login as sqlplus scott/tiger@SERVICE[/email]
SQL> lock table EMP in exclusive mode;
SQL> select
SERVICE_NAME
from V$SERVICEMETRIC 2 3 ;
SERVICE_NAME
----------------------------------------------------------------
tgc4.xyz.com
tgc4.xyz.com
SYS$BACKGROUND
SYS$BACKGROUND
SYS$USERS
SYS$USERS
8 rows selected.
[Updated on: Fri, 16 July 2010 23:21] Report message to a moderator
|
|
|
|
Re: Create new service for database [message #466191 is a reply to message #466099] |
Sat, 17 July 2010 12:12 |
casttree
Messages: 83 Registered: August 2008
|
Member |
|
|
Thanks,
I find the URL http://psoug.org/reference/dbms_service.html and created the service with sysdba
set linesize 140
col name format a30
col network_name format a30
SELECT service_id, name,network_name, creation_date
FROM dba_services;
exec dbms_service.create_service('UW', 'u.washington.edu');
SELECT service_id, name,network_name, creation_date
FROM dba_services;
I can see the new service UW from
1 SELECT service_id, name,network_name
2* FROM dba_services
but if I check with
SQL> select service_name from V$SERVICEMETRIC ;
I can't see the new service, any difference between it ? I need to verify the new service load from V$SERVICEMETRIC, How could we see the new service in V$SERVICEMETRIC?
Thanks,
|
|
|
|