9

I have an Oracle database that is located on server_c and are only accessible if you are on server_b. So in order to connect to this Oracle database, I have to first log in to server_b via SSH, and type in the following command to connect to it.

sqlplus username/password@server_c:1571/service

I would like to connect to the Oracle database in DataGrip, first I typed in my username and password in the SSH/SSL tab.

ssh tab

Then I typed in the general database information.

enter image description here

I thought it would be fine, but when I clicked on the Test Connection, I got an error.

Error: Connection to Oracle - @server_c failed. ORA-00604: error occurred at recursive SQL level 1 ORA-20001: Server is not in the List of Valid Application Servers ORA-06512: at line 28

This error occurs if I try to connect to the database directly without logging in to server_b beforehand. In other words, I think DataGrip doesn't connect to the SSH tunnel first before connecting the database.

I'm not sure if I'm using SSH/SSL tab correctly in this way. So if you have any idea why it doesn't work or any solution to it, please let me know.

Searene
  • 25,920
  • 39
  • 129
  • 186
  • Are you using predefined oracle driver or manually created? Do you have warnings on configuration screen? – kassak Nov 16 '16 at 07:30
  • @kassak I'm using the predefined Oracle driver. In fact, I was pretty sure it worked because I connected successfully to another Oracle database. But for this Oracle database, I need to log in to another server to use it, that's why I need an SSH tunnel. But the tunnel didn't work, and I didn't see any warning on configuraiton screen, only an error showed up, I don't know why. – Searene Nov 16 '16 at 12:35
  • @Searene could you try to reproduce the issue since we reworked whole ssh subsystem? – Vasilii Chernov Apr 03 '20 at 14:50
  • 2
    Error messages starting from 20000 up to 20999 are custom, user-specified error messages. Oracle provides this range of error codes so applications can raise or display a custom application error. This is performed by using the PL/SQL raise_application_error function. So, for me it is clear that your database has a logon trigger preventing connections from unauthorised servers. The error RECURSIVE SQL is telling you exactly which line in the logon trigger is responsible of raising the error. – Roberto Hernandez Jul 19 '20 at 13:46
  • So, it looks like SSH is working, you've got sqlnet.ora misconfiguration – Vasilii Chernov Jun 02 '21 at 14:40

1 Answers1

1

The clue is in the error message:

Error: Connection to Oracle - @server_c failed. ORA-00604: error occurred at recursive SQL level 1 ORA-20001: Server is not in the List of Valid Application Servers ORA-06512: at line 28

Check with your DBA either of:

  1. a sqlnet.ora valid node checking tcp.validnode_checking = ...

or more likely:

  1. a login trigger that prevents "unknown servers" from logging in.
סטנלי גרונן
  • 2,917
  • 23
  • 46
  • 68
  • This contribution seems more appropriate as a comment rather than providing a definitive answer to the question asked. Consider using the comment function in the future ... – Kris May 07 '18 at 16:02
  • @Kris except that sharing that info in a comment would be less than ideal as well, this reads closer as an answer to me – thatjeffsmith Apr 09 '20 at 13:05