Oracle手工建庫步驟

來源:互聯網
上載者:User

Oracle手工建庫步驟:

1、建立資料庫所需的目錄,包括資料檔案存放目錄,日誌存放目錄,歸檔存放目錄等
2、建立密碼檔案
3、建立參數檔案
4、通過剛建立的pfile參數將資料庫啟動的nomount狀態
5、開始執行create database 命令建立資料庫
6、建立資料庫相關視圖和資料字典
7、檢查資料庫狀態,是否建立完成
8、將建立資料庫用的pfile參數建立成spfile,以後啟動的時候不需要指定。
9、重啟資料庫,驗證第八步驟
10、資料庫建立完成。
---------------------------------------------------------------------------
                                執行步驟如下
---------------------------------------------------------------------------

1、建立建庫所需的相關目錄
[root@ora10g ~]# su - oracle
[oracle@ora10g ~]$ cd /oradata/
[oracle@ora10g oradata]$ ls
admin  archive  flash_back  lost+found  wwl
[oracle@ora10g oradata]$ mkdir wwl02
[oracle@ora10g wwl02]$ mkdir -p /oradata/wwl02/admin/bdump /oradata/wwl02/admin/udump /oradata/wwl02/admin/cdump /oradata/wwl02/data/
[oracle@ora10g oradata]$ mkdir -p  /oradata/wwl02/archive /oradata/wwl02/flash_back_area
[oracle@ora10g oradata]$ cd wwl01
[oracle@ora10g wwl02]$ ls
admin  archive  data  flash_back_area
[oracle@ora10g wwl02]$ cd admin/
[oracle@ora10g admin]$ ls -rtl
總計 12
drwxr-xr-x 2 oracle oinstall 4096 11-19 03:00 udump
drwxr-xr-x 2 oracle oinstall 4096 11-19 03:00 cdump
drwxr-xr-x 2 oracle oinstall 4096 11-19 03:00 bdump

2、建立資料庫的密碼檔案
[oracle@ora10g oradata]$ cd $ORACLE_HOME/dbs
[oracle@ora10g dbs]$ orapwd file=orawwl02 password=oracle entries=5 force=y;
[oracle@ora10g dbs]$ ls
hc_wwl.dat  initdw.ora  init.ora  lkWWL  orapwwwl  orawwl02  spfilewwl.ora
[oracle@ora10g dbs]$ cp init.ora initwwl02.ora


3、建立參數檔案,並修改參數檔案內容                                                        
[oracle@ora10g wwl02]$ cd $ORACLE_HOME/dbs
[oracle@ora10g dbs]$ more initdw.ora |grep -v '^#'|grep -v '^$' >initwwl02.ora
[oracle@ora10g wwl02]$ vi ?@/dbs/initwwl02.ora                 
[oracle@ora10g wwl02]$ cat /orasoft/product/10.2.0/db_1/dbs/initwwl02.ora

db_name = wwl02
instance_name = wwl02
pga_aggregate_target = 30M                                #DEMO
db_cache_size = 100M                                #DEMO
shared_pool_size = 80M                                   #DEMO
parallel_threads_per_cpu = 4                                 #SMALL
star_transformation_enabled = true
db_file_multiblock_read_count = 16
query_rewrite_enabled = true
query_rewrite_integrity = trusted
background_dump_dest = /oradata/wwl02/admin/bdump
user_dump_dest = /oradata/wwl02/admin/udump
core_dump_dest = /oradata/wwl02/admin/cdump
control_files = /oradata/wwl02/data/control01.ctl
undo_management = auto
undo_tablespace = undotbs

更多Oracle相關資訊見Oracle 專題頁面 http://www.bkjia.com/topicnews.aspx?tid=12

  • 1
  • 2
  • 下一頁

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.