Sponsored Content
Top Forums Shell Programming and Scripting ISQL connectivity validation in script Post 302462164 by vikram3.r on Wednesday 13th of October 2010 12:06:40 PM
Old 10-13-2010
ISQL connectivity validation in script

Quote:
Originally Posted by vbe
Perhaps you could give us more.. in order to understand what puzzles you?

From the little bit of code you've given so far, what are we to assume? All the environment is set in the script?
What is this NULL from ISQL
(I know Im shortsighted with very bad eyesight but I'm trying my best so forgive me if its there...)
These are the things set within script
hostInfo=10.10.100.10:2000
serverName=myServer
dbName=myDB
userName=dbuser
passWord=dbPwd

I execute the mentioned isql snippet in dev server, and getting rowcount properly assigned to the script variable.

whereas if i execute the same snippet in the test server and getting the below error.

CS-LIBRARY error: ct_init(): network packet layer: internal net library error: Attempt to load protocol driver failed Attempting to obtain a localized error message failed.

what are all the configuration parameters i need to verify among those 2 servers..??


 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

isql in shell script help

Hello all... i'm trying to execute a shell script through crontab. To run at 8pm on wednesday's The crontab entry: 00 20 * * 3 /u2/dir1/dir2/jobs/p.sh the p.sh file: isql -s claims /u2/dir1/dir3/dir4/a.sql permissions for it are -rwxrwx--x i've confirmed a.sql is in that directory. ... (2 Replies)
Discussion started by: mrviking
2 Replies

2. Shell Programming and Scripting

isql query in unix shell script

Dear all I want to execute some isql command from unix shell script. Kindly suggest me. isql command mention below. isql -U -P use gdb_1 go select count (*) from table_x go (3 Replies)
Discussion started by: jaydeep_sadaria
3 Replies

3. UNIX for Advanced & Expert Users

SSH Connectivity script

Hi all, I have developed a script to list out the servers that is not able to connect to the remote host. The problem with this script is it, if the remote server ask for a password it gets struck there. It works only if the server name is invalid Ex: Lets say ssh -q test@test "exit" <... (5 Replies)
Discussion started by: lorcan
5 Replies

4. Shell Programming and Scripting

Script to check connectivity

I want to write a script to check if a unix box say abc.tdc.cin.net can be connected or not on certain port say 22. right know i have to telnet them manually from DOS prompt and if it is successful then isay it is connected. Also to check Database connectivity I am using tnsping From DOS prompt.... (3 Replies)
Discussion started by: kukretiabhi13
3 Replies

5. Shell Programming and Scripting

ISQL Shell Script Question

I am trying to run the following Sybase SQL query in a shell script file. It isn't working although everything else in the file runs, and I can run queries from a file fine. For some reason, entering the query directly doesn't work. Any ideas? #!/bin/sh $SYBASE/$SYBASE_OCS/bin/isql -e... (2 Replies)
Discussion started by: andy_h
2 Replies

6. Shell Programming and Scripting

isql out in shell script

Hi I wrote a script for connecting isql(Sybase database) and stored the SQL output in Unix box. my script: isql -U${USER} -P${PASS} -S${SERVER} <<EOF > $WORK_DIR/out1.log go select convert(varchar(10),sdcurrent,101) from pr_sysdate go exit EOF Unfortunately, the output file not... (5 Replies)
Discussion started by: koti_rama
5 Replies

7. Shell Programming and Scripting

Help With isql in shell script

Hello I am not able to get the isql output to temp_res file ... i have tried all the different combinations as shown below, but could not get anywhere .... Please Help isql -S $serv_name -U $usr_name -P $pswd -D $db_name -o temp_res << EOF1 select status from modset where... (1 Reply)
Discussion started by: gkrish
1 Replies

8. Shell Programming and Scripting

Need Help with isql in Shell Script

Hi Guys, I need help with my code. I am not able to find what the error is (tried debugging and everything). #! /bin/sh # MODSET_CLOSE # Usage: modset_close echo "Enter the Type of Modsets that needs to be Closed: " read mod_typ serv_name=`cat $mod_typ | awk '{ print $1 }'`... (5 Replies)
Discussion started by: gkrish
5 Replies

9. Shell Programming and Scripting

Isql syntax error in UNIX script

Hello Everyone, Coming again for your help to solve the below error: In a script, i had created a temp table (Temp_table) and loaded the data in it using bcp command (performed successfully) and I wanted to move it to the preferred table (called Main_table) for further use. hence I have added... (1 Reply)
Discussion started by: Suresh
1 Replies
exit(1)                                                            User Commands                                                           exit(1)

NAME
exit, return, goto - shell built-in functions to enable the execution of the shell to advance beyond its sequence of steps SYNOPSIS
sh exit [n] return [n] csh exit [ ( expr )] goto label ksh *exit [n] *return [n] DESCRIPTION
sh exit will cause the calling shell or shell script to exit with the exit status specified by n. If n is omitted the exit status is that of the last command executed (an EOF will also cause the shell to exit.) return causes a function to exit with the return value specified by n. If n is omitted, the return status is that of the last command exe- cuted. csh exit will cause the calling shell or shell script to exit, either with the value of the status variable or with the value specified by the expression expr. The goto built-in uses a specified label as a search string amongst commands. The shell rewinds its input as much as possible and searches for a line of the form label: possibly preceded by space or tab characters. Execution continues after the indicated line. It is an error to jump to a label that occurs between a while or for built-in command and its corresponding end. ksh exit will cause the calling shell or shell script to exit with the exit status specified by n. The value will be the least significant 8 bits of the specified status. If n is omitted then the exit status is that of the last command executed. When exit occurs when executing a trap, the last command refers to the command that executed before the trap was invoked. An end-of-file will also cause the shell to exit except for a shell which has the ignoreeof option (See set below) turned on. return causes a shell function or '.' script to return to the invoking script with the return status specified by n. The value will be the least significant 8 bits of the specified status. If n is omitted then the return status is that of the last command executed. If return is invoked while not in a function or a '.' script, then it is the same as an exit. On this man page, ksh(1) commands that are preceded by one or two * (asterisks) are treated specially in the following ways: 1. Variable assignment lists preceding the command remain in effect when the command completes. 2. I/O redirections are processed after variable assignments. 3. Errors cause a script that contains them to abort. 4. Words, following a command preceded by ** that are in the format of a variable assignment, are expanded with the same rules as a vari- able assignment. This means that tilde substitution is performed after the = sign and word splitting and file name generation are not performed. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
break(1), csh(1), ksh(1), sh(1), attributes(5) SunOS 5.10 15 Apr 1994 exit(1)
All times are GMT -4. The time now is 11:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy