oracle手動建庫

sky850623發表於2014-10-01

1安裝oracle軟體

2 建立目錄

 

 
  資料庫名:mynewdb
3建立例項


4建立初始化引數

 E:\oracle\product\10.2.0\db_1\dbs\initdw.ora這個參檔案進行修改,或者從其他庫中拷貝一份進行修改
 

mynewdb.__db_cache_size=92274688

mynewdb.__java_pool_size=4194304

mynewdb.__large_pool_size=4194304

mynewdb.__shared_pool_size=62914560

mynewdb.__streams_pool_size=0

*.audit_file_dest='E:\oracle\product\10.2.0/admin/mynewdb/adump'

*.background_dump_dest='E:\oracle\product\10.2.0/admin/mynewdb/bdump'

*.compatible='10.2.0.1.0'

*.control_files='E:\oracle\product\10.2.0/oradata/mynewdb/\control01.ctl','E:\oracle\product\10.2.0/oradata/mynewdb/\control02.ctl','E:\oracle\product\10.2.0/oradata/mynewdb/\control03.ctl'

*.core_dump_dest='E:\oracle\product\10.2.0/admin/mynewdb/cdump'

*.db_block_size=8192

*.db_domain=''

*.db_file_multiblock_read_count=16

*.db_name='mynewdb'

 

*.db_recovery_file_dest_size=2147483648

*.dispatchers='(PROTOCOL=TCP) (SERVICE=mtXDB)'

*.job_queue_processes=10

*.open_cursors=300

*.pga_aggregate_target=16777216

*.processes=150

*.remote_login_passwordfile='EXCLUSIVE'

*.sga_target=167772160

*.undo_management='AUTO'

*.undo_tablespace='UNDOTBS1'

*.user_dump_dest='E:\oracle\product\10.2.0/admin/mynewdb/udump'

5 啟動資料庫到nomout狀態




檔名不對,所以報錯,把initmt.ora改為initorcl.ora



6執行建立資料庫指令碼ceatedb.sql

CREATE DATABASE mynewdb

   USER SYS IDENTIFIED BY pz6r58

   USER SYSTEM IDENTIFIED BY y1tz5p

   LOGFILE GROUP 1 ('E:\oracle\product\10.2.0\oradata\mynewdb\redo01.log') SIZE 100M,

           GROUP 2 ('E:\oracle\product\10.2.0\oradata\mynewdb\redo02.log') SIZE 100M,

           GROUP 3 ('E:\oracle\product\10.2.0\oradata\mynewdb\redo03.log') SIZE 100M

   MAXLOGFILES 5

   MAXLOGMEMBERS 5

   MAXLOGHISTORY 1

   MAXDATAFILES 100

   MAXINSTANCES 1

   CHARACTER SET ZHS16GBK

   NATIONAL CHARACTER SET AL16UTF16

   DATAFILE 'E:\oracle\product\10.2.0\oradata\mynewdb\system01.dbf' SIZE 325M REUSE

   EXTENT MANAGEMENT LOCAL

   SYSAUX DATAFILE 'E:\oracle\product\10.2.0\oradata\mynewdb\sysaux01.dbf' SIZE 325M REUSE

   DEFAULT TEMPORARY TABLESPACE temp

      TEMPFILE 'E:\oracle\product\10.2.0\oradata\mynewdb\temp01.dbf'

      SIZE 20M REUSE

   UNDO TABLESPACE undotbs1

      DATAFILE 'E:\oracle\product\10.2.0\oradata\mynewdb\undotbs01.dbf'

      SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;


7 建立額外表空間

CREATE TABLESPACE users LOGGING

     DATAFILE 'E:\oracle\product\10.2.0\oradata\mynewdb\users01.dbf'

     SIZE 25M REUSE AUTOEXTEND ON NEXT  1280K MAXSIZE UNLIMITED

     EXTENT MANAGEMENT LOCAL

8建立資料字典

SQL> @ E:\oracle\product\10.2.0\db_1\RDBMS\ADMIN\catalog.sql

SQL> @ E:\oracle\product\10.2.0\db_1\RDBMS\ADMIN\catproc.sql

9 建立spfile



來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26937943/viewspace-1286507/,如需轉載,請註明出處,否則將追究法律責任。

相關文章