简体   繁体   中英

Cannot resolve Oracle connection with Entity Framework tool

I'm trying to learn and implement Entity FW in my project (Using Oracle 11g ). I'm trying to connect to my project using ODP.NET data source and getting the next error:

"ORA:12154:TNS: Could not resolve the connect identifier specified"

我正在尝试做的屏幕截图,显示错误

I looked into stuckoverflow and see that the say to see if the PATH variable is configured correctly and I see there this:

C:\app\USER\oracle\bin;C:\app\USER\product\11.2.0\client_1\bin;C:\app\USER\product\11.2.0\client_1;

after all these I check the my TNSNAMES.ORA file and see that in my 2 HOME folders there is the same TNSNAMES.ORA file and the Instance I'm trying to connect too is configured correctly.

You have to do below mentioned check list for solve this issue.

  • If you are using local naming (TNSNAMES.ORA file):

  • Make sure that "TNSNAMES" is listed as one of the values of the NAMES.DIRECTORY_PATH parameter in the Oracle Net profile (SQLNET.ORA)

  • Verify that a TNSNAMES.ORA file exists and is in the proper directory and is accessible.

  • Check that the net service name used as the connect identifier exists in the TNSNAMES.ORA file.

  • Make sure there are no syntax errors anywhere in the TNSNAMES.ORA file. Look for unmatched parentheses or stray characters. Errors in a TNSNAMES.ORA file may make it unusable.

  • If you are using directory naming:

  • Verify that "LDAP" is listed as one of the values of the NAMES.DIRETORY_PATH parameter in the Oracle Net profile (SQLNET.ORA).

  • Verify that the LDAP directory server is up and that it is accessible.

  • Verify that the net service name or database name used as the connect identifier is configured in the directory.

  • Verify that the default context being used is correct by specifying a fully qualified net service name or a full LDAP DN as the connect identifier

  • If you are using easy connect naming:

  • Verify that "EZCONNECT" is listed as one of the values of the NAMES.DIRETORY_PATH parameter in the Oracle Net profile (SQLNET.ORA).

  • Make sure the host, port and service name specified are correct.

  • Try enclosing the connect identifier in quote marks. See the Oracle Net Services Administrators Guide or the Oracle operating system specific guide for more information on naming.

For more information check Oracle® Database Net Services Administrator's Guide under "Oracle Net Connections"

I hope this will help to you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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