保存之后记得
打开监听:
尝试连接之后还是不行报下面的错误:
这个问题就很简单了:
我们打开
.ora:配置访问级别(个人理解)
SQLNET.AUTHENTICATION_SERVICES= (NONE)
# sqlnet.ora Network Configuration File: D:\app\lenovo\product\11.2.0\dbhome_1\network\admin\sqlnet.ora# Generated by Oracle configuration tools.# This file is actually generated by netca. But if customers choose to # install "Software Only", this file wont exist and without the native # authentication, they will not be able to connect to the database on NT.#SQLNET.AUTHENTICATION_SERVICES= (NTS) 高级权限注释掉SQLNET.AUTHENTICATION_SERVICES= (NONE)NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
记得重启监听:上面说了 按照顺序
这样远程就可以访问了;本地远程都可以访问 192.168.0.169了
有的访问者需要配置:
.ora
名字随意=(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = 你的ip)(PORT = 1521))(CONNECT_DATA =http://www.kingceram.com/post/(SERVER = DEDICATED)(SERVICE_NAME = 服务名)))
# tnsnames.ora Network Configuration File: D:\app\lenovo\product\11.2.0\dbhome_1\network\admin\tnsnames.ora# Generated by Oracle configuration tools.LISTENER_ORCL =(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))ORACLR_CONNECTION_DATA =(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)))(CONNECT_DATA =(SID = CLRExtProc)(PRESENTATION = RO)))ORCL =(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.169)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = orcl)))TEST =(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = ip)(PORT = 1521))(CONNECT_DATA =http://www.kingceram.com/post/(SERVER = DEDICATED)(SERVICE_NAME = 服务名)))
3. 踩坑记录 3.1 无监听,监听异常(除了恢复配置文件默认,还可以如下操作)
这样就可以了,他会多出几个带今天日期的bak文件;
4.扩展知识 1.文件内容详解
.ora文件
.ora是服务器端用的,监听程序,就是读的这个文件,里面有服务器端的监听地址和端口(
如果要想局域网中的其他人,能够访问我本地的,要把我本机的地址写进去,如10.11.19.19
文件地址:\\\10.2.0\db_1\\ADMIN
LISTENER =(DESCRIPTION_LIST =(DESCRIPTION =(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = 10.11.19.19)(PORT = 1521))))
.ora文件
.ora是记录客户端访问数据库的本地配置:
客户端是通过.ora来识别连接服务器的
如果你没有添加.ora,那么你就连接不上服务器的 。。
文件地址:\\\10.2.0\db_1\\ADMIN
ORCL =(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = 主机地址)(PORT = 端口))(CONNECT_DATA =http://www.kingceram.com/post/(SERVER = DEDICATED)(SERVICE_NAME = orcl))))
其中,每个部分的解释如下所示:
l. :客户端与服务器端通讯的协议,一般为TCP,该内容一般不用改 。
2. HOST:数据库所在的机器的主机名或IP地址 。不管用主机名还是IP地址,在客户端一定要用ping命令ping通数据库所在的机器,否则需要在hosts文件中加入数据库所在的机器的主机名和IP地址的对应关系 。
3. PORT:数据库监听器的端口,可以查看服务器端的.ora文件或在数据库服务器中通过[ name]命令来查看 。一般为1521端口 。
- 关于数据打印的详细探讨:如何才能打印得更整齐
- 海藻素水溶肥是什么?
- 如何使用计算机定时启动文件夹,详细教您电脑开机自动打开文件夹怎么解决
- 最后一战编译步骤
- Windows 7的“上帝模式”详细解析
- 集百家所论 sarsa算法和qlearning算法的不同之处的详细深入探讨
- 详细 webpack
- 长年紧缺药材有哪几种详细介绍
- 农村常见的十种野菜详细介绍
- ETCD原理详细解析