Create Oracle 11gR2 Database witch Batch
for Oracle 10g this example
Batch:
#####################################################################################
...
%ORACLE_HOME%\bin\sqlplus /nolog @%ScriptPath%CreateDB.sql %ORACLE_SID% %ORACLE_DATA_LOG% %INITORA_TEMPNAME% %ORACLE_DATA_SYS1% %ORACLE_DATA_SYS2% %ORACLE_HOME% %ORACLE_TNS% %sysPassword% %systemPassword% %ORA_CHAR%
...
#####################################################################################
CreateDB.sql:
#####################################################################################
set echo on
define ORACLE_SID = &1
define ORACLE_LOGS = &2
define ORACLE_TMPNAME = &3
define ORACLE_SYS1 = &4
define ORACLE_SYS2 = &5
define ORACLE_HOME = &6
define ORACLE_TNS = &7
define sysPassword = &8
define systemPassword = &9
define ORACLE_CHAR = &10
define INITPRE = "INIT"
define INITSUF = ".ora"
define INITORA = &INITPRE&ORACLE_SID&INITSUF
connect SYS/&sysPassword as SYSDBA
spool &ORACLE_LOGS\CreateDB.log