ITPub博客

首页 > Linux操作系统 > Linux操作系统 > oracle网络连接

oracle网络连接

原创 Linux操作系统 作者:wxdlut 时间:2012-03-14 20:00:42 0 删除 编辑

数据库主机:82

service_name:目的,把实例名对客户端进行屏蔽,客户端连接的时候 只需知道服务名即可连接指定的数据库(前提:配好TNS)

oracle@83:~/product/11g/db/network/admin> vi tnsnames.ora

# tnsnames.ora Network Configuration File: /opt/oracle/product/11g/db/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.


ORA11G =
  (DESCRIPTION =
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ora11g)
    )
  )

wxdlut =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.137.23.82)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SID = ora11g)
    )

oracle@83:~/product/11g/db/network/admin> sqlplus scott/tiger@wxdlut

SQL*Plus: Release 11.1.0.7.0 - Production on Wed Mar 14 20:07:33 2012

Copyright (c) 1982, 2008, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options

SQL>

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

上一篇: 事务
请登录后发表评论 登录
全部评论

注册时间:2012-03-09

  • 博文量
    61
  • 访问量
    61540