Tag:listening acl Summary sys res sqlplus gen mini sysdba
Service Name --Modify [[email protected] ~]$ sqlplus / as sysdbasql> according to business requirements show parameter service_names;name TYPE VALUE------------------------------------ --------------------------------- ------------------------ ------service_names string king Instance Name --Allow modification not recommended modification sql> show parameter instance_namename TYPE value------------------------------------ --------------------------------- ------ ------------------------instance_name string king database name --does not allow modification sql> show parameter db_namename TYPE value------------------------------------ --------------------------------- ------------------------------db_name string king Listener [[email protected] ~]$ cd $ORACLE _home/network/admin[[email protected] 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 = KING01) (port = 1521)) --protocol, host, Port ) ) Adr_base_listener = /u01/app /oracle[[email protected] ~]$ lsnrctl startlsnrctl for linux: version 11.2.0.4.0 - production on 29-jun-2018 10:02:26copyright (c) 1991, 2009, 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/king01/listener/alert/log.xmllistening on: (description= (address= (PROTOCOL=tcp) (HOST=KING01) (port=1521))) connecting to (description= (address= (protocol=tcp) (HOST=KING01) (port=1521)) STATUS of the listener------------------------alias LISTENERVersion TNSLSNR for linux: version 11.2.0.4.0 - productionstart date 29-JUN-2018 10:02:26Uptime 0 days 0 hr. 0 min. 0 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/king01/listener/alert/log.xmllistening endpoints summary... ( Description= (address= (protocol=tcp) (HOST=KING01) (port=1521)) the listener supports no servicesthe command completed successfully[[email protected] ~]$ lsnrctl statuslsnrctl for linux: version 11.2.0.4.0 - production on 29-jun-2018 10:03:41copyright (c) 1991, 2009, oracle. all rights reserved. connecting to (description= (address= (protocol=tcp) (HOST=KING01) (port=1521)) STATUS of the listener------------------------alias LISTENERVersion TNSLSNR for linux: version 11.2.0.4.0 - productionstart date 29-JUN-2018 10:02:26Uptime 0 Days 0 hr. 1 min. 15 sectrace&nbsP 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/king01/listener/alert/ log.xmllistening endpoints summary... (description= (address= (PROTOCOL=tcp) (HOST=KING01) ( port=1521)) Services summary ... service "King" has 1 instance (s). --through Pmon dynamically registered service name Instance " King ", status ready, has 1 handler (s) for this service ... service " Kingxdb " has 1 instance (s) . instance " King ", status ready, has 1 handler (s) for this service ... The command completed successfully Client (local naming method) [[email protected] ~]$ cd $ oracle_home/network/admin[[email protected] 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. king = --Connection string (Network service name) modified according to business requirements (description = (address = (protocol = tcp) (host = 192.168.1.201) (port = 1521)) --protocol, host, Port (connect_data = (server = dedicated) --Dedicated server mode (SERVICE_name = king) --and service name ) ) [[email protected] ~]$ sqlplus sys/[email protected] 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 in the Listener.ora file, the host, the port, the service name that is dynamically registered with the Pmon, the protocol in the Tnsnames.ora file, the host, the port, the service name need to be consistent, the client can connect the database server normally.
Oracle Database Network Management