DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Script not waiting for command to complete

  1. #1
    Join Date
    Aug 2012
    Posts
    1

    Script not waiting for command to complete

    We have a batch file which runs a script and then creates a file which we use as flag for the next batch file.

    Occasionally, the flag file is created before the script is complete causing the next step in the process to fail because it requires a table from the first step. Has anyone run across this problem and found a workaround?

    Thanks,

    Script
    sqlplus -S ID/Password@vod @\\vodcaicluster\Oracle\DataMarts\CT\Scripts\in_rpt_CTBHK_Daily_Auth.txt > \\vodcaicluster\Oracle\DataMarts\CT\Output_Files\out_rpt_CTBHK_Daily_Auth.txt
    dir> \\vodcaicluster\Oracle\events\censusflag.txt

  2. #2
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166
    Have the sql script create the file using the "!" host command.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width