planning and organizing a database
planning for your database is the first step in managing a database system.
-Difine the purpose of the database.
(目前主要包括oltp在线事务处理:事务量多,改变的数据小,选择小一点的尺寸2K,4k
和DSS 决策支持器:事务量少,需求的数据量大,)
-Difine the type of the database .
- outline a database architectural design.
最小完整的数据库至少需要的表空间有:system表空间、sysaux表空间、临时表空间、undo表空间。
- Choose the database name.
Create your database.
use oracle data mogration assistant to migrate from an earilier version of the database.
Creating a database manually
- choose a unique instance and database name
-choose a database character set
-set operating system variables
-create the instance in nomount stage
- create and execute the create database command
- run scripts to generate the data dictionary and accomplishe post-creation steps
- create additional tablespaces as needed
create database command
CREATE DATABASE mynewdb USER SYS IDENTIFIED BY sys_password USER SYSTEM IDENTIFIED BY system_password LOGFILE GROUP 1 ('/u01/app/oracle/oradata/mynewdb/redo01.log') SIZE 100M, GROUP 2 ('/u01/app/oracle/oradata/mynewdb/redo02.log') SIZE 100M, GROUP 3 ('/u01/app/oracle/oradata/mynewdb/redo03.log') SIZE 100M MAXLOGFILES 5 MAXLOGMEMBERS 5 MAXLOGHISTORY 1 MAXDATAFILES 100 CHARACTER SET US7ASCII NATIONAL CHARACTER SET AL16UTF16 EXTENT MANAGEMENT LOCAL DATAFILE '/u01/app/oracle/oradata/mynewdb/system01.dbf' SIZE 325M REUSE SYSAUX DATAFILE '/u01/app/oracle/oradata/mynewdb/sysaux01.dbf' SIZE 325M REUSE DEFAULT TABLESPACE users DATAFILE '/u01/app/oracle/oradata/mynewdb/users01.dbf' SIZE 500M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED DEFAULT TEMPORARY TABLESPACE tempts1 TEMPFILE '/u01/app/oracle/oradata/mynewdb/temp01.dbf' SIZE 20M REUSE UNDO TABLESPACE undotbs DATAFILE '/u01/app/oracle/oradata/mynewdb/undotbs01.dbf' SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;