oracle net services

Aflter completing this lesson you should be able to do the following:

  • Use Database Control to

--create additional listeners

--create oracle net service aliases

--configure connect time failover

--control the oracle net listener

  • Use the Oracle Net Manager to configure client and middle-tier connections
  • Use TNSPING to test Oracle Net connectivity

Oracle Net Services

Oracle net services enable network connections from a client or middle-tier application to the oralce database server. After a network session is established, oralce net acts as the data courier for both the client application and the database server.

On the client machine, oralce net is a backgroud component accessed by wharever application needs to connect to the database.

On the database server, oralce net includes an active process called listener.

Oracle Net Listener

The oracle net listener is the gateway to the oracle instance for all nonlocal user connections, a single listener can service multiple database instances and thousands of client connections

The oracle net listener is controlled by Database Control or by the lsnrctl command line utility.

For a listener to forward client connections to an instance, the listener must know the name of the instance and where the instance’s ORALCE_HOME is located. The listener can find this information in two ways:

  1. Dynamic service registration
  2. Static service registration

Oracle net listener can also be controlled with the command-line lsnrctl utility

Commands form the listener control utility can by issued form the command-line or form the LSNRCTL prompt

  • Unix or linux command-line syntax

# lsnrctl

# lsnrctl start

# lsnrctl status

  • Prompt syntax

LSNRCTL>

LSNRCTL> start

LSNRCTL> status

Remember that is your listener is named something other than LISTENER, you must either include the listener name with the command or use the SET CURRENT_LISTENER command.

Listener contral provides two monitoring options,services and status.

Oracle Net Connections

To make a client or middl-tier connection,oracle net requires the client to know the:

  • Host where the listener is running
  • Port the listener is monitoring
  • Protocol the listener is using
  • Name of the service the listener is handing

The process of determining this connection information is called Names Resolution.

Names Resolution

Oracle net supports serveral methods of resolving connection information:

  • Easy connect
  • Location naming
  • Directory naming
  • External naming

Easy connect

  • Enabled by default
  • Requires no client-side configuration
  • Supports only TCP/IP protocal(no SSL)
  • No support for advanced connection options like:
  • -- connect-time failover
  • -- source routing
  • -- load balancing

Easy connect connection strings take the form of :

/@:/

Local naming

  • Requires a client-side names resolution file
  • Supports all oracle net protocols
  • Supports advanced connection option like:
  • -- connect-time failover
  • -- source routing
  • -- load balancing

The local list of known services is stored in in the text configuration file:

$ORALCE_HOME/netword/admin/tnsnames.ora

Local naming is appropriate for organizations where oralce net service configuration do not change ofter

Directory naming

  • Requries a Lightweight Directory Access Protocol(LDAP) with oracle net names resolution information loaded
  • -- oracle internet directory
  • -- microsoft active directory services
  • Supports all oracle net protocols
  • Supports advenced connection options

One adventage of directory naming is that as soon as a new service name is added to the LDAP directory, the service name is available for users to connect with. With local naming the DBA must first distribute update tnsnames.ora files containing the changed service name information before users can connect to new or modified services

Directory naming is appropriate for organizations where oracle net service configurations change frequently.

Oralce net support advanced connection options with local and directory naming

Connect-time failover: oralce net will keep trying addresses in order until it reaches a listener that is functioning or util all address have been tried and failed.

Load balancing : oracle net picks an address at random form the list of addresses.

Source routing: oracle net treats the addresses as a list of relays, connecting to the first address and the requesting to be passed from the first to the second until destination is reached.

Enterprise manager database control configures the server side of oracle net, but does not help with client or middle-tier configuration. The oracle net manager is a grahpical tool promarily used to configure client-side oracle net connections including:

  • Oralce net services names
  • Oracle net profiles
  • -- security
  • -- troubleshooting(logging and tracing)
  • -- names resolution methods

The oralce net manager can also be used to create and configure oralce net listeners, and to configure Lightweight Directory Access Protocol(LDAP) service name resolution.

Testing oracle net connectivity

  • The tnsping utility tests oracle net service aliases.
  • Ensures connectivity between client and the oralce net listener
  • Does not verify that the requested service is avaliable
  • Supports easy connect names resolution

# tnsping db.us.oracle.com:1521/dba10g

l Supports local and directory naming

# tnsping foo

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7199022/viewspace-1002811/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/7199022/viewspace-1002811/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值