简体   繁体   English

来自客户端的Oracle 12c CentOS PDB连接

[英]Oracle 12c CentOS PDB Connection from client

I have an installation of Oracle 12c on a Windows Server 2012 machine. 我在Windows Server 2012计算机上安装了Oracle 12c。 it has a single PDB (PDBORCL). 它具有单个PDB(PDBORCL)。 I have created a user in this PDB and can connect to it from a client machine via SQL Developer using the user/pass for the user i created. 我已经在此PDB中创建了一个用户,并且可以使用我创建的用户的用户/密码通过SQL Developer从客户端计算机连接到该用户。 the machine hostname and a Service Name of PDBORCL - GREAT! 机器的主机名和PDBORCL的服务名-太棒了!

I tried to replicate the same thing on an Oracle 12c install but I am having an issue of: TNS listener does not know of a service requested in the connect descriptor. 我试图在Oracle 12c安装上复制相同的内容,但是出现以下问题:TNS侦听器不知道连接描述符中请求的服务。

I have been around online and found maybe i should be putting a reference to the pdb into the tnsnames.ora file on the Cent machine - BUT if i look at the contents of the tnsnames.ora file and listener.ora file on the Windows machine they are still as defaults and contain no reference whatsoever to the PDB "PDBORCL" that i have on the windows installation - so how does it manage to connect fine and my linux box doesnt know what to do? 我已经上网了,发现也许我应该将对pdb的引用放入Cent机器的tnsnames.ora文件中-但是,如果我查看Windows机器上的tnsnames.ora文件和listener.ora文件的内容它们仍然是默认设置,对Windows安装中的PDB“ PDBORCL”均不包含任何引用-那么它如何设法正常连接并且我的linux框不知道该怎么办?

I guess im looking for general guidance around what should be in the tnsnames.ora file and listener.ora file on my linux machine so that i can access it from a client by referencing the PDB as the Service Name when i connect via SQL Developer. 我猜我正在寻找有关Linux计算机上tnsnames.ora文件和listener.ora文件中应包含的内容的一般指导,以便我在通过SQL Developer连接时可以通过将PDB称为服务名来从客户端访问它。

Finally got it working on the Linux box. 终于在Linux机器上运行了它。 Reason was i was using PDBORCL as the Service Name. 原因是我使用PDBORCL作为服务名称。 after logging on as SYSDBA and querying V$Services i could see that I should have been using pdborcl.localdomain 以SYSDBA身份登录并查询V $ Services后,我可以看到我应该一直在使用pdborcl.localdomain

I'm still not too sure on why the tnsnames on the windows machine didn't explicitly need me to define the pdb though. 我仍然不太确定为什么Windows机器上的tnsnames不需要我明确定义pdb。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM