---
title: "ORACLE NET"
author: "edwards0307"
date: "2011-12-12T09:49:37Z"
tags: []
categories: ["数据库"]
slug: "oracle-net"
draft: false
lastmod: "2012-01-05T14:50:37Z"
id: 1305770
url: "https://killdbs.iteye.com/blog/1305770"
---

1.net\_service\_name:

   servive\_name: The `SERVICE_NAME` is the global database name .=sid+domain

 

  net\_service\_name=  
  (DESCRIPTION=  
  (ADDRESS=(PROTOCOL=tcp)(HOST=host)(PORT=port) )  
  (CONNECT\_DATA=  
  (SERVICE\_NAME=service\_name) ) )

 

2\. locate port: oracle\_home/install/portlist.int

 

3\. jdbc oci driver: java appication call oci, connect oracle server

    jdbc thin driver: java application call thin driver ,not oci, complete connection.

 

4\.

   connect identifier=net\_service\_name

   service name: show parameter service\_names, presentation logical of the database

                          =db\_domain.db\_name=globalname

   connection Descriptor:location of the database

                                      name of the database service

   service register:database register information with the listener,pmon register information in the listener. 

                             services names

                             instance names

                             service handler:dispathers and dedicated servers

                             alter system register                          

   service handler:

   name method: easy connection string

                           host

                           tnsname

                           oid

 

5.listener.ora(server)

   tnsnames.ora(client)

   sqlnet.ora(client)   //Decided to name resolution method

 

   ORACLE\_HOME/network/admin/  

 

6.spawns and bequeaths  connections( in dedicated server)

   hands off the connection  to a dispather(in shared server)

   redirect  the connection to a dispather or server process

 

7.service regster: static or dynamic register

               dynamic:pmon register informations

                             no listener.ora

                             db\_name

                             db\_domain

                             service\_names

                             instance\_name

                             local\_listener

               static:listener.ora

                         oem

 

8.netca

   netmgr

   (static register)

   lsnrctl  start listenername

              stop

   tnsping oraclelsh

 

9.sqlplus [hr/hr@//192.168.1.88:1521/lsh]()

   sqlplus hr/hr@oraclelsh

 

10.TNS\_ADMIN

    $ORACLE\_HOME/network/admin