O'Reilly logo

Oracle SQL: the Essential Reference by David C. Kreines

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CREATE/ALTER DATABASE
						CREATE DATABASE [dbname]
CONTROLFILE [REUSE]
LOGFILE [GROUP integer] (filespec[,[GROUP integer] filespec ...]) 
[MAXLOGFILES integer]
[MAXLOGMEMBERS integer]
[MAXLOGHISTORY integer]
[MAXDATAFILES integer]
[MAXINSTANCES integer]
[ARCHIVELOG | NOARCHIVELOG]
[CHARACTER SET charset
[NATIONAL CHARACTER SET charset
DATAFILE (filespec[,filespec ...])[Autoextend_Clause]

Creates a database and specifies parameters associated with it.

ALTER DATABASE [dbname] 
  {ARCHIVELOG | NOARCHIVELOG |
   MOUNT [[STANDBY | CLONE] DATABASE] |
   CONVERT |
   OPEN [READ WRITE [RESETLOGS | NORESETLOGS] | READ ONLY] |
   ACTIVATE STANDBY DATABASE |
   RENAME FILE 'filename` [,'filename' ...] TO 'filename` [,'filename' ...]  |
   RENAME GLOBAL_NAME TO database[.domain[.domain ...]] |
   RESET COMPATIBILITY |
   ENABLE [PUBLIC] THREAD integer |
   DISABLE THREAD integer |
   CHARACTER SET character_set |  
   NATIONAL CHARACTER SET character_set |
   CREATE DATAFILE 'filename'[,'filename' ...] [AS filespec] |
   DATAFILE 'filename'[,'filename' ...]
     {ONLINE | 
      OFFLINE [DROP} |
      RESIZE integer[K | M] |
      END BACKUP |
      Autoextend_Clause
     } |
   TEMPFILE 'filename'[,'filename' ...]
     {ONLINE | 
      OFFLINE
      DROP |
      RESIZE integer[K | M] |
      Autoextend_Clause
     } |
   ADD LOGFILE [THREAD integer]
    [GROUP integer] filespec[,[GROUP integer] filespec ...] |
   ADD LOGFILE MEMBER 'filename' [RESUSE] [,'filename' [RESUSE] ...]
    TO logfile_descriptor[,logfile_descriptor ...] |
   DROP {GROUP integer | 'filename` | ('filename','filename'[,'filename' ...])} | DROP LOGFILE MEMBER ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required