您的位置:首页 > 其它

ORA-01506: missing or illegal database name

2016-08-23 17:00 1431 查看

ORA-01506: missing or illegal database name,Oracle 启动实例所需最小化参数

引用

SQL> select * from v$instance;

INSTANCE_NUMBER INSTANCE_NAME HOST_NAME VERSION     STARTUP_T STATUS     PAR    THREAD# ARCHIVE LOG_SWITCH_WAIT SHU DATABASE_STATUS  INSTANCE_ROLE ACTIVE_ST BLO
--------------- ------------------------------------------------------------------------------------------------- --------- ------------ --- ---------- ----
1               orcl            web04   11.2.0.1.0  23-AUG-16 STARTED     NO         0 STOPPED  ALLOWED          NO  ACTIVE           UNKNOWN       NORMAL    NO


我们知道Oracle启动实例寻找参数文件的顺序为spfile.ora,spfile.ora,init.ora。那么Oracle启动一个实例最小化参数是什么呢?以下就是实验过程。

创建任意名字实例

引用

$ export ORACLE_SID=WuYong

启动实例需要参数文件initWuYong.ora

引用

$ sqlplus “/as sysdba”

SQL*Plus: Release 10.2.0.3.0 - Production on Sat Jan 9 13:55:35 2010

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.

Connected to an idle instance.

SQL> startup
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/ora10g/oracle/product/10.2.0/db_1/dbs/initWuYong.ora'
SQL> exit
Disconnected


创建参数文件initWuYong.ora

引用

$ touch /ora10g/oracle/product/10.2.0/db_1/dbs/initWuYong.ora

再次尝试启动,提示需要参数db_name

引用

SQL> startup nomount

ORA-01506: missing or illegal database name

添加db_name至参数文件

引用

$ echo “db_name=WuYong”>initWuYong.ora

再次尝试启动zhoul实例,启动成功

引用

SQL> startup nomount

ORACLE instance started.

Total System Global Area 117440512 bytes

Fixed Size 1260384 bytes

Variable Size 58721440 bytes

Database Buffers 50331648 bytes

Redo Buffers 7127040 bytes

查看数据字典v$parameter,发现启动该实例的只有db_name是非默认,也就是说只要只要设置参数db_name,即可启动数据库实例,其他参数均可采用初始值。

引用

SQL> select name from v$parameter where isdefault=’FALSE’;

NAME

——————————————————————————–

db_name

观察alert_WuYong.log,可以看到Oracle在启动实例WuYong中调成了部分初始值。注意到undo retention自动调整被关闭。

引用

SQL> show parameter background_core_dump

NAME TYPE VALUE

———————————— ———– ——————————

background_core_dump string partial

$ cat  alert_WuYong.log
Sat Jan  9 13:58:08 2010
Adjusting the default value of parameter parallel_max_servers
from 40 to 25 due to the value of parameter processes (40)
Sat Jan  9 13:58:08 2010
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Sat Jan  9 13:58:19 2010
Adjusting the default value of parameter parallel_max_servers
from 40 to 25 due to the value of parameter processes (40)
Sat Jan  9 13:58:19 2010
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Sat Jan  9 13:59:52 2010
Adjusting the default value of parameter parallel_max_servers
from 40 to 25 due to the value of parameter processes (40)
Sat Jan  9 13:59:52 2010
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Sat Jan  9 14:01:25 2010
Adjusting the default value of parameter parallel_max_servers
from 40 to 25 due to the value of parameter processes (40)
Sat Jan  9 14:01:25 2010
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Shared memory segment for instance monitoring created
Picked latch-free SCN scheme 2
Using LOG_ARCHIVE_DEST_1 parameter default value as /ora10g/oracle/product/10.2.0/db_1/dbs/arch
Autotune of undo retention is turned off.
LICENSE_MAX_USERS = 0
SYS auditing is disabled
ksdpec: called for event 13740 prior to event group initialization
Starting up ORACLE RDBMS Version: 10.2.0.3.0.
System parameters with non-default values:
db_name                  = zhoul
PMON started with pid=2, OS id=32133
PSP0 started with pid=3, OS id=32135
MMAN started with pid=4, OS id=32137
DBW0 started with pid=5, OS id=32139
LGWR started with pid=6, OS id=32141
CKPT started with pid=7, OS id=32143
SMON started with pid=8, OS id=32145
RECO started with pid=9, OS id=32147
MMON started with pid=10, OS id=32149
MMNL started with pid=11, OS id=32151
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐