01-24-2017
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
This is a very starnge problem I am having. I have a shell script that calls a stored procedure.
Here's my code in shell script:
sqlplus "userid/pwd" @file.sql
and file.sql has the following statement:
exec my_storedProc;
Now, when I execute my shell script, nothing... (2 Replies)
Discussion started by: priyamurthy2005
2 Replies
2. Shell Programming and Scripting
Hi,
Can anyone help me with the correct syntax to call a MYSQL stored procedure from a shell script.
I have tried the following, (no input params):
/usr/bin/mysql -uadmin -ppassword call TL_CLENSEDATA();
resulting in error:
/home/hosting/data/scripts/dbclense.sh: line 12: syntax error... (3 Replies)
Discussion started by: kshelluser
3 Replies
3. Shell Programming and Scripting
HI,
I have a similar problem to thread 18264, only I couldn't get it to work.
https://www.unix.com/showthread.php?t=18264
I have a stored procedure which is called by a shell script program. When I run the stored procedure alone or through the shell script, it works fine with output text... (3 Replies)
Discussion started by: dorisw
3 Replies
4. Shell Programming and Scripting
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
5. Shell Programming and Scripting
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
6. UNIX for Dummies Questions & Answers
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
7. Shell Programming and Scripting
Hi,
I have a sybase stored procedure which takes two input parameters (start_date and end_date) and when it get executed, it gives few records as an output.
I want to write a unix script (ksh) which login to the sybase database, then execute this stored procedure (takes the input parameter as... (8 Replies)
Discussion started by: amit.mathur08
8 Replies
8. Shell Programming and Scripting
Friends,
I'm newbie with ksh so wanting some help....
1. I'm trying to call oracle stored procedure from ksh script by taking variable value from runtime, feed into script and execute procedure.
2. Put name1 and name2 value from script run replacing $3 & $4
I'm trying to put name1 in... (4 Replies)
Discussion started by: homer4all
4 Replies
9. Post Here to Contact Site Administrators and Moderators
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... (1 Reply)
Discussion started by: Arun619
1 Replies
10. Shell Programming and Scripting
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
LEARN ABOUT PHP
sybase_unbuffered_query
SYBASE_UNBUFFERED_QUERY(3) SYBASE_UNBUFFERED_QUERY(3)
sybase_unbuffered_query - Send a Sybase query and do not block
SYNOPSIS
resource sybase_unbuffered_query (string $query, resource $link_identifier, [bool $store_result])
DESCRIPTION
sybase_unbuffered_query(3) sends a query to the currently active database on the server that's associated with the specified link identi-
fier. If the link identifier isn't specified, the last opened link is assumed. If no link is open, the function tries to establish a link
as if sybase_connect(3) was called, and use it.
Unlike sybase_query(3), sybase_unbuffered_query(3) reads only the first row of the result set. sybase_fetch_array(3) and similar function
read more rows as needed. sybase_data_seek(3) reads up to the target row. The behavior may produce better performance for large result
sets.
sybase_num_rows(3) will only return the correct number of rows if all result sets have been read. To Sybase, the number of rows is not
known and is therefore computed by the client implementation.
Note
If you don't read all of the resultsets prior to executing the next query, PHP will raise a warning and cancel all of the pending
results. To get rid of this, use sybase_free_result(3) which will cancel pending results of an unbuffered query.
PARAMETERS
o $query
-
o $link_identifier
-
o $store_result
- The optional $store_result can be FALSE to indicate the resultsets shouldn't be fetched into memory, thus minimizing memory
usage which is particularly interesting with very large resultsets.
RETURN VALUES
Returns a positive Sybase result identifier on success, or FALSE on error.
EXAMPLES
Example #1
sybase_unbuffered_query(3) example
<?php
$dbh = sybase_connect('SYBASE', '', '');
$q = sybase_unbuffered_query('select firstname, lastname from huge_table', $dbh, false);
sybase_data_seek($q, 10000);
$i = 0;
while ($row = sybase_fetch_row($q)) {
echo $row[0], ' ', $row[1], '<br />';
if ($i++ > 40000) {
break;
}
}
sybase_free_result($q);
sybase_close($dbh);
?>
NOTES
Note
This function is only available when using the CT library interface to Sybase, and not with the DB library.
SEE ALSO
sybase_query(3).
PHP Documentation Group SYBASE_UNBUFFERED_QUERY(3)