oracle-网络
e10835 net reference
/u01/app/oracle/diag/tnslsnr/oracle1/listener/trace/listener.log
TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE
#######################################
tnsping时会出现下面的日志项
Thu Mar 30 16:45:52 2017
30-MAR-2017 16:45:52 * ping * 0
#######################################
每30秒update一次
Wed Mar 29 17:15:49 2017
29-MAR-2017 17:15:49 * service_update * aa * 0
Wed Mar 29 17:16:19 2017
29-MAR-2017 17:16:19 * service_update * aa * 0
Wed Mar 29 17:16:49 2017
29-MAR-2017 17:16:49 * service_update * aa * 0
Wed Mar 29 17:17:10 2017
29-MAR-2017 17:17:10 * service_update * aa * 0
Wed Mar 29 17:17:49 2017
29-MAR-2017 17:17:49 * service_update * aa * 0
Wed Mar 29 17:18:19 2017
29-MAR-2017 17:18:19 * service_update * aa * 0
#######################################
29-MAR-2017 17:58:44 * service_register * aa * 0
15-NOV-2016 08:39:32 * service_died * DBUA3838241 * 12537
WARNING: Subscription for node down event still pending
#######################################
有客户端连接时,就会有下面的日志项
29-MAR-2017 17:14:20 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=aa)(CID=(PROGRAM=D:\Program?Files??x86?\ZIP\instantclient-basic-windows.x64-11.2.0.4.0\instantclient_11_2\sqlplus.exe)(HOST=DESKTOP-NMUHAH0)(USER=fgy))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.10.99)(PORT=50901)) * establish * aa * 0
运行下面的命令时会有下面的日志项
lsnrctl>services
Wed Mar 29 17:20:46 2017
29-MAR-2017 17:20:46 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=oracle1)(USER=oracle))(COMMAND=services)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=186647552)) * services * 0
用admin通过浏览器访问时,就会有下面的日志项
Wed Mar 29 18:27:21 2017
29-MAR-2017 18:27:21 * (CONNECT_DATA=(SID=testdb)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=root))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.60.14)(PORT=56553)) * establish * testdb * 0
#######################################
通过程序去连接时时,就会有下面的日志项
好像分两部分
30-MAR-2017 17:21:52 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=songlin_xie_n22))(SERVICE_NAME=stbaoka)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=songlin_xie_n22))) * (ADDRESS=(PROTOCOL=tcp)(HOST=124.115.229.210)(PORT=58056)) * establish * stbaoka * 0
30-MAR-2017 17:21:52 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=songlin_xie_n22))(SERVICE_NAME=stbaoka)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=songlin_xie_n22))) * (ADDRESS=(PROTOCOL=tcp)(HOST=124.115.229.210)(PORT=63405)) * establish * stbaoka * 0
30-MAR-2017 17:21:52 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=songlin_xie_n22))(SERVICE_NAME=stbaoka)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=songlin_xie_n22))) * (ADDRESS=(PROTOCOL=tcp)(HOST=124.115.229.210)(PORT=26675)) * establish * stbaoka * 0
30-MAR-2017 17:21:52 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=songlin_xie_n22))(SERVICE_NAME=stbaoka)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=songlin_xie_n22))) * (ADDRESS=(PROTOCOL=tcp)(HOST=124.115.229.210)(PORT=37961)) * establish * stbaoka * 0
30-MAR-2017 17:21:52 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=songlin_xie_n22))(SERVICE_NAME=stbaoka)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=songlin_xie_n22))) * (ADDRESS=(PROTOCOL=tcp)(HOST=124.115.229.210)(PORT=44298)) * establish * stbaoka * 0
30-MAR-2017 17:21:52 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=songlin_xie_n22))(SERVICE_NAME=stbaoka)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=songlin_xie_n22))) * (ADDRESS=(PROTOCOL=tcp)(HOST=124.115.229.210)(PORT=2647)) * establish * stbaoka * 0
30-MAR-2017 17:21:52 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=songlin_xie_n22))(SERVICE_NAME=stbaoka)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=songlin_xie_n22))) * (ADDRESS=(PROTOCOL=tcp)(HOST=124.115.229.210)(PORT=56995)) * establish * stbaoka * 0
30-MAR-2017 17:21:52 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=songlin_xie_n22))(SERVICE_NAME=stbaoka)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=songlin_xie_n22))) * (ADDRESS=(PROTOCOL=tcp)(HOST=124.115.229.210)(PORT=16633)) * establish * stbaoka * 0
30-MAR-2017 17:22:17 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))(SERVICE_NAME=stbaoka)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))) * (ADDRESS=(PROTOCOL=tcp)(HOST=124.115.229.210)(PORT=47311)) * establish * stbaoka * 0
30-MAR-2017 17:22:17 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))(SERVICE_NAME=stbaoka)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))) * (ADDRESS=(PROTOCOL=tcp)(HOST=124.115.229.210)(PORT=16602)) * establish * stbaoka * 0
30-MAR-2017 17:22:17 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))(SERVICE_NAME=stbaoka)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))) * (ADDRESS=(PROTOCOL=tcp)(HOST=124.115.229.210)(PORT=15513)) * establish * stbaoka * 0
30-MAR-2017 17:22:17 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))(SERVICE_NAME=stbaoka)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))) * (ADDRESS=(PROTOCOL=tcp)(HOST=124.115.229.210)(PORT=54723)) * establish * stbaoka * 0
30-MAR-2017 17:22:17 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))(SERVICE_NAME=stbaoka)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))) * (ADDRESS=(PROTOCOL=tcp)(HOST=124.115.229.210)(PORT=63255)) * establish * stbaoka * 0
30-MAR-2017 17:22:17 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))(SERVICE_NAME=stbaoka)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))) * (ADDRESS=(PROTOCOL=tcp)(HOST=124.115.229.210)(PORT=30379)) * establish * stbaoka * 0
30-MAR-2017 17:22:17 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))(SERVICE_NAME=stbaoka)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))) * (ADDRESS=(PROTOCOL=tcp)(HOST=124.115.229.210)(PORT=4706)) * establish * stbaoka * 0
30-MAR-2017 17:22:17 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))(SERVICE_NAME=stbaoka)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))) * (ADDRESS=(PROTOCOL=tcp)(HOST=124.115.229.210)(PORT=24433)) * establish * stbaoka * 0
30-MAR-2017 17:22:17 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))(SERVICE_NAME=stbaoka)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))) * (ADDRESS=(PROTOCOL=tcp)(HOST=124.115.229.210)(PORT=6087)) * establish * stbaoka * 0
30-MAR-2017 17:22:17 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))(SERVICE_NAME=stbaoka)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))) * (ADDRESS=(PROTOCOL=tcp)(HOST=124.115.229.210)(PORT=43191)) * establish * stbaoka * 0
#######################################
Fri Jan 20 14:39:28 2017
20-JAN-2017 14:39:28 * (CONNECT_DATA=(SID=stbaoka)(CID=(PROGRAM=null)(HOST=__jdbc__)(USER=null))) * (ADDRESS=(PROTOCOL=tcp)(HOST=124.115.229.210)(PORT=18459)) * establish * stbaoka * 0
20-JAN-2017 14:39:28 * (CONNECT_DATA=(SID=stbaoka)(CID=(PROGRAM=SQL Developer)(HOST=__jdbc__)(USER=fgy))) * (ADDRESS=(PROTOCOL=tcp)(HOST=124.115.229.210)(PORT=20065)) * establish * stbaoka * 0
16-FEB-2017 17:38:54 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=root))(SERVICE_NAME=stbaoka)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=root))) * (ADDRESS=(PROTOCOL=tcp)(HOST=117.34.72.196)(PORT=45530)) * establish * stbaoka * 0
16-FEB-2017 17:38:55 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=root))(SERVICE_NAME=stbaoka)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=root))) * (ADDRESS=(PROTOCOL=tcp)(HOST=117.34.72.196)(PORT=45531)) * establish * stbaoka * 0
#######################################
[oracle@cn-111-testdb trace]$ oerr tns 12537
12537, 00000, "TNS:connection closed"
// *Cause: "End of file" condition has been reached; partner has disconnected.
// *Action: None needed; this is an information message.
[oracle@cn-111-testdb trace]$ oerr help
Usage: oerr facility error
Facility is identified by the prefix string in the error message.
For example, if you get ORA-7300, "ora" is the facility and "7300"
is the error. So you should type "oerr ora 7300".
If you get LCD-111, type "oerr lcd 111", and so on.
服务器端的sqlnet.log
/u01/app/oracle/product/11.2/db_1/network/log/sqlnet.log
客户端的sqlnet.log
/u01/app/oracle/diag/clients/user_oracle/host_839358077_80/trace/sqlnet.log
C:\Users\fgy\Oracle\oradiag_fgy\diag\clients\user_fgy\host_3210449687_80\trace
Directory does not exist for read/write [/u01/app/oracle/product/11.2.0/dbhome_1/log] [/u01/app/oracle/product/11.2.0/dbhome_1/log/diag/clients]
***********************************************************************
Fatal NI connect error 12520, connecting to:
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.20.102)(PORT=1521))(CONNECT_DATA=(SERVER=shared)(SERVICE_NAME=wode)(CID=(PROGRAM=sqlplus@cu-kvm1)(HOST=cu-kvm1)(USER=oracle))))
VERSION INFORMATION:
TNS for Linux: Version 11.2.0.4.0 - Production
TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.4.0 - Production
Time: 02-APR-2017 11:46:45
Tracing not turned on.
Tns error struct:
ns main err code: 12564
TNS-12564: TNS:connection refused
ns secondary err code: 0
nt main err code: 0
nt secondary err code: 0
nt OS err code: 0
#######################################
16-22
in the log file by the network layer
16-44
session layer controls the connection
#######################################
select * from v$queue;
select * from v$dispatcher;
select * from v$dispatcher_config;
select * from v$dispatcher_rate;
select * from V$SHARED_SERVER;
#######################################
SQL> connect lcpsys@(description=(address=(protocol=tcp)(host=192.168.10.104)(port=1521))(connect_data=(sid=aa)))
Enter password:
Connected.
SQL>
#######################################
动态非默认端口
1tnsnames.ora
2local_listener参数
alter system set local_listener='testdb';
立即注册,而不是等待60秒,pmon进程周期性的联系listener
SQL> alter system register;
#######################################
sqlnet.ora
存储在两个位置
/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/
或者TNS_ADMIN环境变量指定的位置
###################################
Non-ADR parameters listed in the sqlnet.ora file are ignored
when ADR is enabled. ADR is enabled by default.
The default value of DIAG_ADR_ENABLED is on. Therefore,
the DIAG_ADR_ENABLED parameter must explicitly be set to off in order
for non-ADR tracing to be used.
###################################
具体参数
与防火墙类似的功能,Oracle 提供限制与允许特定的IP或主机名通过Oracle Net来访问数据库。这个功能由sqlnet.ora配置文件来实
现。该文件通常$ORACLE_HOME/network/admin/ 目录下,与tnsnames.ora以及listener.ora位于同一路径。用法也比较简单。通过监听器的
限制,实现轻量级访问限制,比在数据库内部通过触发器进行限制效率要高。
1.通常情况下,更倾向于使用excluded_nodes参数。
tcp.validnode_checking = yes
tcp.invited_nodes = (hostname1,hostname2,ip1,ip2)
tcp.excluded_nodes = (10.103.11.17,hostname1,hostname2)
使用excluded_nodes与invited_nodes的一些特性
不支持通配符的使用(如hostname不能写为svhs0*,IP地址不能写为10.103.11.*)
excluded_nodes与invited_nodes为互斥方式,要么使用前者,要么使用后者
如果tcp.invited_nodes与tcp.excluded_nodes都存在,则tcp.invited_nodes优先
要将本地地址,或者Cluster群集其他节点的地址都加入到允许列表,否则监听器可能无法启动
修改之后,一定要重起监听或reload才能生效,而不需要重新启动数据库
仅提供对TCP/IP协议的支持
#######################
To specify the order of the naming methods used for client name resolution lookups.
NAMES.DIRECTORY_PATH=(tnsnames, ldap, ezconnect)
#######################
oracle-网络的更多相关文章
- oracle网络服务之beq协议和SDU优化(性能提升可达30%)
oracle网络服务之beq协议和SDU优化(性能提升可达30%) 12.3.1 BEQ协议 如果Oracle数据库服务端和客户端在同一台机器上,可以使用BEQ连接,BEQ连接采用进程间直接通信,不 ...
- Oracle 网络监听配置管理
Oracle 网络配置与管理 详细信息可以参考以下信息: [学习目标] 一.原理解析 二.配置侦听器(LISTENER) 三.配置客户端网络服务名 四.关于注册 五.查询某服务是静态还是动态注册 Or ...
- OCM_第二天课程:Section1 —》配置 Oracle 网络环境
注:本文为原著(其内容来自 腾科教育培训课堂).阅读本文注意事项如下: 1:所有文章的转载请标注本文出处. 2:本文非本人不得用于商业用途.违者将承当相应法律责任. 3:该系列文章目录列表: 一:&l ...
- oracle 网络配置 及 pl/sql 连接配置
oracle网络配置有三个文件,它们都在D:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN 这个文件夹下面,有sqlnet.ora.l ...
- PLSQL连接ORACLE配置字符串简介 oracle网络配置 三个配置文件 listener.ora、sqlnet.ora、tnsnames.ora原理解释
PLSQL连接ORACLE配置字符串简介 oracle网络配置 三个配置文件 listener.ora.sqlnet.ora.tnsnames.ora原理解释 oracle网络配置三个配置文件 lis ...
- oracle 网络访问配置tnsnames.ora文件的路径
转自:https://blog.csdn.net/jaray/article/details/22379811 oracle 网络访问配置tnsnames.ora文件的路径 oracle 9i 是: ...
- Oracle网络服务管理与配置
一.Oracle网络服务概述 1.网络解决方案. (1)可连接性:在Oracle中,由Oracle net组件负责在客户端应用程序与数据服务器之间创建会话.维护会话连接和数据传输. (2)可管理性: ...
- 配置Oracle网络服务
Oracle网络服务是什么呢? Oracle网络服务是客户端访问数据库服务器端才需要配置的,也就是说,你的Oracle数据库没有装在你自己的电脑上,你需要去访问别人电脑上的Oracle数据库,那么你就 ...
- Oracle—网络配置文件
Oracle网络配置文件详解 三个配置文件 listener.ora.sqlnet.ora.tnsnames.ora ,都是放在$ORACLE_HOME/network/admin目录下. 1 ...
- ORACLE网络配置大全没有比这个更详细的【weber出品】
一.起篇 现在怎么说也是互联网时代,数据库也要联网,很多朋友学习Oracle的时候无外乎搭建的是以下两种学习环境: 1.直接在windows环境下安装Oracle后直接sqlplus连接. 2.在wi ...
随机推荐
- Nginx+Flume+Hadoop日志分析,Ngram+AutoComplete
配置Nginx yum install nginx (在host99和host101) service nginx start开启服务 ps -ef |grep nginx看一下进程 ps -ef | ...
- intellij怎么导入MySQL的驱动包
1.下载zip格式的驱动包:https://dev.mysql.com/downloads/connector/j/ 2.解压zip,放到任意位置.其中的mysql-connector-java.ja ...
- vue中七牛插件使用
<template> <div id="cxUpload" class="cx-upload"> <button id=" ...
- javascript性能优化之使用对象、数组直接量代替典型的对象创建和赋值
1.典型的对象创建和赋值操作代码示例 var myObject = new Object(); myObject.name = "Nicholas"; myObject.count ...
- 解决MySQL不允许远程连接的问题
进入MySQL:mysql -u root -p mysql> GRANT ALL privileges ON *.* TO 'root' @'localhost' IDENTIFIED ...
- XML Schema——笔记整理
什么是 XML Schema? 定义可出现在文档中的元素 定义可出现在文档中的属性 定义哪个元素是子元素 定义子元素的次序 定义子元素的数目 定义元素是否为空,或者是否可包含文本 定义元素和属性的数据 ...
- quartz 应用
quartz api地址:http://www.quartz-scheduler.org/api/2.2.0/ 根据需求选择quartz调度方案: 1,如果调度时间是固定不变的,可以选择静态调度 2, ...
- python 基础5 初级函数
函数最重要的目的是方便我们重复使用相同的一段程序.将一些操作隶属于一个函数,以后你想实现相同的操作的时候,只用调用函数名就可以,而不需要重复敲所有的语句. def my_len(): def 关键字 ...
- Python学习笔记第二十一周
目录: 1.URL 2.Models - 操作 3.Templates - html模板的使用 - 自定义函数 4.cookie和session 5.分页(自定义分页) 6.Form验证 内容: 1. ...
- 20165228 实验一 Java开发环境的熟悉
20165228 实验一 Java开发环境的熟悉 一.实验内容及步骤 (一)使用JDK编译.运行简单的Java程序 命令行下Java程序开发 1.用VrtualBox打开Linux虚拟机 2.使用Al ...