473,398 Members | 2,120 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,398 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 14854
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: 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
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.