Forum Stats

  • 3,824,908 Users
  • 2,260,438 Discussions
  • 7,896,343 Comments

Discussions

VS Code Connecting to DB Built in Oracle XE 11.2

Hello,

I am taking an Oracle/SQL course in college. We are using Oracle XE 11.2 and SQLdeveloper64. I wanted to set up VS Code and start playing around with SQL in there but I am having a hard time connecting to the database.

Can VS Code connect to the workshop in Oracle XE?

Would the hostname be localhost?

Service name? Is that Oracle?

Any advice/help would be greatly appreciated.

Thank you


Answers

  • In the next release we will be including a help page linked to from the connection dialog for new users who are just starting out with Oracle.

    As you would have been the target audience for this page, I would appreciate it if you could share what information would have helped you the most when connecting to Oracle for the first time.

  • User_EOKUJ
    User_EOKUJ Member Posts: 2 Green Ribbon
    edited Jun 9, 2022 5:40PM

    When connecting to a database in VS Code I found that using Oracle Explorer is easier than hitting F1 and selecting Oracle: Connect. When I did that I received an error message stating that an extension couldn't be found and that an undefined reading document could not be read.

    To find Oracle Explorer you will look for a cylinder with three sections on the left side of the window. Select that. Then hover over database.

    A plus sign will show up. Click that. Choose connection type Basic. Add localhost to Database hostname. For APEX at XE to Service name. Enter your username and password for the database.


    Now you can create the connection and run queries (and so much more) right out of VS Code. Pretty cool, right?