【Oracle Database】数据库监听与连接
发表于:2024-10-13 作者:千家信息网编辑
千家信息网最后更新 2024年10月13日,服务名 --根据业务需求修改[oracle@wallet01 ~]$ sqlplus / as sysdbaSQL> show parameter service_names;NAME
千家信息网最后更新 2024年10月13日【Oracle Database】数据库监听与连接
服务名 --根据业务需求修改[oracle@wallet01 ~]$ sqlplus / as sysdbaSQL> show parameter service_names;NAME TYPE VALUE------------------------------------ --------------------------------- ------------------------------service_names string wallet实例名 --允许修改不建议修改SQL> show parameter instance_nameNAME TYPE VALUE------------------------------------ --------------------------------- ------------------------------instance_name string wallet数据库名 --不允许修改SQL> show parameter db_nameNAME TYPE VALUE------------------------------------ --------------------------------- ------------------------------db_name string wallet监听器[oracle@wallet01 ~]$ cd $ORACLE_HOME/network/admin[oracle@wallet01 admin]$ cat listener.ora# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora# Generated by Oracle configuration tools.LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = wallet01)(PORT = 1521)) --协议,主机,端口 ) )ADR_BASE_LISTENER = /u01/app/oracle[oracle@wallet01 ~]$ lsnrctl startLSNRCTL for Linux: Version 11.2.0.4.0 - Production on 09-MAY-2019 10:43:13Copyright (c) 1991, 2013, Oracle. All rights reserved.Starting /u01/app/oracle/product/11.2.0/db_1/bin/tnslsnr: please wait...TNSLSNR for Linux: Version 11.2.0.4.0 - ProductionSystem parameter file is /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.oraLog messages written to /u01/app/oracle/diag/tnslsnr/wallet01/listener/alert/log.xmlListening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=wallet01)(PORT=1521)))Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=wallet01)(PORT=1521)))STATUS of the LISTENER------------------------Alias LISTENERVersion TNSLSNR for Linux: Version 11.2.0.4.0 - ProductionStart Date 09-MAY-2019 10:43:13Uptime 0 days 0 hr. 0 min. 5 secTrace Level offSecurity ON: Local OS AuthenticationSNMP OFFListener Parameter File /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.oraListener Log File /u01/app/oracle/diag/tnslsnr/wallet01/listener/alert/log.xmlListening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=wallet01)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))The listener supports no servicesThe command completed successfully[oracle@wallet01 ~]$ lsnrctl statusLSNRCTL for Linux: Version 11.2.0.4.0 - Production on 09-MAY-2019 10:44:44Copyright (c) 1991, 2013, Oracle. All rights reserved.Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=wallet01)(PORT=1521)))STATUS of the LISTENER------------------------Alias LISTENERVersion TNSLSNR for Linux: Version 11.2.0.4.0 - ProductionStart Date 09-MAY-2019 10:43:13Uptime 0 days 0 hr. 1 min. 31 secTrace Level offSecurity ON: Local OS AuthenticationSNMP OFFListener Parameter File /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.oraListener Log File /u01/app/oracle/diag/tnslsnr/wallet01/listener/alert/log.xmlListening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=wallet01)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))Services Summary...Service "wallet" has 1 instance(s). Instance "wallet", status READY, has 1 handler(s) for this service...Service "walletXDB" has 1 instance(s). Instance "wallet", status READY, has 1 handler(s) for this service...The command completed successfully客户端(本地命名方式)[oracle@wallet02 ~]$ cd $ORACLE_HOME/network/admin[oracle@wallet02 admin]$ cat tnsnames.ora # tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora# Generated by Oracle configuration tools.wallet = --连接字符串(网络服务名)根据业务需求修改 (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.201)(PORT = 1521)) --协议,主机,端口 (CONNECT_DATA = (SERVER = DEDICATED) --专用服务器模式 (SERVICE_NAME = wallet) --与服务名保持一致 ) )[oracle@wallet02 ~]$ sqlplus sys/oracle@wallet as sysdba --用户名/密码@连接字符串(网络服务名)SQL*Plus: Release 11.2.0.4.0 Production on Fri Jun 29 10:06:52 2018Copyright (c) 1982, 2009, Oracle. All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> select * from dual;DUM---X总结:listener.ora文件中的协议,主机,端口,与通过PMON动态注册的服务名,与tnsnames.ora文件中的协议,主机,端口,服务名需要保持一致,客户端才可以正常连接数据库服务器。
服务
主机
端口
数据
数据库
一致
业务
字符
字符串
客户
客户端
文件
服务器
网络
网络服务
需求
监听
动态
实例
密码
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
计算机网络安全的原则
一台服务器一般有几块硬盘
嵌入式软件开发作业
学校管理系统数据库源码
软件开发技术用什么形容
技术先进的数据库高性能
软件开发入门免费视频教程
长沙云服务器租用
尊重维护网络安全
合同 网络安全
山东瑞希互联网科技怎么样
山西醒哉网络技术有限公司
0基础考网络技术三级
电子邮件服务器搭建
学校网络安全工作计划
计算机网络技术话费多不
网络安全是以手机为载体吗
宁夏app软件开发案例
东华理工大学网络安全专业
网络安全的重要意义论述题
软件开发计算机的岗位
2012装数据库
数据库基本语句 统计语句
数据库浏览图
随书光盘数据库的检索技巧
js怎么获取服务器时间
强化网络安全宣传和培训
黄浦区品牌软件开发质量推荐
网络安全法的基本方针
原子云服务器怎么选版本