Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where to get Oracle SERVICE_NAME?

I just installed Oracle database 10g free version for students on my Windows XP. I am confused how to know the SERVICE_NAME? Am running it at my localhost 127.0.0.1, with username SYSTEM. May I know where can I get to know the SERVICE_NAME?

like image 472
karikari Avatar asked Mar 08 '11 01:03

karikari


People also ask

What is Oracle Service_name?

SERVICE_NAMES specifies one or more names by which clients can connect to the instance. The instance registers its service names with the listener. When a client requests a service, the listener determines which instances offer the requested service and routes the client to the appropriate instance.

How do I find the Oracle SID and service name?

select instance_name from v$instance; will give you SID name. select name from v$database; will give DB NAME. select instance_name from v$instance; will give you SID name.

What is Service_name in Tnsnames Ora?

SERVICE_NAME is the new feature from oracle 8i onwards in which database can register itself with listener. If database is registered with listener in this way then you can use SERVICE_NAME parameter in tnsnames. ora otherwise - use SID in tnsnames. ora.

How do I find my Oracle TNS service name?

The tnsnames. ora file is located in both the Grid_home\network\admin and Oracle_home\network\admin directories. By default, the tnsnames. ora file is read from the Grid home when Oracle Grid Infrastructure is installed.


1 Answers

It is normally XE for the free version. ORCL is another typical value.

Once logged in, it can be determined from

select sys_context('USERENV','SERVICE_NAME') from dual

If you need to know it so that you can log in, look for a file called TNSNAMES.ORA in $ORACLE_HOME/rdbms/network/admin and the service name will probably be in the connection string.

like image 191
Gary Myers Avatar answered Oct 02 '22 21:10

Gary Myers