Automating DB schema creation by Sqlplus
881629May 16 2012 — edited May 16 2012Hi,
I am researching a method to automate the deployment of our windows server 2008 11G oracle database. Currently the steps include;
1. Log in to sqlplus / as sysdba
2. Run an sql script, i.e @myDatabaseSchemaCreate.sql
3. Exit
4. Login to sqlplus as the dbuser
5. I start sqlplus and wait for the user name/password prompt and obediently enter it.
6. Now I run another script ie. @mydbuserscript.sql.
This is the process handed down to me by the all-knowing and almighty DBAs and it will not change, It would only be ran once in any environment upon the creation of this environment. In some projects, we may have 5 or 6 environments and quite often something goes wrong which requires a full re-install. What I would like to determine is what methods I have to automate these steps, does anyone have advice/experience of what is best. I was exploring what is involved in writing a .net or java app to automate it, alternatively does oracle provide other methods to automate this?