473,387 Members | 1,721 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to return a status from sqlplus to .ksh unix script ?

I have a script a.ksh as follow:

[vashti]<orasp> cat a.ksh
sqlplus -s rsi/rsi < aaa1.sql
echo stat $?
[vashti]<orasp>

text of aaa1.sql:

exec dbms_stats.gather_table_stats
('P0E1A00','MI_AC_CIRBE_GEN',cascade=>true,estimat e_percent=>25);

Problem: how can i transfer the status of the execution of
dbms_stats.gather_table_stats to the .ksh ????
Jul 19 '05 #1
2 14853
zg*******@il.bphx.com (Zvika Glickman) wrote in message news:<b6**************************@posting.google. com>...
I have a script a.ksh as follow:

[vashti]<orasp> cat a.ksh
sqlplus -s rsi/rsi < aaa1.sql
echo stat $?
[vashti]<orasp>

text of aaa1.sql:

exec dbms_stats.gather_table_stats
('P0E1A00','MI_AC_CIRBE_GEN',cascade=>true,estimat e_percent=>25);

Problem: how can i transfer the status of the execution of
dbms_stats.gather_table_stats to the .ksh ????


Z, look up the SQLPlus command "whenever sqlerror exit FAILURE"

Many times all you need to pass back to the shell is success or
failure. For the exact problem you can look at the spool file.

In the case of a dmbs_stats I would generally not expect a failure
message.

HTH -- Mark D Powell --
Jul 19 '05 #2
zg*******@il.bphx.com (Zvika Glickman) wrote in message news:<b6**************************@posting.google. com>...
I have a script a.ksh as follow:

[vashti]<orasp> cat a.ksh
sqlplus -s rsi/rsi < aaa1.sql
echo stat $?
[vashti]<orasp>

text of aaa1.sql:

exec dbms_stats.gather_table_stats
('P0E1A00','MI_AC_CIRBE_GEN',cascade=>true,estimat e_percent=>25);

Problem: how can i transfer the status of the execution of
dbms_stats.gather_table_stats to the .ksh ????


Thanks mark,
I used:
whenever sqlerror exit sql.sqlcode;
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Rick | last post by:
I am installing Oracle 9i client runtime on AIX 5.1-003. The installation completes successfully, but neither the Net Configuration Assistant or SQLPLUS will run. I get the following error when...
2
by: Vincento Harris | last post by:
Oracle 8.1.7.4 on Hp Unix 11i I am attempting to pass unix parameters on to sql plus I did read on technet that with 9i it is very straightforward Example script name whoisit Pass sid 23...
4
by: Raj Kotaru | last post by:
Hi, In sqlplus, I can insert a single row using: insert into employee (name, salary, hiredate) values ('xyz', '86378', sysdate); Is there a modification of the insert command that will...
3
by: tngoe | last post by:
#!/bin/ksh echo "" echo "Enter person ID:" read person_id sqlplus -silent '/nolog'<<end_sql1 connect useract/passwd start $BANNER_LINKS/gurlsid.sql $person_id FAISMGR end_sql1
1
by: tpawona | last post by:
I'm writing a script that would be run by user oracle, that would logon to all the databases on the server. Thus I'll need to logon as sysdba. In Sqlplus, this would be sqlplus / as sysdba. How do...
1
by: edwardscm | last post by:
Like in UNIX where you can echo $0 and it gives the name of the script running how do you do a similar thing in SQLPLUS. Is there a set option that can be turned on that will allow the name of the...
0
by: Mark D Powell | last post by:
getamit23@rediffmail.com (Amit Kapoor) wrote in message news:<c33bca54.0307090046.7698321f@posting.google.com>... The Windows version of sqlplus should be part of the Oracle client install for...
2
by: Zvika Glickman | last post by:
I have a script a.ksh as follow: <oraspcat a.ksh sqlplus -s rsi/rsi < aaa1.sql echo stat $? <orasp> text of aaa1.sql: exec dbms_stats.gather_table_stats
3
by: draffe | last post by:
This is not a sqlplus script problem per se but I don't know where else to go with my problem. I use wordpad to record my sqlplus script, then copy and paste it into the sqlplus prompt. I've run...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.