How to test an jdbc connection in sqlplus?

Hi experts:

A programmer told me to test this in sqlplus and I don't know how to test it:

jdbc:oracle:thin:@192.168.112.223:1521:SCSD1.

And this one:  "jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on)(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.112.223)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.112.224)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=SCSD_RAC)))"


Scsd1 is one of the instance from a two node Oracle Rac version 10.2.0.3
Scsd_rac is the service name of the ORacle Rac version 10.2.0.3

My tnsnames.ora is working and have the following entries for Scsd1 and scsd_rac:

SCSD1 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.112.223)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SID = SCSD1)
    )
  )

SCSD_RAC =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = hpscs1-vip1)(PORT = 1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = hpscs2-vip1)(PORT = 1521))
      (LOAD_BALANCE = yes)
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = SCSD_RAC)
      (FAILOVER_MODE =
        (TYPE = SELECT)
        (METHOD = BASIC)
        (RETRIES = 180)
        (DELAY = 5)
      )
    )
  )
LVL 8
LindaCAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

JPrzybyszewskiCommented:
I would say that it's enough if you just establish a connection to the database using SQLPLUS using SCSD_RAC service name.
Alternatively you can try to connect as following:

sqlplus user/password@"(DESCRIPTION=(LOAD_BALANCE=on)(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.112.223)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.112.224)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=SCSD_RAC)))"

This should also work.

Cheers,
Jarek
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sdstuberCommented:
you can't test the jdbc with sqlplus itself.  You could create a java stored procedure that does a jdbc connection and then invoke that with sqlplus
0
LindaCAuthor Commented:
Thank you Jarek and sdstuber.

Jarek's connection worked.  So I will tell the Programmer to test this.
 
0
LindaCAuthor Commented:
Thank you.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.