我遇到了3个不同环境中所有数据库的问题。数据库,监听器,同一本地机器上的应用程序。基本简单的listener.ora,tnsnames.ora,带有一个SID /服务名称。几年前我使用DBCA创建数据库,使用netca配置监听器等。
直到最近,这似乎没有大量的问题,但是有很多连接超时,套接字错误。听众似乎并没有保持稳定。
我可以开始听众;但是,在初始启动后,可能是状态,监听器挂起状态。有时听众会在一段时间后完成,但更多时候,我会贪图并杀死PID。
我注意到的两件事(sqlnet.ora和pfile init文件)缺失但不确定这是否是一个问题,因为这是一个正常运行的系统。我添加了两个,它似乎没有取得任何进展。
当然我可以直接连接到数据库但是当我通过监听器时出现错误:
bin]$ ./sqlplus sys/xxxx@cosga as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Mon Feb 27 22:21:39 2017
Copyright (c) 1982, 2009, Oracle. All rights reserved.
ERROR:
ORA-12547: TNS:lost contact
LISTENER.ORA:
# listener.ora Network Configuration File: /app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = server fully qualifed)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
ADR_BASE_LISTENER = /app/oracle
tnsnames.ora中:
# tnsnames.ora Network Configuration File: /app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
COSGA =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = server fullyqualified)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = cosga)
)
)
TNSPING
$ ./tnsping cosga
TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 27-FEB-2017 22:28:41
Copyright (c) 1997, 2009, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = server fully qualified)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = cosga)))
TNS-12547: TNS:lost contact
ETC /主机:
127.0.0.1 localhost.localdomain localhost
xxx.xx.xxx.xxx serverfullyqualified server
显示参数(删除可能不适用):
SQL> show parameters;
audit_file_dest /app/oracle/admin/cosga/adump
background_dump_dest /app/oracle/diag/rdbms/cosga/cosga/trace
bitmap_merge_area_size 1048576
compatible 11.2.0.0.0
control_file_record_keep_time 7
control_files /app/oracle/oradata/cosga/control01.ctl, /app/oracle/flash_recovery_area/cosga/control02.ctl
core_dump_dest /app/oracle/diag/rdbms/cosga/cosga/cdump
create_bitmap_area_size 8388608
db_files 200
db_name cosga
db_recovery_file_dest /app/oracle/flash_recovery_area
db_recovery_file_dest_size 3882M
db_unique_name cosga
dg_broker_config_file1 /app/oracle/product/11.2.0/dbhome_1/dbs/dr1cosga.dat
dg_broker_config_file2 /app/oracle/product/11.2.0/dbhome_1/dbs/dr2cosga.dat
diagnostic_dest /app/oracle
dispatchers (PROTOCOL=TCP) (SERVICE=cosgaXDB)
distributed_lock_timeout 60
hash_area_size 131072
ifile file
instance_name cosga
job_queue_processes 1000
max_enabled_roles 150
memory_max_target 7G
memory_target 7G
open_cursors 300
open_links 4
open_links_per_instance 4
processes 300
resource_manager_cpu_allocation 4
resumable_timeout 0
service_names cosga
session_cached_cursors 50
session_max_open_files 10
sessions 472
sga_max_size 7G
sga_target 0
shared_pool_reserved_size 144284057
standby_archive_dest ?/dbs/arch
transactions 519
transactions_per_rollback_segment 5
undo_tablespace UNDOTBS1
user_dump_dest /app/oracle/diag/rdbms/cosga/cosga/trace
状态监听器:
]$ ./lsnrctl status listener
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 27-FEB-2017 18:30:46
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=servername.fullyqualified)(PORT=1521)))
TNS-01153: Failed to process string: ����
有没有人有任何建议?此时它正在影响这家大公司的供应商申请。如果侦听器运行不正常,tomee服务器不会启动,但我们和供应商认为它是SLM接口性能和容量问题的来源。
有一次,这种方法运行得非常好,甚至可以通过dbora,apache,tomee等重启来自动启动。
答案 0 :(得分:0)
您的侦听器日志文件可能太大。尝试重命名它,以代替它。
$ORACLE_BASE\diag\tnslsnr\<hostname>\listener\trace\<listener_name>.log