The error message which you captured in db_status had a "*" in it. Change
to
Anyhow, you should put something like:
whenever sqlerror exit 1
whenever oserror exit 1
at the beginning of your sql scripts. Then check the exit code of sqlplus.
i am trying to convert .ksh script to .bat in windows box , it says awk is not recognized as internal or external command.
this is the sample .ksh script , even if i change awk to gawk it does not work its giving me syntax error, at line one ---- it's pointing ":" and "fund:"
some one plzz help.... (0 Replies)
My requirement is to create a KSH to generate the SQL select statement in oracle with all the columns and optional where condition if given the table name as input to the program
Have any of you worked with a similar requirement? Can you give me some inputs?
Regards,
Kousikan (2 Replies)
Hi all,
I have a script which takes in sqlfile as argument and executes the sql
execSqlFile()
{
sqlFile=$1
sqlplus -S $DBLOG/$DBPWD@$DBSVR < $sqlFile
}
This works fine if the sql file is plain, simple and pre-defined statment. But i want to have a sql file which itself... (2 Replies)
Hi,
I need confirmation whether the same functionality exists when running the sql's.
For ex. let us consider there exists a sql file with name june.When running in sql mode does:
@june.sql and start june.sql does the same functionality.
Someone help me.
Thanks
Ashok. (1 Reply)
I am trying to create a script to manipulate numerous file and at first I thought it would be a simple task but at this point i am ready to break my computer! I am new to unix scripting so hopefully someone out there thinks this is super easy and can help me out!
A sample of the problem file is... (2 Replies)
I got a task to do today, I want to write a script for the following
1) Archive log more than 2 days old
2) Number of days the current Archive logs present
3) Total number of archive logs
4) Size of each archive log
5) When was last successful backup happened?
Can I get a general script... (8 Replies)
Hi ,
I have a txt file with contents like:
1234
2345
3456
7891
I need to write a script which takes input file as txt file..run a sql query for that number and place the output of query in another file..
select * from bus_event where acct_nbr='1234'( from input txt file)
the query... (20 Replies)
SQL> select
2 distinct qc_m|| ',' ||
3 to_char(logon_dt, 'YYYY-MM-DD HH24:MI:SS')|| ',' ||
4 CASE WHEN logon_dt IS NOT NULL THEN 'LOGON' ELSE 'LOGOFF' END
5 from qc_ct2 qc left join v_tls_equipment_logon tls on qc.qc_m=tls.equipment_id where
6 qc.terminal_c='T'and... (1 Reply)
Hi
i need code to get sql queries through a shell script for a text file input which contain the service ids
iputfile
I-H-2048-10GB-M
I-H-4096-12GB-M
I-H-2048-p1000-M
the code should contain below queries among which service_id is replacable with value from input file.
... (4 Replies)