checking sql connectivity in unix


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting checking sql connectivity in unix
# 1  
Old 07-01-2008
checking sql connectivity in unix

hi,

i am using a sqlplus connection in one of my shell scripts. i want to check if the connection is set properly or not.. can i use '$?' to check the status of the sql connectivity..? or is there any other option to do that..?

thanks,
# 2  
Old 07-02-2008
Have you tried using $?? I believe it should work.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Checking SQL DB Availability

Hello everybody. I have a little question. Im creating a script for checking the status of different servers, and everything is running fine except for one thing. I have to check if certain DBs are connectables, I dont care anything else, nor running querys nor updating tables, the only thing I... (4 Replies)
Discussion started by: SeaSoul
4 Replies

2. Programming

Dynamically checking rules in database tables using SQL

I want to check for rows in a table where all values (except the key) is empty. I am using MySQL 5.5. I plan to do this mechanically, so the approach should work for any table in my database schema. Suppose for illustration purposes I start with the following table: CREATE TABLE `sources` ( ... (4 Replies)
Discussion started by: figaro
4 Replies

3. Windows & DOS: Issues & Discussions

Help with Windows to Unix connectivity

Hi Can we pass the parameter from the excel in windows and invoke the unix shell script from excel VBA by passing this parameter and get the results of shell script to the excel sheet? We tried to get the things in unix independently but we still strucked in connecting the excel to... (5 Replies)
Discussion started by: bikky6
5 Replies

4. Shell Programming and Scripting

Teradata connectivity through UNIX by use bteq

Hi, I want a script for connecting teradata to load the file to teradata table. Can you please help me out. Thanks in advance. (1 Reply)
Discussion started by: victory
1 Replies

5. Shell Programming and Scripting

Database connectivity using unix

Hi, I am trying to connect to the database through Unix serer using following command- mysql -u root -Jepadt -D dtdatabase But it giving me error - mysql: unknown option '-J' Can anybody help me to solve this problm Thanks in advance Please use code tags, thanks. (2 Replies)
Discussion started by: pspriyanka
2 Replies

6. Programming

Checking columns in SQL, comparing user input and sizes.

I'm writing a KSH shell script that's using SQL though DB2. If I have a table defined and populated db2 "create table tb(num int,letter char(4))" db2 "insert into tb values(111,a) db2 "insert into tb values(112,b) db2 "insert into tb values(111,c) How can I check if a letter user... (0 Replies)
Discussion started by: busdude
0 Replies

7. UNIX for Dummies Questions & Answers

Execute PL/SQL function from Unix script (.sql file)

Hi guys, I am new on here, I have a function in oracle that returns a specific value: create or replace PACKAGE BODY "CTC_ASDGET_SCHED" AS FUNCTION FN_ASDSCHEDULE_GET RETURN VARCHAR2 AS BEGIN DECLARE ASDSchedule varchar2(6); ASDComplete... (1 Reply)
Discussion started by: reptile
1 Replies

8. Shell Programming and Scripting

Dos-Unix Connectivity

Hi, Is there any method to connect unix box(Excecuting unix commands through Batch Files) through DOS prompt. (1 Reply)
Discussion started by: shekhar_ssm
1 Replies

9. Shell Programming and Scripting

My sql connectivity

Hi myself rupesh, i want the mysql database connectivity and a simple shell script.. also if the links of books for shell programming (0 Replies)
Discussion started by: comp_rupesh
0 Replies
Login or Register to Ask a Question