0

Right now I'm dropping, creating and then running scripts for several database several times each day. It's getting a little tedious.

I've simple scripts from dropping and creating databases and additional scripts that writes data to the DBs.

I run these scripts through oracle SQL developer. Is there a way I can run all of these scripts at the same time. Like in a batch file or another tool? I.e

  • Drop existing DBs

  • Create DBs

  • Run scripts for DBs

Haven't been able to figure it out

2
  • 1
    Create a .sql file with all the script in the order you want, open the .sql file on the SQL Developer and hit on run button Commented Jan 20, 2023 at 20:43
  • 3
    Yes, Oracle's client tool for use with batch programs is SQL*Plus. Check it out. Commented Jan 20, 2023 at 23:45

1 Answer 1

3

You can create a scheduled job in sql developer. See bellow steps to create a job:

1- From your connection in sql developer select scheduler. In right click select "New Job ...".

enter image description here

2- In opened window you should select "PL/SQL Block" for "Type of Job" then write a block just like I wrote in bellow picture. Then you should select "Repeating" and insert intervals and start and end dates: enter image description here

3- Keep in the mind that "Enable" box should be checked.

4- click on "Apply". Your Job will be ran based on intervals and start date you inserted.

Sign up to request clarification or add additional context in comments.

2 Comments

A tip! You can create a procedure including all of your codes, for example "Prc_DCR", and as "Type of Job" /"Stored Procedure" select just "Prc_DCR".
Thank you very much. I'll play around with this but looks like it's exactly what I need

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.