我是甲骨文的新手,所以对于可能是微不足道或愚蠢的问题,我很抱歉。我需要通过这样的数据库链接互连两个 oracle 数据库(12g 和 11g):
CREATE SHARED DATABASE LINK SYSEL
AUTHENTICATED BY scot IDENTIFIED BY *********
USING 'SYSEL'
我的 tnsnames.ora:
or# tnsnames.ora Network Configuration File: C:\app\Administrator\product\12.1.0\dbhome_1\network\admin\tnsnames.ora
Generated by Oracle configuration tools.
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = Panoramix)(PORT = 1524))
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1524))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = Panoramix)(PORT = 1524))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
SYSEL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = Panoramix)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = studuk)
)
)
但如果我运行查询(例如select * from dual@sysel
),我总是会收到此错误:ORA-12541: TNS:neexistuje žádný proces listener 12541. 00000 - "TNS:no listener" *原因:连接请求无法完成,因为监听器没有运行。*操作:确保提供的目标地址与侦听器使用的地址之一相匹配 - 将 TNSNAMES.ORA 条目与适当的 LISTENER.ORA 文件(或 TNSNAV.ORA,如果连接通过交换)进行比较。在远程机器上启动监听器。行错误:1 列:20
我的 LISTENER.ORA:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\app\Administrator\product\12.1.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:C:\app\Administrator\product\12.1.0\dbhome_1\bin\oraclr12.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1524))
(ADDRESS = (PROTOCOL = TCP)(HOST = Panoramix)(PORT = 1524))
)
)
我在 panoramix 上有一个 stunnel(它正在完全工作,我能够通过 sql developer 连接到 studuk 以及我能够 tnsping studuk。但是数据库链接不起作用。我认为,可能有必要修改一些方式listener.ora,但我不知道如何...可能出了什么问题?请帮忙。祝你好运 Josef K。
现在侦听器在端口 1521 上侦听,但尝试将查询作为 select * from dual@sysel 运行,但不幸的是这个错误:
ORA-12514: TNS:proces listener v současnosti nezná službu požadovanou v deskriptoru připojení
12514. 00000 - "TNS:listener does not currently know of service requested in connect descriptor"
*Cause: The listener received a request to establish a connection to a
database or other service. The connect descriptor received by the listener
specified a service name for a service (usually a database service)
that either has not yet dynamically registered with the listener or has
not been statically configured for the listener. This may be a temporary
condition such as after the listener has started, but before the database
instance has registered with the listener.
*Action:
- Wait a moment and try to connect a second time.
- Check which services are currently known by the listener by executing:
lsnrctl services <listener name>
- Check that the SERVICE_NAME parameter in the connect descriptor of the
net service name used specifies a service known by the listener.
- If an easy connect naming connect identifier was used, check that
the service name specified is a service known by the listener.
- Check for an event in the listener.log file.
行错误:1 列:20
我已经尝试修改我的 listener.ora,以便将服务 sysel 注册到 listener,但没有成功:
SID_LIST_listener=
(SID_LIST=
(SID_DESC=
(GLOBAL_DBNAME=SYSEL)
(SID_NAME=studuk)
(ORACLE_HOME=C:\app\Administrator\product\12.1.0\dbhome_1)))
显然,我的 Oracle 实例无法向侦听器注册服务 SYSEL,我也尝试过 ALTER SYSTEM REGISTER,但没有成功。
剧本
select value from v$parameter where name='service_names'
只返回默认的“ORCL”
我应该如何向侦听器注册服务 SYSEL?谢谢约瑟夫·K。