Wednesday, September 18, 2013

Release multiple Oracle scripts to Production Server using batch file

I am writing this blog for all DBA team who are doing this task manually for their Production Deployment repeatedly.

To solve this problem, I have created a batch file which will read all SQL files from folder excluding child folder and use SQLPLUS to execute scripts file to specified Data Source.

How to run batch file ?

1. Copy batch file “ReleaseOracleScripts.bat” to location from where you want to release SQL files.

2. Click on “ReleaseOracleScripts.bat” to execute batch file.

3. Batch file will ask Host Name, Port, Service Name, User Name and Password where you want to deploy your scripts.

image4. Batch file will ask you to click any key before executing each script.

image5. Once click any key, It will execute this script to Target Server and display output.


6. Once all scripts are deployed, It will ask to click any key to close window.


Below is the batch file to download.