How to connect to remote Oracle DB with PL/SQL Developer?

前端 未结 6 1911
我寻月下人不归
我寻月下人不归 2020-12-24 06:08

I have a database \"TEST\", to which I connect at address 123.45.67.89:1521.

How do I connect to it using PL/SQL Developer?

6条回答
  •  遥遥无期
    2020-12-24 06:45

    I would recommend creating a TNSNAMES.ORA file. From your Oracle Client install directory, navigate to NETWORK\ADMIN. You may already have a file called TNSNAMES.ORA, if so edit it, else create it using your favorite text editor.

    Next, simply add an entry like this:

    MYDB =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 123.45.67.89)(PORT = 1521))
        (CONNECT_DATA = (SID = TEST)(SERVER = DEDICATED))
      )
    

    You can change MYDB to whatever you like, this is the identifier that applications will will use to find the database using the info from TNSNAMES.

    Finally, login with MYDB as your database in PL/SQL Developer. It should automatically find the connection string in the TNSNAMES.ORA.

    If that does not work, hit Help->About then click the icon with an "i" in it in the upper-lefthand corner. The fourth tab is the "TNS Names" tab, check it to confirm that it is loading the proper TNSNAMES.ORA file. If it is not, you may have multiple Oracle installations on your computer, and you will need to find the one that is in use.

提交回复
热议问题