using jdbc:thin in bash


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting using jdbc:thin in bash
# 1  
Old 01-17-2011
using jdbc:thin in bash

Hi

I want to include in my script a test for DB connection with jdbc:thin connection string(not using tnsnames.ora)

For example:
Code:
jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=ON)(FAILOVER=ON)(ADDRESS=(PROTOCOL=TCP)(HOST=dsu1a)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=ODS)(FAILOVER_MODE=(TYPE=SESSION)(METHOD=BASIC)(RETRIES=20)(DELAY=5))))

Thanks

Last edited by Franklin52; 01-17-2011 at 04:30 AM.. Reason: Please use code tags
# 2  
Old 01-17-2011
Quote:
Originally Posted by gdan2000
Hi

I want to include in my script a test for DB connection with jdbc:thin connection string(not using tnsnames.ora)

For example:
jdbcSmilieracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=ON)(FAILOVER=ON)(ADDRESS=(PROTOCOL=TCP)(H OST=dsu1a)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=ODS)(FAILOVER_MODE=(TYPE=SESSIO N)(METHOD=BASIC)(RETRIES=20)(DELAY=5))))

Thanks
Cool! So what's the question ?

tyler_durden
# 3  
Old 01-17-2011
the question is how I can implement it in bash script...
# 4  
Old 01-17-2011
Quote:
Originally Posted by gdan2000
the question is how I can implement it in bash script...
Well, that's a JDBC url, so it would be understood only by the Java compiler i.e. in a Java program. You could also use that syntax in languages that are bytecode-compatible with Java e.g. Scala, Groovy etc.

Bash shell does not fall in any of those categories, so you cannot *implement* it in Bash script per se, but you can write a Bash script that calls a compiled Java class that uses the JDBC syntax.

tyler_durden
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Linux

Converct fat pc to thin client

I have old pc with 1gb ram and i wont to convert him to thin clint to connect rdp windos With software i need to install on my computer? I am new in linux.. Sent from my SM-J5108 using Tapatalk (10 Replies)
Discussion started by: popcoern
10 Replies

2. AIX

Thin clients for AIX desktop

Hello, I've been on Sun gear for years, using Sun Rays. With the news that Sun Ray is to be discontinued, I've taken an interest in researching other thin client solutions. I'm interested in using the thin clients on Solaris/SPARC, but also in future, quite possibly on AIX. So, what simple thin... (8 Replies)
Discussion started by: thegman
8 Replies

3. Ubuntu

JDBC Connection

Hi, I am using ubuntu os.I need some information about JDBC connection. 1.how to connect eclipse with apache tomcat server 2.I am using mysql database,how to to find the database location 3.How to set the classpath 4.How to connect Mysql with java using eclipse.I need step by step procedure... (1 Reply)
Discussion started by: snallusami
1 Replies

4. Shell Programming and Scripting

Unix to Sql Server via JDBC

I am trying to connect SQL SERVER VIA JDCB. Following is something I tried and will appreciate any help what I am doing wrong Here's what I did, I tried several variations, but I keep getting this error: Exception in thread "main" java.sql.SQLException: Unable to connect. Invalid URL I... (1 Reply)
Discussion started by: cqldba
1 Replies

5. Linux

BOOTP on HP Thin clients

Please m new around here! Can anyone take me thru implementing bootp on my thin clients via my central server? Preciate ur assistance. Thanks folks! (2 Replies)
Discussion started by: chuk_uka
2 Replies

6. SuSE

postgresql-jdbc on Suse

Hi, I am writing a Java Swing application and want to add Embedded SQL to it. The application should interact with a PostgreSQL database running on my local machine. The compiler complains that it cannot find the org.postgresql package included in the code. I'm guessing the problem is that... (0 Replies)
Discussion started by: marina
0 Replies

7. SCO

Please help.Thin clients connecting to SCO.

Hi thank you for your help in advance, I am running SCO 5.0.6 with 75 user license And I have thin clients connected (around 50 no.) to it through a terminal server.The problem is that when the thin clients are terminated abnormally it takes a lot of time for me to conect to the SERVER again and... (1 Reply)
Discussion started by: Chaitu.a
1 Replies

8. Linux

configuring same /bash for 4 computer which is thin client

i m doing project on LAN TELEPHONY in Red Hat linux i have files as datbase to store the user name and passeord an all other information. Now i have thin client at my college. so to access /dev/dsp for audio is not possible on server. So i have written code which run on /base since it has... (0 Replies)
Discussion started by: niravuchat
0 Replies
Login or Register to Ask a Question