Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

[Oracle Database] Database snooping and connection

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Service name-modify [oracle@wallet01 ~] $sqlplus / as sysdbaSQL > show parameter service_names according to business requirements NAME TYPE VALUE -service_names string wallet instance name-allows modification. It is not recommended to modify SQL > show parameter instance_nameNAME TYPE VALUE----. -instance_name string wallet database name-- SQL > show is not allowed Parameter db_nameNAME TYPE VALUE -db_name string wallet listener [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))-- Protocol Host, port) 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 client (local naming) [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 =-- connection string (network service name) modified according to business requirements Change (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.1.201) (PORT = 1521))-- Protocol Host, port (CONNECT_DATA = (SERVER = DEDICATED)-dedicated server mode (SERVICE_NAME = wallet)-consistent with service name) [oracle@wallet02 ~] $sqlplus sys/oracle@wallet as sysdba-- username / password @ connection string (network service name) 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 Summary: the protocol, host, port in the listener.ora file, and the service name dynamically registered through PMON, and the protocol, host, port, and service name in the tnsnames.ora file need to be consistent before the client can connect to the database server normally.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report