Name

CREATE/ALTER DATABASE

Synopsis

CREATE Syntax:

CREATE DATABASE [dbname]
CONTROLFILE [REUSE]
LOGFILE [GROUP integer] (filename[,[GROUP integer] filename ...]) 
[MAXLOGFILES integer]
[MAXLOGMEMBERS integer]
[MAXLOGHISTORY integer]
[MAXDATAFILES integer]
[MAXINSTANCES integer]
[ARCHIVELOG | NOARCHIVELOG]
[CHARACTER SET charset]
[NATIONAL CHARACTER SET charset]
[SET TIME_ZONE = '{{+ | -} hh:mi | time_zone_region}']
[USER SYS IDENTIFIED BY password]
[USER SYSTEM IDENTIFIED BY password]
[DEFAULT TEMPORARY TABLESPACE tablespace_name [TEMPFILE filename] 
  [EXTENT MANAGEMENT LOCAL] [UNIFORM [SIZE integer [ K | M ]]]]
[UNDO TABLESPACE tablespace_name [DATAFILE filename [autoextend_clause] 
DATAFILE (filename[,filename ...])[Autoextend_Clause]]]
[EXTENT MANAGEMENT LOCAL]

ALTER Syntax:

ALTER DATABASE [dbname] 
{ ARCHIVELOG | NOARCHIVELOG 
| MOUNT [[STANDBY | CLONE] DATABASE] 
| CONVERT 
| OPEN 
  [{READ WRITE [{RESETLOGS | NORESETLOGS}] [MIGRATE] 
  | READ ONLY
  }] 
| ACTIVATE [PHYSICAL | LOGICAL] STANDBY DATABASE 
  [SKIP [STANDBY LOGFILE]] 
| SET STANDBY DATABASE TO MAXIMIZE 
  {PROTECTION | AVAILABILITY | PERFORMANCE} 
| REGISTER [OR REPLACE] {PHYSICAL | LOGICAL } 
  LOGFILE logfile_descriptor[,logfile_descriptor ...] 
| START LOGICAL STANDBY APPLY [NEW PRIMARY dblink | INITIAL scn_value] 
| {STOP | ABORT} LOGICAL STANDBY APPLY 
| COMMIT TO SWITCHOVER TO {PHYSICAL | LOGICAL} {PRIMARY | STANDBY}
  [{WITH | WITHOUT} SESSION SHUTDOWN] [WAIT | NOWAIT]
}
{ RESET COMPATIBILITY 
| CONVERT 
| ENABLE [PUBLIC] THREAD integer ...

Get Oracle in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.