How to make Oracle program executed through windows XP command line.
citicbjJun 15 2009 — edited Jun 16 2009I know this thread may not be appropriate to be posted here. However, I couldn't find place to post this question. However, the question is related to Oracle program execution. So I post here for help.
I creted a windows XP shell program to execute a few oracle program to refresh data on database. All oracle programs work very well. But the windows shell program is not working properly. I seek your input to solve this problem. Here is the basic windows shell script:
**********************
set oracle_sid=mydb
set MyDir=C:\refresh
sqlplus -s username_1/password_1@mydb @%MyDir%\updt_table.sql
exit
sqlldr username_2/password_2@mydb control=C:\refresh\control_file_1.ctl
sqlldr username_2/password_2@mydb control=C:\refresh\control_file_2.ctl
sqlldr username_2/password_2@mydb control=C:\refresh\control_file_3.ctl
sqlldr username_2/password_2@mydb control=C:\refresh\control_file_4.ctl
sqlldr username_2/password_2@mydb control=C:\refresh\control_file_5.ctl
set oracle_sid=mydb
set MyDir=C:\refresh
sqlplus -s username_2/password_2@mydb @%MyDir%\refresh_table.sql
exit
The problem is: The first sqlplus is to connect to username_1. after windows shell execute and finish updt_table.sql as well as exit from that db schema, it suppose to go to next sql loader command line to login as username_2 to start sql loader control file to load data. The actual situation is: command line hang on at first "exit" and didn't login username_2 to do sql loader work. Please advise me where the problem is and how to fix it. Thanks for your kind help.