DBMS_OUTPUT.PUT_LINE doesn't print values in shell script
Hello,
I'm trying to print the value of my cursor in the dbms_output.put_line in shell script, but it only shows "PL/SQL procedure successfully completed." nothing else. I have set serveroutput on,
Below is my script : Any advise would be really helpful.
Regards,
Chiranjit
--- Post updated at 12:34 PM ---
I have now able to print the values, however it is only printing the first value where i am selecting first 20 rows in the cursor.
Is there a way to print all the values ?
Thanks,
Chiranjit
Last edited by mail.chiranjit; 09-18-2019 at 02:39 AM..
I have the following crontab entry to run a shell script for every 30 minutes of every day:
30 * * * * $HOME/main.sh > $HOME/main.log 2>$HOME/error.log
after I created the crontab file I have also done:
$crontab my_crontab
I also check to make sure it exists, by using the following... (11 Replies)
Hi,
I have created a pl/sql block utilises dbms_output.put_line. This script works fine when I call from sqlplus ie sqlplus @./scriptname but when I embed it within my shell script I get no output to screen so I end up with an empty spool file. I know it's executing successfully when called from... (6 Replies)
Dear All,
As I'm new here, please forgive me if any rule violation occurred.
I have a script like this:
#! /bin/ksh
# Author : Saptarshi
# Date : 18-Mar-2011
# Version : 1.0
Return_op=`sqlplus -s <<ENDOFSQL
db_user/db_pass@db_nm
WHENEVER SQLERROR EXIT 1
set ... (1 Reply)
Hi All,
I Have written a script through that i am calling sql file
Sqlfile.sql
set time on
set timing on
set echo on
set head off
set scan on
set feedback on
set serveroutput on
set linesize 1000
DECLARE
v_acc_no NUMBER(10);
v_product_no NUMBER(10);
BEGIN... (3 Replies)
Hi,
I need a shell script, which would search the result values from another files.
1)execute " select column1 from table_name" query on the table.
2)Based on the result, need to be grep from .wft files.
could please explain about this.Below is the way i am using.
#!/bin/sh... (4 Replies)
Hi Gurus,
I have below sample script. I expect it print error when running script without input parameter. but the it doesn't.
would you please help me about this issue.
thanks in advance.
/script$cat test.ksh
#!/bin/ksh
while getopts :f: arg
do
case $arg in
... (4 Replies)
hi guys, i want help... Reding XML file and print the values into the text file using linux shell script file as per below xml file
<sequence>
<Filename>aldorzum.doc</Filename>
<DivisionCode>US</DivisionCode>
<ContentType>Template</ContentType>
<ProductCode>VIMZIM</ProductCode>
</sequence>... (1 Reply)
Hello,
I have a simple shell script, which starts from crontab like this:
00 03 * * 2-6 /export/applications/dte/sh/fwmarg.sh > /export/applications/dte/data/cron_log/fwmarg.cronlog.`date +\%m.\%d` 2>&1
The script doesn't get any argument. But inside it I see the line
... (10 Replies)
Discussion started by: digioleg54
10 Replies
LEARN ABOUT NETBSD
rollback_to_savepoint
ROLLBACK TO SAVEPOINT(7) SQL Commands ROLLBACK TO SAVEPOINT(7)NAME
ROLLBACK TO SAVEPOINT - roll back to a savepoint
SYNOPSIS
ROLLBACK [ WORK | TRANSACTION ] TO [ SAVEPOINT ] savepoint_name
DESCRIPTION
Roll back all commands that were executed after the savepoint was established. The savepoint remains valid and can be rolled back to again
later, if needed.
ROLLBACK TO SAVEPOINT implicitly destroys all savepoints that were established after the named savepoint.
PARAMETERS
savepoint_name
The savepoint to roll back to.
NOTES
Use RELEASE SAVEPOINT [release_savepoint(7)] to destroy a savepoint without discarding the effects of commands executed after it was estab-
lished.
Specifying a savepoint name that has not been established is an error.
Cursors have somewhat non-transactional behavior with respect to savepoints. Any cursor that is opened inside a savepoint will be closed
when the savepoint is rolled back. If a previously opened cursor is affected by a FETCH command inside a savepoint that is later rolled
back, the cursor position remains at the position that FETCH left it pointing to (that is, FETCH is not rolled back). Closing a cursor is
not undone by rolling back, either. A cursor whose execution causes a transaction to abort is put in a cannot-execute state, so while the
transaction can be restored using ROLLBACK TO SAVEPOINT, the cursor can no longer be used.
EXAMPLES
To undo the effects of the commands executed after my_savepoint was established:
ROLLBACK TO SAVEPOINT my_savepoint;
Cursor positions are not affected by savepoint rollback:
BEGIN;
DECLARE foo CURSOR FOR SELECT 1 UNION SELECT 2;
SAVEPOINT foo;
FETCH 1 FROM foo;
?column?
----------
1
ROLLBACK TO SAVEPOINT foo;
FETCH 1 FROM foo;
?column?
----------
2
COMMIT;
COMPATIBILITY
The SQL standard specifies that the key word SAVEPOINT is mandatory, but PostgreSQL and Oracle allow it to be omitted. SQL allows only
WORK, not TRANSACTION, as a noise word after ROLLBACK. Also, SQL has an optional clause AND [ NO ] CHAIN which is not currently supported
by PostgreSQL. Otherwise, this command conforms to the SQL standard.
SEE ALSO
BEGIN [begin(7)], COMMIT [commit(7)], RELEASE SAVEPOINT [release_savepoint(7)], ROLLBACK [rollback(7)], SAVEPOINT [savepoint(7)]
SQL - Language Statements 2010-05-14 ROLLBACK TO SAVEPOINT(7)