The goal of this extension is to simplify the ability to run scripts against your database connections. It works around the concept of having a config file in the root of your project with a list of all your connection details.
The extension is not currently published in the marketplace. To install, go to the releases within GitHub, and download the latest odb-task-*.vsix file. Then from the command line run the following:
code --install-extension odb-task-*.vsix
- Open your project
- Create a file in your project root named
.build-oracle.json
- Update the contents per the below example
- Reload Code just to make sure everything is detected
[
{
"targetName": "DEV",
"connectionString": "user/password@XE"
}
]
Open the command palette and type Compile with
. You will see two entries:
- Compile with SQL*Plus
- Compile with SQLcl
note: This extension doesn't ship with these binaries, so it assumes if you are running one or the other, the command is available on your system.
Choose the interpreter you wish to compile with.
You will prompted for which connection to compile against. Choose the connection name.
As mentioned, this extension depends on the binaries for SQL*Plus or SQLcl being available on your system. These default to sqlplus
and sql
respectively. If these are not within your Path, or have been renamed to something else, you can set an alternative path/name within settings.
Trent Schafer
MIT