Oracle的db_name和instance_name[2]

文章作者 100test 发表时间 2007:03:14 13:58:46
来源 100Test.Com百考试题网


注意,此时试图加载数据库时出现错误,因为当前数据库被另外一个实例(instance)加载。在非并行模式(Ops/RAC)下,一个数据库同时只能被一个实例加载。

此时已经启动了两个数据库实例,从后台进程可以看出:

[oracle@jumper dbs]$ ps -ef|grep ora
oracle 27321 1 0 Jul14 ? 00:00:00 ora_pmon_eygle
oracle 27323 1 0 Jul14 ? 00:00:00 ora_dbw0_eygle
oracle 27325 1 0 Jul14 ? 00:00:00 ora_lgwr_eygle
oracle 27327 1 0 Jul14 ? 00:00:00 ora_ckpt_eygle
oracle 27329 1 0 Jul14 ? 00:00:32 ora_smon_eygle
oracle 27331 1 0 Jul14 ? 00:00:00 ora_reco_eygle
oracle 27333 1 0 Jul14 ? 00:00:00 ora_cjq0_eygle
root 15388 656 0 14:02 ? 00:00:00 sshd: oracle [priv]
oracle 15390 15388 0 14:02 ? 00:00:00 sshd: oracle@pts/2
oracle 15391 15390 0 14:02 pts/2 00:00:00 -bash
oracle 15445 1 0 14:04 ? 00:00:00 ora_pmon_julia
oracle 15447 1 0 14:04 ? 00:00:00 ora_dbw0_julia
oracle 15449 1 0 14:04 ? 00:00:00 ora_lgwr_julia
oracle 15451 1 0 14:04 ? 00:00:00 ora_ckpt_julia
oracle 15453 1 0 14:04 ? 00:00:00 ora_smon_julia
oracle 15455 1 0 14:04 ? 00:00:00 ora_reco_julia
oracle 15457 1 0 14:04 ? 00:00:00 ora_cjq0_julia
oracle 15459 15391 0 14:04 pts/2 00:00:00 ps -ef
oracle 15460 15391 0 14:04 pts/2 00:00:00 grep ora

我们关闭eygle这个数据库实例:

[oracle@jumper dbs]$ export ORACLE_SID=eygle
[oracle@jumper dbs]$ sqlplus "/ as sysdba"

SQL*Plus: Release 9.2.0.4.0 - Production on Tue Jul 25 14:04:39 2006

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.


Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production

SQL> shutdown immediate.
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production

此时就可以通过实例julia加载并打开db_name=eygle的数据库了:

[oracle@jumper dbs]$ export ORACLE_SID=julia
[oracle@jumper dbs]$ sqlplus "/ as sysdba"

SQL*Plus: Release 9.2.0.4.0 - Production on Tue Jul 25 14:05:06 2006

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.


Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production

SQL> alter database mount.
alter database mount
*
ERROR at line 1:
ORA-01990: error opening password file /opt/oracle/product/9.2.0/dbs/orapw
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3


SQL> alter database open.

Database altered.

SQL> 0select name from v$datafile.

NAME
----------------------------------------------------------------------------
/opt/oracle/oradata/eygle/system01.dbf
/opt/oracle/oradata/eygle/undotbs01.dbf
/opt/oracle/oradata/eygle/users01.dbf
/opt/oracle/oradata/eygle/eygle01.dbf

SQL> ! ps -ef|grep ora
root 15388 656 0 14:02 ? 00:00:00 sshd: oracle [priv]
oracle 15390 15388 0 14:02 ? 00:00:00 sshd: oracle@pts/2
oracle 15391 15390 0 14:02 pts/2 00:00:00 -bash
oracle 15445 1 0 14:04 ? 00:00:00 ora_pmon_julia
oracle 15447 1 0 14:04 ? 00:00:00 ora_dbw0_julia
oracle 15449 1 0 14:04 ? 00:00:00 ora_lgwr_julia
oracle 15451 1 0 14:04 ? 00:00:00 ora_ckpt_julia
oracle 15453 1 0 14:04 ? 00:00:00 ora_smon_julia
oracle 15455 1 0 14:04 ? 00:00:00 ora_reco_julia
oracle 15457 1 0 14:04 ? 00:00:00 ora_cjq0_julia
oracle 15513 15391 0 14:05 pts/2 00:00:00 sqlplus
oracle 15514 15513 3 14:05 ? 00:00:01 oraclejulia (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
oracle 15515 15513 0 14:05 pts/2 00:00:00 /bin/bash -c ps -ef|grep ora
oracle 15516 15515 0 14:05 pts/2 00:00:00 ps -ef

SQL> show parameter instance_name

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
instance_name string julia
SQL> show parameter db_name

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_name string eygle



相关文章


备份的控制文件和新的数据文件
Oracle初学者必知的100个问题(下)(1)
Oracle初学者必知的100个问题(下)(2)
Oracle的db_name和instance_name[3]
Oracle的db_name和instance_name[2]
Oracle字符集乱码问题分析及解决办法
Oracle10G数据库软硬件环境的要求(1)
查找运行系统里低劣的SQL方法
Oracle诊断案例:Job任务停止执行
澳大利亚华人论坛
考好网
日本华人论坛
华人移民留学论坛
英国华人论坛