Sponsored Content
Contact Us Post Here to Contact Site Administrators and Moderators Calling Sybase Stored proc from UNIX Shellscript. Post 302990236 by Arun619 on Tuesday 24th of January 2017 03:13:25 AM
Old 01-24-2017
Calling Sybase Stored proc from UNIX Shellscript.

Hi, I am new to shell scripting and Sybase database i need a help that i try to execute a SYBASE stored procedure from a Unix shell script and wanna write the output of the SP into a Text File, somehow i tried to find a solution but when i try to run the script i am not getting the output file with the desired records. i have created the input file "test.sql" which executes the SP and all the server details and input output file details are in ".SH file" i have the Output file also in the same location. i tried to execute the SP in rapid sql and found that the SP works well.

Please correct me if i am wrong anywhere. and this is an Urgent requirement.

.SH FILE :
#!/bin/ksh -x

isql -S${Servername} -D${Database name } -I$ test.Sql -O$ Outfile.OUT -U${username} -P${password}

INPUT FILE: test.sql

use BenefitDB
go

exec Sample_SP
go
 

10 More Discussions You Might Find Interesting

1. Solaris

Calling Oracle Stored Procedures in UNIx(sun solaris)

I have created 3 Procedures all similar to this one: I then created 3 shell sripts which will call the sql? finally created a calling script to call the procedure. I am a bit unsure how to this all works, can someone check my code and I am doing this right? Also could I add my procedure (first... (0 Replies)
Discussion started by: etravels
0 Replies

2. Shell Programming and Scripting

Calling an Oracle Stored Procedure from Unix shell script

hai, can anybody say how to call or to execute an oracle stored procedure in oracle from unix... thanks in advance.... for ur reply.... by, leo (2 Replies)
Discussion started by: Leojhose
2 Replies

3. UNIX for Dummies Questions & Answers

Executing Stored Proc from unic prompt.

Hi All, Want to know if is it possible to run / execute any stored procedures (sybase) from unix command prompt.? Thanks for your help in Advance. Regards, Arvind S. (0 Replies)
Discussion started by: Arvind_temp
0 Replies

4. UNIX for Advanced & Expert Users

Executing Stored Proc from unix prompt.

Hi All, I want to run/execute a stored procedure (sybase) from unix command prompt not by login in isql utility which is provided my Sybase guys. Is there way ..? Thanks in advance for your help !!! Regards, Arvind S. (0 Replies)
Discussion started by: arvindcgi
0 Replies

5. Shell Programming and Scripting

Executing Shell Script from Within a Sybase Stored Proc

Greetings, I need to make an open server call to a shell script from inside a Sybase Stored procedure. Coul any one please provide a sample code? TIA (0 Replies)
Discussion started by: rajpreetsidhu
0 Replies

6. Shell Programming and Scripting

Error when calling sybase stored proc from shell script

Hi, I am writing a script that needs to call a stored proc which would update a column in a table based on a condition. I need to also capture the number of rows updated. However, When I execute the script I keep getting this error: ./test_isql.sh: syntax error at line 33: `end of file'... (3 Replies)
Discussion started by: karthikk
3 Replies

7. UNIX for Dummies Questions & Answers

Calling stored procedure from unix

Hi, My stored procedure returns a value. How to retrieve the value and display in unix. Stored procedure CREATE OR REPLACE PROCEDURE gohan(num INT) IS BEGIN DBMS_OUTPUT.PUT_LINE('My lucky number is ' || num); END; Unix Scripting i used sqlplus -s... (7 Replies)
Discussion started by: gohan3376
7 Replies

8. Shell Programming and Scripting

PL/SQL stored proc from ksh just inserts thumb and does nothing

Greeting everyone. Ok, I have spent the past few days googling for this and I keep hitting a wall. Many results brought me here, but the solutions were not quite right for this. Basically my script (ksh) is run with an arg for a csv. My script so far appears to be storing the values from my... (4 Replies)
Discussion started by: dezdiggler
4 Replies

9. How to Post in the The UNIX and Linux Forums

Calling a Sybase Stored procedure from a UNIX Script

Hi, I am new to shell scripting and Sybase database i need a help that i try to execute a SYBASE stored procedure from a Unix shell script and wanna write the output of the SP into a Text File.somehow i try to find a solution but whwn i try to run the script i am not getting the output file with... (1 Reply)
Discussion started by: Arun619
1 Replies

10. Shell Programming and Scripting

Sybase Stored Proc call from UNIX script.

Hi, I am new to shell scripting and Sybase database i need a help that i try to execute a SYBASE stored procedure from a Unix shell script and wanna write the output of the SP into a Text File.somehow i try to find a solution but whwn i try to run the script i am not getting the output file with... (1 Reply)
Discussion started by: Arun619
1 Replies
DBIx::Class::Storage::DBI::Sybase::ASE::NoBindVars(3)	User Contributed Perl Documentation  DBIx::Class::Storage::DBI::Sybase::ASE::NoBindVars(3)

NAME
DBIx::Class::Storage::DBI::Sybase::ASE::NoBindVars - Storage::DBI subclass for Sybase ASE without placeholder support DESCRIPTION
If you're using this driver then your version of Sybase or the libraries you use to connect to it do not support placeholders. You can also enable this driver explicitly using: my $schema = SchemaClass->clone; $schema->storage_type('::DBI::Sybase::ASE::NoBindVars'); $schema->connect($dsn, $user, $pass, \%opts); See the discussion in "Using ? Placeholders & bind parameters to $sth->execute" in DBD::Sybase for details on the pros and cons of using placeholders. One advantage of not using placeholders is that "select @@identity" will work for obtaining the last insert id of an "IDENTITY" column, instead of having to do "select max(col)" in a transaction as the base Sybase driver does. When using this driver, bind variables will be interpolated (properly quoted of course) into the SQL query itself, without using placeholders. The caching of prepared statements is also explicitly disabled, as the interpolation renders it useless. AUTHORS
See "CONTRIBUTORS" in DBIx::Class. LICENSE
You may distribute this code under the same terms as Perl itself. perl v5.18.2 2013-12-16 DBIx::Class::Storage::DBI::Sybase::ASE::NoBindVars(3)
All times are GMT -4. The time now is 03:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy