Oracle 10g 手工创建一个最简单的数据库
[root@blliu ~]# su - oracle
[oracle@blliu ~]$ cd $ORACLE_HOME/dbs
[oracle@blliu dbs]$ touch initorcl.ora
[oracle@blliu dbs]$ vi initorcl.ora????????????????? //加入db_name=orcl
[oracle@blliu dbs]$ export ORACLE_SID=orcl
[oracle@blliu dbs]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Mon Jan 25 19:03:23 2010
Copyright (c) 1982, 2007, Oracle.? All Rights Reserved.
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.
Total System Global Area? 171966464 bytes
Fixed Size????????????????? 2082496 bytes
Variable Size???????????? 113248576 bytes
Database Buffers?????????? 50331648 bytes
Redo Buffers??????????????? 6303744 bytes
SQL> create database orcl
? 2? datafile
? 3? '/u01/app/oracle/orcl/system01.dbf' size 300m autoextend on next 10m
? 4? sysaux datafile
? 5? '/u01/app/oracle/orcl/sysaux01.dbf' size 300m autoextend on next 10m
? 6? logfile
? 7? group 1 ('/u01/app/oracle/orcl/redo101.log') size 10m,
? 8? group 2 ('/u01/app/oracle/orcl/redo201.log') size 10m
? 9? character set zhs16gbk;
Database created.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area? 171966464 bytes
Fixed Size????????????????? 2082496 bytes
Variable Size???????????? 113248576 bytes
Database Buffers?????????? 50331648 bytes
Redo Buffers??????????????? 6303744 bytes
Database mounted.
Database opened.
SQL> @?/rdbms/admin/catalog.sql??? //創建數據庫的基表,視圖,同義詞等
PL/SQL procedure successfully completed.
SQL> @?/rdbms/admin/catproc.sql?? //創建數據庫的程序包,過程,函數,同義詞等
PL/SQL procedure successfully completed.
SQL>
SQL> SET SERVEROUTPUT OFF
SQL> connect system/manager
Connected.
SQL> @?/sqlplus/admin/pupbld.sql??? //創建使用SQLPLUS工具連接所需的視圖,同義詞等
SQL>
SQL> -- End of pupbld.sql
SQL> exit????
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@blliu dbs]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Mon Jan 25 19:24:00 2010
Copyright (c) 1982, 2007, Oracle.? All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> create table test (id number);
Table created.
SQL> insert into test values (1);
1 row created.
SQL> commit;
Commit complete.
至此,一個最簡單的Oracle數據庫就創建成功了,我們可以在此基礎上創建undo tablespace,temporary tablespace,安裝其他組建使其變得更加完整。
來自 “ ITPUB博客 ” ,鏈接:http://blog.itpub.net/23135684/viewspace-624735/,如需轉載,請注明出處,否則將追究法律責任。
轉載于:http://blog.itpub.net/23135684/viewspace-624735/
總結
以上是生活随笔為你收集整理的Oracle 10g 手工创建一个最简单的数据库的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: C语言把字符串转变为数字
- 下一篇: 高中数学函数思维导图的绘制方法分享