Forum Stats

  • 3,874,176 Users
  • 2,266,677 Discussions
  • 7,911,754 Comments

Discussions

Can't connect with proxy user

I'm trying to connect using a proxy user but keep getting invalid username/password. I'm able to connect using SQL Developer using the square bracket notation (sure would be nice is VS Code had this functionality). I've looked through a bunch of old posts about this issue but can't get anything to work. I'm using a TNS Alias connection, the User name is the name that isn't mine, password is blank, proxy user name is my name, and proxy password is my password.


Any help or suggestions?

Tagged:

Answers

  • Hi, thanks for the post and welcome to the forum!

    There's a little "i" icon in the connection dialog that takes you to a help page. Please click it and check it out. The "proxy" help on that web page gives you an example using the brackets and the equivalent using the connection dialog.

    Have a look and let me know if you still cannot get it working:


  • User_5BPRC
    User_5BPRC Member Posts: 5 Green Ribbon

    I'm following those instructions (thanks for pointing out the help link) but still am not able to connect. I'm getting the following error: Error opening connection '******'.Details: ORA-01017: invalid username/password; logon denied. But like I said in my previous comment, I'm able to connect just fine in SQL Developer.

  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 2,241 Employee
    edited Oct 27, 2022 8:14PM

    Please provide your current connect string in sql developer (use "password" instead of your real password)

    Then provide a screenshot of your filled in visual studio code connection dialog.

  • User_5BPRC
    User_5BPRC Member Posts: 5 Green Ribbon

    I'm using a TNS alias in both SQL Developer and VS Code (double checked to make sure it's the same file).

    Here's the connect identifier from SQL Developer: (DESCRIPTION=(SOURCE_ROUTE=OFF)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=***.***.***.***)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=***.***.***.***)(SRVR=DEDICATED)))


  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 2,241 Employee
    edited Oct 27, 2022 9:20PM

    The fields look correct... looks like you are connecting in SQLDev like:

    KSK[PHX]/proxypassword

    If so, the fields you filled in the connection dialog look correct, (provided the passwords you used are the same)

    It looks like you blacked out the wallet field but did not check the "use wallet file". Are you trying to use a wallet?

  • User_5BPRC
    User_5BPRC Member Posts: 5 Green Ribbon
    edited Oct 27, 2022 9:22PM

    You are correct about the user name and proxy user names/password. Definitely the same password in both. I blacked out the wallet field just to make sure there wasn't anything identifying my company could get mad at me for, but I'm not using a wallet file.

  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 2,241 Employee
    edited Oct 28, 2022 1:45AM

    Can you please share the SQLNET.ORA file located in the location listed in the "tns admin location" field?

    Also, please verify that the tnsnames.ora and sqlnet.ora located in that location is the same files that sqldeveloper is using. You can search your machine for duplicates of these files and rename them to .bak temporarily to make sure they are both using the same files.

  • User_5BPRC
    User_5BPRC Member Posts: 5 Green Ribbon
    edited Oct 31, 2022 5:20PM

    Here's the contents of my sqlnet.ora file. I confirmed that sql developer and vs code are using the same tnsnames.ora and sqlnet.ora files.

    I did hide data that I thought maybe I shouldn't post.

    ################

    # Filename......: sqlnet.ora

    # Name..........: TCP.***.***.***

    # Date..........: 07-APR-98 

    ################

    AUTOMATIC_IPC = ON

    TRACE_LEVEL_CLIENT = OFF

    SQLNET.EXPIRE_TIME = 0

    NAMES.DEFAULT_DOMAIN = ***.***.***

    NAME.DEFAULT_ZONE = ***.***.***

    SQLNET.CRYPTO_SEED = "******************"

    NAMES.DIRECTORY_PATH = (TNSNAMES,LDAP)