程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> 其他數據庫知識 >> 更多數據庫知識 >> 如何用Oracle創建實例的參數需求

如何用Oracle創建實例的參數需求

編輯:更多數據庫知識

我們知道,Oracle在啟動過程中,需要讀取參數文件(pfile/spfile)來創建實例.Oracle在啟動過程中,尋找參數文件的順序為:

spfile<sid>.ora,spfile.ora,init<sid>.ora.

而創建實例的過程中,Oracle需要的最少參數為一個,即db_name參數.

我們來看一個測試,啟動一個任意設置的實例,本例ORACLE_SID=julia:

oracle@jumper dbs]$ export ORACLE_SID=julia
[oracle@jumper dbs]$ sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.4.0
- Production on Mon May 8 11:08:36 2006
Copyright (c) 1982, 2002,
Oracle Corporation.  All rights reserved.
Connected to an idle instance.
SQL> startup nomount;
ORA-01078: failure in
processing system parameters
LRM-00109: could not open parameter
file '/opt/oracle/product/9.2.0/dbs/initjulia.ora'

Oracle最後檢查的文件為initjulia.ora,讓我們創建這個文件,然後數據庫實例即可創建:

SQL> ! echo "db_name=julia" >
/opt/oracle/product/9.2.0/dbs/initjulia.ora

SQL> startup nomount;
ORACLE instance started.

Total System Global Area  
97588504 bytes
Fixed Size                  
451864 bytes
Variable Size             
46137344 bytes
Database Buffers          
50331648 bytes
Redo Buffers                
667648 bytes

我們可以看一下缺省的各類文件的存儲地點:

SQL> show parameter dump_dest NAME TYPE VALUE
--------------- ----------------- --------
background_dump_dest string ?/rdbms/log
core_dump_dest string ?/dbs user_dump_dest
string ?/rdbms/log SQL> show parameter
control_files NAME TYPE VALUE
--------------- -----------------
control_files string ?/dbs/[email protected]

我們順便看一下缺省的,警報日志中記錄的信息:

oracle@jumper dbs]$ cat
$ORACLE_HOME/rdbms/log/alert_julia.log
Mon May  8 11:09:04 2006
Starting ORACLE instance (normal)
Mon May  8 11:09:04 2006
WARNING: EINVAL creating
segment of size 0x0000000006400000
fix shm parameters in /etc/system or equivalent
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
SCN scheme 2
Using log_archive_dest parameter default value
LICENSE_MAX_USERS = 0
SYS auditing is disabled
Starting up ORACLE RDBMS Version: 9.2.0.4.0.
System parameters with non-default values:
  db_name                  = julia
PMON started with pid=2
DBW0 started with pid=3
LGWR started with pid=4
CKPT started with pid=5
SMON started with pid=6
RECO started with pid=7

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved