C:\Users\Admin>set ORACLE_HOME=E:\oracle11g\product\11.2.0\dbhome_1
C:\Users\Admin>set ORACLE_SID=bruce
C:\Users\Admin>oradim -new -sid bruce
Instance created.
初始化參數(shù)文件內(nèi)容(11g):
db_name=bruce
audit_file_dest=E:\oracle11g
audit_trail =db
db_block_size=8192
control_files = ('E:\oracle11g\oradata\control01.ctl','E:\oracle11g\oradata\control02.ctl','E:\oracle11g\oradata\control03.ctl')
compatible =11.2.0
初始化參數(shù)文件內(nèi)容(10g):
db_name=bruce10g
audit_trail =db
db_block_size=8192
control_files = ('E:\oracle\product\oradata\control01.ctl','E:\oracle\product\oradata\control02.ctl','E:\oracle\product\oradata\control03.ctl')
compatible =10.2.0
undo_management=auto
undo_tablespace=undotbs1
background_dump_dest='E:\oracle\product\10.2.0\admin\bruce10g\bdump'
sga_target=419430400 #如果沒(méi)有加這個(gè)參數(shù)會(huì)報(bào)
C:\Users\Admin>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Tue May 23 13:47:12 2017
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 150667264 bytes
Fixed Size 1373152 bytes
Variable Size 92277792 bytes
Database Buffers 50331648 bytes
Redo Buffers 6684672 bytes
之后執(zhí)行如下腳本:
create database bruce
maxlogfiles 5
maxlogmembers 5
maxdatafiles 100
maxinstances 1
logfile
group 1 ('E:\oracle11g\oradata\redo1.log') size 10m,
group 2 ('E:\oracle11g\oradata\redo2.log') size 10m,
group 3 ('E:\oracle11g\oradata\redo3.log') size 10m
datafile 'E:\oracle11g\oradata\system.dbf' size 200m reuse
sysaux datafile 'E:\oracle11g\oradata\sysaux.dbf' size 100m
default tablespace users
datafile 'E:\oracle11g\oradata\userdata.dbf' size 100m
undo tablespace undotbs1 datafile 'E:\oracle11g\oradata\undotbs1.dbf' size 100m
default temporary tablespace temp
tempfile 'E:\oracle11g\oradata\temp01.dbf' size 100m reuse
character set al32utf8
;
完成后
SQL> select status from v$instance;
STATUS
------------
OPEN
完成后執(zhí)行如下三個(gè)腳本:
@$ORACLE_HOME/rdbms/admin/catalog.sql
@$ORACLE_HOME/rdbms/admin/catproc.sql
conn system/manager
@$ORACLE_HOME/sqlplus/admin/pupbld.sql
網(wǎng)站名稱:[Oracle]腳本創(chuàng)建DB
標(biāo)題URL:http://www.rwnh.cn/article32/pcoipc.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供定制開(kāi)發(fā)、服務(wù)器托管、網(wǎng)站策劃、網(wǎng)站維護(hù)、品牌網(wǎng)站制作、品牌網(wǎng)站建設(shè)
廣告
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源:
創(chuàng)新互聯(lián)