----------------------------------------------------------------------------
---- This is andkylee's personal originality. Please repost it with respect to the author's Labor achievements;
---- The original source must be specified for reprinting.
:
Http://blog.csdn.net/andkylee
--- 2010-08-10 16:14:00
---- Keyword: Oracle10g create database Command Line command line create database
No-Gui windows Linux
----------------------------------------------------------------------------
The following syntax is successfully executed on Oracle 10.2.0.1. A database instance is successfully created on Windows-XP and ubuntu.
Create Database demo
Maxdatafiles 500
Maxinstances 10
Maxlogfiles 32
Noarchivelog
Datafile
'E:/Oracle/oradata/demo/system01.dbf'
Size 300 m autoextend on next 100 m maxsize unlimited extent management local
Sysaux datafile 'e:/Oracle/oradata/demo/sysaux01.dbf'
Size 300 m autoextend on next 100 m maxsize Unlimited
Default temporary tablespace temp tempfile 'e:/Oracle/oradata/demo/temp01.dbf' size 100 m
Autoextend on next 100 m maxsize Unlimited
Undo tablespace "undotbs1"
Datafile 'e:/Oracle/oradata/demo/undotbs01.dbf' size 200 m autoextend on next 100 m maxsize Unlimited
Default tablespace users
Datafile 'e:/Oracle/oradata/demo/users01.dbf' size 100 m
Logfile
Group 1 ('e:/Oracle/oradata/demo/redo01.log') size 50 m,
Group 2 ('e:/Oracle/oradata/demo/redo02.log ') size 50 m,
Group 3 ('e:/Oracle/oradata/demo/redo03.log') size 50 m
Character Set zhs16gbk
National Character Set al16utf16;
After creating the database manually, execute the SQL file used to create the data dictionary.
Run the following command in sqlplus:
SQL> @ $ ORACLE_HOME/rdbms/admin/CATALOG. SQL;
SQL> @ $ ORACLE_HOME/rdbms/admin/catproc. SQL
SQL> @ $ ORACLE_HOME/sqlplus/admin/pupbld. SQL;
Generate Password File
You must have a password file under the $ ORACLE_HOME/DBS directory to connect a remote user to the database using sys. The password file name in Oracle10g is in the format of PWD $ oracle_sid.ora.
Use a command tool to generate:
Orapwd file = $ ORACLE_HOME/dbs/pwd $ oracle_sid.ora Password = test123 entries = 10
In this way, the password file PWD $ oracle_sid.ora is generated under the $ ORACLE_HOME/DBS directory. The password is test123, and up to 10 users can be connected to SYS.