Giter VIP home page Giter VIP logo

oracle-jdbc-tester's Introduction

oracle-jdbc-tester

Maven Build

A simple command line application to test JDBC connection to Oracle Database.

How to run

Clone this repository and then run below Maven command to build the executable JAR file.

mvn clean package

Alternatively, download the JAR file from release page.

Execute the JAR file with the following 3 parameters with schema name, password and JDBC connection string:

java -jar target/jdbc-tester-1.1.jar <schema_name> <schema_password> jdbc:oracle:thin:@//<host>:<port>/<SID>

Secure your credentials

When running this tool ad-hoc, a good security practice would be read the DB username and password into a variable by using read command in Linux (or similar) and then execute the JAR file.

This prevents DB credentials being stored in ~/.bash_history.

java -jar target/jdbc-tester-1.1.jar "$DB_USER" "$DB_PASS" jdbc:oracle:thin:@//<host>:<port>/<SID>

How it works

The application connects to the Oracle database and executes a single SQL query: select sysdate from dual and prints the output.

If it cannot connect for whatever reason, it will fail by logging an error message.

There is a hardcoded connection timeout set to 10 seconds.

License

(The MIT License)

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

oracle-jdbc-tester's People

Contributors

aimtiaz11 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

oracle-jdbc-tester's Issues

password handling

Hi, nice tool. Could you mask the password in the output, please? It would be even greater, if the tool asks for the password without showing it โ€“ instead of having the password as a command line argument.

log4j 1.2.17 and CVE-2019-17571

Just an FYI that this package contains a vulnerable version of log4j. It's not a huge showstopper for me as it's mainly a bit more convenient to use than instantclient, but if there is something else you have been using recently, any recommendation would be much appreciated. Thanks for your work on this project thus far.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.