ORA-01507: database not mounted
来源:互联网 发布:克苏鲁神话知乎 编辑:程序博客网 时间:2024/06/08 03:52
ORA-01102: cannot mount database in EXCLUSIVE mode
ORACLE instance shut down.
一.今天在STARTUP一数据库时,发生如下错误:
SQL> conn /as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 276824064 bytes
Fixed Size 778736 bytes
Variable Size 137371152 bytes
Database Buffers 138412032 bytes
Redo Buffers 262144 bytes
ORA-01102: cannot mount database in EXCLUSIVE mode
Fixed Size 778736 bytes
Variable Size 137371152 bytes
Database Buffers 138412032 bytes
Redo Buffers 262144 bytes
ORA-01102: cannot mount database in EXCLUSIVE mode
SQL> shutdown immediate
ORA-01507: database not mounted
ORA-01507: database not mounted
ORACLE instance shut down.
GOOGLE一下,发现是lk<SID>文件造成的,该文件位于ORALCE_HOME下的dbs目录下,马上检查该文件:
[root@qa-oracle dbs]# fuser -u lkNDMSQA
lkNDMSQA: 6666(oracle) 6668(oracle) 6670(oracle) 6672(oracle) 6674(oracle) 6676(oracle) 6678(oracle) 6680(oracle) 6690(oracle) 6692(oracle) 6694(oracle) 6696(oracle) 6737(oracle) 6830(oracle)
lkNDMSQA: 6666(oracle) 6668(oracle) 6670(oracle) 6672(oracle) 6674(oracle) 6676(oracle) 6678(oracle) 6680(oracle) 6690(oracle) 6692(oracle) 6694(oracle) 6696(oracle) 6737(oracle) 6830(oracle)
果然该文件没释放,用fuser命令kill掉:
[root@qa-oracle dbs]# fuser -k lkNDMSQA
lkNDMSQA: 6666 6668 6670 6672 6674 6676 6678 6680 6690 6692 6694 6696 6737 6830
[root@qa-oracle dbs]# fuser -u lkNDMSQA
lkNDMSQA: 6666 6668 6670 6672 6674 6676 6678 6680 6690 6692 6694 6696 6737 6830
[root@qa-oracle dbs]# fuser -u lkNDMSQA
然后:
SQL> startup
ORACLE instance started.
ORACLE instance started.
Total System Global Area 276824064 bytes
Fixed Size 778736 bytes
Variable Size 137371152 bytes
Database Buffers 138412032 bytes
Redo Buffers 262144 bytes
Database mounted.
Database opened.
SQL>
Fixed Size 778736 bytes
Variable Size 137371152 bytes
Database Buffers 138412032 bytes
Redo Buffers 262144 bytes
Database mounted.
Database opened.
SQL>
数据库成功OPEN.
二.说明Oracle被异常关闭时,有资源没有被释放,一般有以下几种可能,
1、 Oracle的共享内存段或信号量没有被释放;
2、 Oracle的后台进程(如SMON、PMON、DBWn等)没有被关闭;
3、 用于锁内存的文件lk<sid>和sgadef<sid>.dbf文件没有被删除。
首先,虽然我们的系统是HA系统,但是备节点的实例始终处在关闭状态,这点通过在备节点上查数据库状态可以证实。
其次、是因系统掉电引起数据库宕机的,系统在接电后被重启,因此我们排除了第二种可能种的1、2点。最可疑的就是第3点了。
查$ORACLE_HOME/dbs目录:
$ cd $ORACLE_HOME/dbs
$ ls sgadef*
sgadef* not found
$ ls lk*
lkORA92
$ ls sgadef*
sgadef* not found
$ ls lk*
lkORA92
果然,lk<sid>文件没有被删除。将它删除掉
$ rm lk*
再启动数据库,成功。
三.有可能还会出现以下错误
ORA-00205: error in identifying control file, check alert log for more info
报此错误有一种情况是在环境变量里面没添加NLS_LANG,必须加上这一句。
export NLS_LANG=AMERICAN_CHINA.ZHS16GBK
ORA-01102: cannot mount database in EXCLUSIVE mode
ORACLE instance shut down.
今天在STARTUP一数据库时,发生如下错误:
SQL> conn /as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 276824064 bytes
Fixed Size 778736 bytes
Variable Size 137371152 bytes
Database Buffers 138412032 bytes
Redo Buffers 262144 bytes
ORA-01102: cannot mount database in EXCLUSIVE mode
Fixed Size 778736 bytes
Variable Size 137371152 bytes
Database Buffers 138412032 bytes
Redo Buffers 262144 bytes
ORA-01102: cannot mount database in EXCLUSIVE mode
SQL> shutdown immediate
ORA-01507: database not mounted
ORA-01507: database not mounted
ORACLE instance shut down.
GOOGLE一下,发现是lk<SID>文件造成的,该文件位于ORALCE_HOME下的dbs目录下,马上检查该文件:
[root@qa-oracle dbs]# fuser -u lkNDMSQA
lkNDMSQA: 6666(oracle) 6668(oracle) 6670(oracle) 6672(oracle) 6674(oracle) 6676(oracle) 6678(oracle) 6680(oracle) 6690(oracle) 6692(oracle) 6694(oracle) 6696(oracle) 6737(oracle) 6830(oracle)
lkNDMSQA: 6666(oracle) 6668(oracle) 6670(oracle) 6672(oracle) 6674(oracle) 6676(oracle) 6678(oracle) 6680(oracle) 6690(oracle) 6692(oracle) 6694(oracle) 6696(oracle) 6737(oracle) 6830(oracle)
果然该文件没释放,用fuser命令kill掉:
[root@qa-oracle dbs]# fuser -k lkNDMSQA
lkNDMSQA: 6666 6668 6670 6672 6674 6676 6678 6680 6690 6692 6694 6696 6737 6830
[root@qa-oracle dbs]# fuser -u lkNDMSQA
lkNDMSQA: 6666 6668 6670 6672 6674 6676 6678 6680 6690 6692 6694 6696 6737 6830
[root@qa-oracle dbs]# fuser -u lkNDMSQA
然后:
SQL> startup
ORACLE instance started.
ORACLE instance started.
Total System Global Area 276824064 bytes
Fixed Size 778736 bytes
Variable Size 137371152 bytes
Database Buffers 138412032 bytes
Redo Buffers 262144 bytes
Database mounted.
Database opened.
SQL>
Fixed Size 778736 bytes
Variable Size 137371152 bytes
Database Buffers 138412032 bytes
Redo Buffers 262144 bytes
Database mounted.
Database opened.
SQL>
数据库成功OPEN.
0 0
- ORA-01507: database not mounted
- ORA-01507: database not mounted
- ORA-01507: database not mounted
- ORA-01507: database not mounted (转)
- ORA-01155: the database is being opened, closed, mounted or dismounted
- ORA-15039: diskgroup not dropped ORA-15073: diskgroup DATA1 is mounted by another ASM instance
- ORA-15001: diskgroup "DATADG01" does not exist or is not mounted
- ORA-15110: no diskgroups mounted
- umount: /dev/sdb1: not mounted
- ORA-27054 NFS file system where the file is created or resides is not mounted with correct options
- ORA-27054: NFS file system where the file is created or resides is not mounted with correct options
- ORA-27054: NFS file system where the file is created or resides is not mounted with correct options
- ORA-27054: NFS file system where the file is created or resides is not mounted with correct options
- ORA-27054: NFS file system where the file is created or resides is not mounted with correct options
- sqlpus报错"ORA-01033: ORACLE initialization or shutdown in progress",且数据库状态是"ORA-01507: database not m
- ORA-02024: Database Link Not Found [ID 1058949.1]
- ORA-20079: full resync from primary database is not done
- 无法删除DBLINK ORA-02024 database link not found
- python 安装sklearn
- 第十二周项目三(5) 求n的二进制形式
- 第十二周 项目4:任务一 搭框架
- 【Python笔记】如何理解python中的generator functions和yield表达式
- Ascil与unicode区别
- ORA-01507: database not mounted
- 人工智能塑造科幻大片式的未来
- iOS使用滤镜
- javascript变量和数据类型
- 仿照支付宝等——自动获取短信中的验证码
- SVN被锁定的问题
- iOS简单的人脸识别
- 最新版的IOS真机测试教程
- Extract Sobel feature from an image