Rishav Posted April 20, 2009 Share Posted April 20, 2009 Hi folksI have two simple scripts.One opens the cmd window and runs the imp command for Oracle dump import.the second script recompiles all the invalid objects in the database.the problem is that dump import can take a long while. is there any way to know when the dump import is over?can we recognize when the command prompt is returned? or maybe we can change the cmd window header when the dump import is done. any ideas?regardsRIshav Link to comment Share on other sites More sharing options...
FinalVersion Posted April 20, 2009 Share Posted April 20, 2009 If "Dump Import" closes Cmd you can try. WinWaitClose() [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center] Link to comment Share on other sites More sharing options...
Rishav Posted April 20, 2009 Author Share Posted April 20, 2009 unfortunately no. It would have be very easy then. Also, the header doesn't changes either. Link to comment Share on other sites More sharing options...
FinalVersion Posted April 20, 2009 Share Posted April 20, 2009 unfortunately no. It would have be very easy then. Also, the header doesn't changes either.Post your source, or PM me if you don't want to release to public. [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center] Link to comment Share on other sites More sharing options...
99ojo Posted April 20, 2009 Share Posted April 20, 2009 (edited) Hi, maybe a solution: Run ("Script for Import", [workingdir, etc....]) While ProcessExists ("Processname of Oracle import.exe") <> "" sleep (50) Wend MsgBox (0,"Finished Import","Starting Recompilation.....", 10) Run ("Script for Recompilation",..) ;-)) Stefan Edited April 20, 2009 by 99ojo Link to comment Share on other sites More sharing options...
Rishav Posted April 20, 2009 Author Share Posted April 20, 2009 Post your source, or PM me if you don't want to release to public. no source as such. its just a run(cmd) send(imp user/pass@orcl file=c:\file.dmp log=log.txt full=y ignore=y) send(enter) When the import is over, command prompt is returned. <---------> Now i run the recompile script; run(utlprp.sql for orcl db) the problem is the <-----> part. i want to combine the two scripts into one. but don't know how to recognize that the dump import is done. ps. i just thought of a workaround. not sure if its a good idea. i can maybe make a batch file with the imp command in it. so when the import is over, the cmd windows also closes. but i suck at making batch files so i probably will be as lost as i am now. Hi, maybe a solution: Run ("Script for Import", [workingdir, etc....]) While ProcessExists ("Processname of Oracle import.exe") <> "" sleep (50) Wend MsgBox (0,"Finished Import","Starting Recompilation.....", 10) Run ("Script for Recompilation",..) ;-)) StefanTha sounds like just the thing the doctor ordered. I didn't realize that the CMD window ran a whole new process. i'll give it a go tomorrow. Thanks for the help stephan. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now