Database Administration (MOSC)

MOSC Banner

Create Oracle 11gR2 Database witch Batch

edited Jan 13, 2011 11:32PM in Database Administration (MOSC) 15 commentsAnswered
So far we have installed our Oracle databases via 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

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center