Home > Java, Oracle > oracle with netbeans ide…..

oracle with netbeans ide…..

somedays ago one of my friends just ask me that did i know how to connect oracle with netbeans ide?I said yes i know.And i have told some about it and i think that will help him,and also i think why don’t i share this topic in my blog,then the others can know it too.So here it goes..

open your ide. then you will see like this

1

go to databases, then right click on it.
and go to “new connection”

2

after that

3

in the name field select  “new driver”

4

now you will see something like this:

5

now click on add button and give it the location of  your oracle driver file
for mine it was:
…oracle/product/10.1.0/db_2/jdbc/lib/ojdbc14.jar
after adding this jar file your netbeans will automatically do the rest of the work for you.
Now Driver class:oracle.jdbc.OracleDriver
then look at your database url,it will be look like
“jdbc:oracle:*1:*2:*3:*4”

Now in no.
*1:
try first giving
oci8
if it don’t work with your driver then try
thin
*2:
@localhost
*3:
port number of your server
if you don’t know in which port is your server is active
then see java-oracle
tutorial.After getting the port number write it to in “*3”
*4:
in here you have to put session id[SID] from server.If you don’t know the [SID] then you can get it by following above tutorial

For me it was..
“jdbc:oracle:thin:@localhost:1521:orcl”

Now you have to give the username and password,for which user do you want to connect.
[remember the username and password is for ur database user
e.g like “system”,”manager” is a user ]
for me i have another user ‘saiful103a’ beside system so i give
user:saiful103a
pass:saiful103a
now connect with ur given username
and see the power of netbeans over oracle..
connect

And that’s it

And HAVE A GOOD PROGRAMMING

Advertisements
Categories: Java, Oracle
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: