Sponsored Content
Full Discussion: isql out in shell script
Top Forums Shell Programming and Scripting isql out in shell script Post 302398691 by koti_rama on Thursday 25th of February 2010 09:45:22 AM
Old 02-25-2010
Yes... the isql has been connecting to Database... but not executing next commands.
Code:
Code:
USER="xyz"
PASS="abc"
SERVER="SCCS"
DB="blue"
WORK_DIR="/usr/home/genesys/Sayantan/ramakrishna"
set -x
	isql -U${USER} -P${PASS} -S${SERVER}<<EOF
	go
	sp_help NBEventLog	
	go
	exit
	EOF


Out put: 

+ isql -Uxyz -Pabc -SSCCS
+ 0< /var/tmp/sh14880.1
Msg 2409, Level 11, State 2:
Cannot find the requested character set in Syscharsets:  name = 'roman8'.
No conversions will be done.

I hope the isql not able recognize the EOF(stdin) in script.Please help me.
The Cannot find message are expecting in my isql.
 

10 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 Dummies Questions & Answers

Using isql in korn shell

Hi all, I have two accounts in a Unix server, the first one uses .tcsh as default shell and the other uses .ksh (korn shell) as default. When I login using the account with .tcsh default, I can use the isql command and connect to our database server. However, when I use the other... (2 Replies)
Discussion started by: risk_sly
2 Replies

4. 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

5. Shell Programming and Scripting

Passing Shell Variables in ISQL

Hi.. I am passing a variable in my shell function. I need to access it for an isql comand in the shell script. However the isql o/p gives no results if i pass a variable in the command. The isql command works perfectly fine if i hardcore the table name. My script is : ... (0 Replies)
Discussion started by: dikki
0 Replies

6. Shell Programming and Scripting

passing database password to isql command in shell script

Hi, I need to connect to DB through my shell script. but I dont want to hardcode my db password in the script. Is there a way to do it? Thanks ---------- Post updated at 07:42 PM ---------- Previous update was at 04:54 PM ---------- :(Guys..please help me with this:( (1 Reply)
Discussion started by: agrawal.prachi
1 Replies

7. UNIX for Dummies Questions & Answers

how to use shell variable in isql

Hi , I want to use shell variable in isql. example.. $ksh ./sudh.ksh "2041qwer" sudh.ksh is my script passing the perameter "2041qwer" Code in my script : =========== $SYBASE/$SYBASE_OCS/bin/isql -I$SYBASE/interfaces -S$OTHRSRVR -U$SYBUSER -P$SYBPASS -w... (1 Reply)
Discussion started by: sudhakarpasala
1 Replies

8. 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

9. 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

10. Shell Programming and Scripting

Using Isql for SQL SERVER to get the table rows counts in UNIX shell script to

need to create shell script to read the table's name from file and connect SQL SERVER using isql (odbcunix) i 'm able connect to database with below command line syntex but i could not get working in shell script with SQL and storing the row count in variable. isql -v DSN USERNAME PASSWD ... (6 Replies)
Discussion started by: pimmit22043
6 Replies
CREATE USER 
MAPPING(7) SQL Commands CREATE USER MAPPING(7) NAME
CREATE USER MAPPING - define a new mapping of a user to a foreign server SYNOPSIS
CREATE USER MAPPING FOR { username | USER | CURRENT_USER | PUBLIC } SERVER servername [ OPTIONS ( option 'value' [ , ... ] ) ] DESCRIPTION
CREATE USER MAPPING defines a mapping of a user to a foreign server. A user mapping typically encapsulates connection information that a foreign-data wrapper uses together with the information encapsulated be a foreign server to access an external data resource. The owner of a foreign server can create user mappings for that server for any user. Also, a user can create a user mapping for his own user name if USAGE privilege on the server has been granted to the user. PARAMETERS
username The name of an existing user that is mapped to foreign server. CURRENT_USER and USER match the name of the current user. When PUB- LIC is specified, a so-called public mapping is created that is used when no user-specific mapping is applicable. servername The name of an existing server for which the user mapping is to be created. OPTIONS ( option 'value' [, ... ] ) This clause specifies the options of the user mapping. The options typically define the actual user name and password of the map- ping. Option names must be unique. The allowed option names and values are specific to the server's foreign-data wrapper. EXAMPLES
Create a user mapping for user bob, server foo: CREATE USER MAPPING FOR bob SERVER foo OPTIONS (user 'bob', password 'secret'); COMPATIBILITY
CREATE USER MAPPING conforms to ISO/IEC 9075-9 (SQL/MED). SEE ALSO
ALTER USER MAPPING [alter_user_mapping(7)], DROP USER MAPPING [drop_user_mapping(7)], CREATE FOREIGN DATA WRAPPER [create_for- eign_data_wrapper(7)], CREATE SERVER [create_server(7)] SQL - Language Statements 2010-05-14 CREATE USER MAPPING(7)
All times are GMT -4. The time now is 10:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy