日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

Oracle 10g 手工创建一个最简单的数据库

發布時間:2023/12/31 数据库 29 豆豆
生活随笔 收集整理的這篇文章主要介紹了 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 手工创建一个最简单的数据库的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。