ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA

后端 未结 5 846
不思量自难忘°
不思量自难忘° 2020-12-18 00:09

I\'m trying to connect my local Oracle 11g database using server explorer in Visual Studio 2010. I tried to setup everything as per instruction, but I\'m still getting an OR

5条回答
  •  北荒
    北荒 (楼主)
    2020-12-18 00:23

    Without having much knowledge in connecting ODP.NET with an Oracle DB, I suggest you start using SERVICE_NAME (e.g: VENUS) in your connection parameters.

    Oracle states that:

    From 11g onwards, the feature of using the hostname provided in the /etc/hosts file, as the alias / service name has been changed. As a result, the user will have to provide the service name while connecting OR configure the target listener with a default service name.

    One way to bypass the SERVICE_NAME client side requirement is to force the Listener always sending you on the same SERVICE by telling it to do so in the tnsnames.ora

    DEFAULT_SERVICE_LISTENER =  VENUS
    

    But I do not suggest you do that as it's quite restricting.

提交回复
热议问题