wood burning stoves 2.0*
The moose likes JDBC and the fly likes Database newbie question about logging in Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Database newbie question about logging in" Watch "Database newbie question about logging in" New topic
Author

Database newbie question about logging in

Steli Niculescu
Greenhorn

Joined: Jul 14, 2009
Posts: 14
I have a task for an internship interview : a small JDBC application that uses an Oracle database. I have to send it to the interviewer to review it.
My code connects to my local testing Oracle XE database using user/pass "system"/"system" (that's the password i defined).

If I export the application into a JAR and send it, it will surely not work on the reviewer's machine because he probably has a different password
for the "system" user, and he will have to modify the code.

Is there a universal user (or something like this) for the Oracle database, for which i'm not required a password defined by me?

Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2491
    
    8

Is there a universal user (or something like this) for the Oracle database, for which i'm not required a password defined by me?
No - and I am quite happy about that. It would be a major security breach.
It is also not advisable to use the Oracle System user in your application.
SYSTEM is a privileged administration user



You have several options:

- Ask the interviewer what the name and password and connection details of his database will be
- Use a configuration file, and provide the interviewer with instructions on how to set the parameters
- Create a login form that requests for this info.


OCUP UML fundamental and ITIL foundation
youtube channel
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Database newbie question about logging in
 
Similar Threads
Need help with my first JDBC program
JDBC Connection
JDBC: What is the concrete class that implements the jdbc interfaces
Exception while connecting to an Oracle database
JDBC connection through a proxy