Tôi đã cài đặt Cơ sở dữ liệu Oracle 11gR2 cũng như Cơ sở hạ tầng lưới Oracle trên một hộp Linux, sau đó tôi đã tạo cơ sở dữ liệu orcl
.Trình nghe không hỗ trợ dịch vụ
Tôi luôn có thể kết nối với cơ sở dữ liệu của mình bằng SQL * Plus hoặc OEM. Nhưng gần đây, tôi đang đối mặt với một vấn đề khi gõ lệnh lsnrctl status
, và vì vậy tôi không thể kết nối với cơ sở dữ liệu.
listener.ora
tập tin của tôi:
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/grid/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = pc.company.com)(PORT = 1521))
)
)
ADR_BASE_LISTENER = /u01/app/oracle
tập tin tnsnames.ora của tôi:
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = pc.company.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl.example.com)
)
)
Khi gõ lsnrctl status
, tôi nhận được như sau:
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 21-JUL-2014 03:35:48
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 21-JUL-2014 03:25:58
Uptime 0 days 0 hr. 9 min. 50 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Log File /u01/app/oracle/diag/tnslsnr/pc151/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=pc.company.com)(PORT=1521)))
The listener supports no services
The command completed successfully
Whe n gõ sqlplus/as sysdba
sau đó startup
, tôi có được điều này:
ORA-01078: failure in processing system parameters
ORA-01565: error in identifying file '+DATA/orcl/spfileorcl.ora'
ORA-17503: ksfdopn:2 Failed to open file +DATA/orcl/spfileorcl.ora
ORA-29701: unable to connect to Cluster Synchronization Service
Và lệnh srvctl start database
thất bại trong việc khởi động cơ sở dữ liệu lên quá.
tập tin oratab
của tôi là như sau:
#Backup file is /u01/app/oracle/product/11.2.0/dbhome_1/srvm/admin/oratab.bak.pc150 line added by Agent
#
# This file is used by ORACLE utilities. It is created by root.sh
# and updated by the Database Configuration Assistant when creating
# a database.
# A colon, ':', is used as the field terminator. A new line terminates
# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
+ASM:/u01/app/oracle/product/11.2.0/grid:N
orcl:/u01/app/oracle/product/11.2.0/dbhome_1:N # line added by Agent
Cơ sở dữ liệu của bạn có thực sự chạy không? Nó sẽ không xuất hiện trong danh sách dịch vụ cho đến khi nó đăng ký, nó sẽ khởi động nếu nó có thể, và nó tiếp tục cố gắng nếu nó không thể. Nếu nó đang hoạt động - bạn có thể kết nối cục bộ với SQL * Plus - bạn có tập tham số init 'local_listener'; và 'pc.company.com' có giải quyết được địa chỉ IP thực tế của máy tính của bạn (tức là bạn không sử dụng DHCP) không? –
Cơ sở dữ liệu của tôi không chạy không may, và tôi không sử dụng dhcp. Tôi có một địa chỉ IP tĩnh. – Simo03