Two methods for creating an Oracle database

Source: Internet
Author: User

Two ways to create an Oracle database: 1. run Oracle Database Configuration Assistant to create a Configuration or delete a Database (you can also enter dbca in the command line); 2. create a database using the command line: 1. you can run Oracle Database Configuration Assistant to create or delete a Database. We recommend that DBAs who are not familiar with the creation process use this method to configure the Database and generate a Database creation script (recommended ), or directly create a database. Advantages: the GUI method is easy to use. Disadvantages: the creation process is slow. 2. the command syntax for creating a database using a command line is as follows: create database [databasename] [user username identified by password] [controlfile reuse] [logfile [group Integer] filespec [group integer] filespec]...] [maxlogfiles integer] [maxlogmembers integer] [maxloghistory integer] [maxdatafiles integer] [maxinstances integer] [archivelog | noarchivelog] [character set] [national character set] [datafile filespec [autoextend_clouse], filespec [autoextend_clouse]...] [sysaux datafile filespec] [default tablespace name] [default temporary tablespace name tempfile filespec] [u Ndo tablespace table space name datafile filespec] user: sets the password of the database administrator, such as sys and system controlfile reuse. If the control file exists, an existing control file is used. Reuse refers to reusing existing control files. Maxlogfile: Maximum number of Log File groups maxlogmembers: Maximum number of log files in each log file group. Maxloghistory: displays the maximum number of archive log files read during Automatic media recovery on the Oracle Parallel Server (OPS. Maxdatafiles: the maximum number of data files in a database. Maxinstances: Maximum number of database instances. The maximum value is 63. The default value is 1. archivelog | noarchivelog: Set the database to run in archive or non-archive mode. Character set: character set used to store data. It is US7ASCII by default on most platforms. National character set: international character set used to store data in nchar, nclob, and nvarchar2. If not, the international character set is the same as the database character set. Datafile: specify the location and initial size of the data file. Sysaux: Specifies the name of the auxiliary tablespace, corresponding to the location of the data file, and the initial size of the data file. Dafault tablespace: Set the default tablespace default temporary tablespace: Set the temporary tablespace name. Undo tablespace: Set the name of the rollback tablespace. Filespec sets file-related parameters. Command Format: 'file _ name' [size integer] [K | M] [REUSE] Note: '|' indicates or, '[]' indicates an optional example: using create database test user sys identified by sys_id user system identified by system_id logfile GROUP 1 ('/$ ORACLE_BASE/oradata/test/redo01.log ') logfile group 2 ('/$ ORACLE_BASE/oradata/test/redo02.log') logfile group 3 ('/$ ORACLE_BASE/oradata/test/redo03.log ') maxlogfiles 5 maxlogmembers 5 maxloghistory 1 maxdatafiles 100 maxinstances 1 character set US7ASCII national character set Your datafile '/$ ORACLE_BASE/oradata/test/comment 'size 325 M reuse extent management local sysaux datafile '/ $ ORACLE_BASE/oradata/test/comment 'size 325 M reuse default tablespace tbs_1 default temporary tablespace tempts1 tempfile'/$ ORACLE_BASE/oradata/test/temp01.dbf 'size 20 M reuse undo tablespace undotbs datafile '/$ ORACLE_BASE/oradata/test/undo' size 200 M reuse autoextend on maxsize unlimited; sys password: change_on_install system password: manager

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.