[oracle@oracle ~]$ imp xxxx/user file=/usr/local/src/666.dmp full=y buffer=40960000

Import: Release 10.2.0.5.0 - Production on Thu Apr 19 14:01:24 2018

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

IMP-00058: ORACLE error 1033 encountered
ORA-01033: ORACLE initialization or shutdown in progressUsername:
Password:

用sqlplus进入到数据库中,查看数据库的状态,发现是nomount模式

SQL> select instance_name ,status from v$instance;

SQL> INSTANCE_NAME    STATUS
---------------- ------------
orcl STARTD

尝试启动数据库

SQL>ALTER DATABASE MOUNT;

结果报错:

ORA-01102: cannot mount database in EXCLUSIVE mode

结果上alert日志里看到了相关的报错:

ALTER DATABASE   MOUNT
Thu Apr 19 14:05:59 CST 2018
sculkget: failed to lock /opt/app/oracle/product/10.2//dbs/lkORCL exclusive
sculkget: lock held by PID: 1745
Thu Apr 19 14:05:59 CST 2018
ORA-09968: unable to lock file
Linux-x86_64 Error: 11: Resource temporarily unavailable
Additional information: 1745
Thu Apr 19 14:05:59 CST 2018
ORA-1102 signalled during: ALTER DATABASE MOUNT...
ORA-09968: unable to lock file
Linux-x86_64 Error: 11: Resource temporarily unavailable

网上找到了相关的解释:

http://blog.itpub.net/12272958/viewspace-716020

metadata这样解释的:

Problem Description:

====================

You are trying to startup the database and you receive the following error:

ORA-01102: cannot mount database in EXCLUSIVE mode

Cause: Some other instance has the database mounted exclusive or shared.

Action: Shutdown other instance or mount in a compatible mode.

Problem Explanation:

====================

A database is started in EXCLUSIVE mode by default. Therefore, the ORA-01102 error is misleading and may have occurred due to one of the following reasons:

- there is still an "sgadef<sid>.dbf" file in the "ORACLE_HOME/dbs"  directory

- the processes for Oracle (pmon, smon, lgwr and dbwr) still exist

- shared memory segments and semaphores still exist even though the

database has been shutdown

- there is a "ORACLE_HOME/dbs/lk<sid>" file

Search Words:

=============

ORA-1102, crash, immediate, abort, fail, fails, migration

Solution Description:

=====================

Verify that the database was shutdown cleanly by doing the following:

1. Verify that there is not a "sgadef<sid>.dbf" file in the directory "ORACLE_HOME/dbs".

% ls $ORACLE_HOME/dbs/sgadef<sid>.dbf  If this file does exist, remove it.

% rm $ORACLE_HOME/dbs/sgadef<sid>.dbf

2. Verify that there are no background processes owned by "oracle"

% ps -ef | grep ora_ | grep $ORACLE_SID

If background processes exist, remove them by using the Unix

command "kill". For example:

% kill -9 <rocess_ID_Number>

3. Verify that no shared memory segments and semaphores that are owned by "oracle" still exist

% ipcs -b

If there are shared memory segments and semaphores owned by "oracle", remove the shared memory segments

% ipcrm -m <Shared_Memory_ID_Number>

and remove the semaphores

% ipcrm -s <Semaphore_ID_Number>

NOTE: The example shown above assumes that you only have one

database on this machine. If you have more than one

database, you will need to shutdown all other databases

before proceeding with Step 4.

4. Verify that the "$ORACLE_HOME/dbs/lk<sid>" file does not exist

5. Startup the instance

Solution Explanation:

=====================

The "lk<sid>" and "sgadef<sid>.dbf" files are used for locking shared memory. It seems that even though no memory is allocated, Oracle thinks memory is still locked. By removing the "sgadef" and "lk" files you remove any knowledge oracle has of shared memory that is in use. Now the database can start.

于是我尝试关闭数据库,

SQL> SHUTDOWN IMMEDIATE;

数据库关闭正常

但是查看后台进程:

发现所有的后台进程还在

ps -ef | grep ora_
oracle 29890 1 0 14:13 ? 00:00:00 ora_pmon_orcl
oracle 29892 1 0 14:13 ? 00:00:00 ora_psp0_orcl
oracle 29894 1 0 14:13 ? 00:00:00 ora_mman_orcl
oracle 29896 1 0 14:13 ? 00:00:07 ora_dbw0_orcl
oracle 29898 1 0 14:13 ? 00:00:05 ora_lgwr_orcl
oracle 29900 1 0 14:13 ? 00:00:00 ora_ckpt_orcl
oracle 29902 1 0 14:13 ? 00:00:00 ora_smon_orcl
oracle 29904 1 0 14:13 ? 00:00:00 ora_reco_orcl
oracle 29906 1 0 14:13 ? 00:00:00 ora_cjq0_orcl
oracle 29908 1 0 14:13 ? 00:00:02 ora_mmon_orcl
oracle 29910 1 0 14:13 ? 00:00:00 ora_mmnl_orcl
oracle 29912 1 0 14:13 ? 00:00:00 ora_d000_orcl
oracle 29914 1 0 14:13 ? 00:00:00 ora_s000_orcl
oracle 29934 1 0 14:13 ? 00:00:00 ora_qmnc_orcl
oracle 29955 1 0 14:13 ? 00:00:00 ora_q000_orcl
oracle 29957 1 0 14:13 ? 00:00:00 ora_q001_orcl
oracle 30268 1 0 14:51 ? 00:00:00 ora_j000_orcl
oracle 30275 30184 0 14:53 pts/1 00:00:00 /bin/bash -c ps -ef | grep ora_
oracle 30277 30275 0 14:53 pts/1 00:00:00 grep ora_

根据上面的博客内容,断定是第二种问题,于是强制kill掉pmon进程

[oracle@oracle ~]$ ps -ef | grep pmon
oracle 29890 1 0 14:13 ? 00:00:00 ora_pmon_orcl
oracle 30282 29844 0 14:55 pts/1 00:00:00 grep pmon
[oracle@oracle ~]$ kill -9 29890

kill掉pmon进程后,所有的进程会慢慢结束关闭,再次查看发现已经全部关闭了

这次再重启数据库

sqlplus / as sysdba
SQL> startup

最后启动成功了,数据库彻底开启

SQL> select instance_name ,status from v$instance;

INSTANCE_NAME    STATUS
---------------- ------------
orcl OPEN

这回再导入数据,发现正常导入

参考:

https://www.cnblogs.com/kerrycode/p/3656655.html

http://blog.itpub.net/12272958/viewspace-716020

【ORA】ORA-01033,ORA-09968,ORA-01102的更多相关文章

  1. 【转】notepad++ 应用学习 -- 列模式,十六进制模式

      Notepad++ 顾名思义,是一个比notepad(Windows下叫记事本)的功能更强的编辑器. 总以为notepad++小巧轻盈,而且开源,要比UE(UltraEdit)好用.因为她支持的视 ...

  2. 【续】抓个Firefox的小辫子,jQuery表示不背这黑锅,Chrome,Edge,IE8-11继续围观中

    引子 昨天我发了一篇文章[抓个Firefox的小辫子,围观群众有:Chrome.Edge.IE8-11],提到了一个Firefox很多版本都存在的问题,而相同的测试页面在Chrome.Edge.IE8 ...

  3. 【开源】C#.NET股票历史数据采集,【附18年历史数据和源代码】

    如果用知乎,可以关注专栏:.NET开源项目和PowerBI社区 重点重点:我没有买股票,没有买股票,股市是个坑,小心割韭菜哦. 本文的初衷是数据分析(分析结果就不说了,就是想看看筛选点数据),只不过搞 ...

  4. 【BZOJ1096】【ZJOI2007】仓库建设(斜率优化,动态规划)

    [BZOJ1096][ZJOI2007]仓库建设(斜率优化,动态规划) 题面 Description L公司有N个工厂,由高到底分布在一座山上.如图所示,工厂1在山顶,工厂N在山脚.由于这座山处于高原 ...

  5. 【BZOJ1030】文本生成器(AC自动机,动态规划)

    [BZOJ1030]文本生成器(AC自动机,动态规划) 题面 BZOJ 题解 超级简单良心送分题 很明显是所有状态-不合法状态 合法状态就是\(26^m\) 不合法状态做一个\(dp\)就好 #inc ...

  6. 【BZOJ4009】接水果(整体二分,扫描线)

    [BZOJ4009]接水果(整体二分,扫描线) 题面 为什么这都是权限题???,洛谷真良心 题解 看到这道题,感觉就是主席树/整体二分之类的东西 (因为要求第\(k\)大) 但是,读完题目之后,我们发 ...

  7. 【BZOJ4872】分手是祝愿(动态规划,数学期望)

    [BZOJ4872]分手是祝愿(动态规划,数学期望) 题面 BZOJ 题解 对于一个状态,如何求解当前的最短步数? 从大到小枚举,每次把最大的没有关掉的灯关掉 暴力枚举因数关就好 假设我们知道了当前至 ...

  8. 【BZOJ2006】超级钢琴(主席树,优先队列)

    [BZOJ2006]超级钢琴(主席树,优先队列) 题面 BZOJ 题解 既然是一段区间 首先就要变成单点 所以求一个前缀和 这个时候贪心很明显了: 枚举每一个点和可以和它组成一段的可行的点 全部丢进一 ...

  9. 【BZOJ3530】数数(AC自动机,动态规划)

    [BZOJ3530]数数(AC自动机,动态规划) 题面 BZOJ 题解 很套路的\(AC\)自动机+\(DP\) 首先,如果长度小于\(N\) 就不存在任何限制 直接大力\(DP\) 然后强制限制不能 ...

  10. 【BZOJ1009】GT考试(KMP算法,矩阵快速幂,动态规划)

    [BZOJ1009]GT考试(KMP算法,矩阵快速幂,动态规划) 题面 BZOJ 题解 看到这个题目 化简一下题意 长度为\(n\)的,由\(0-9\)组成的字符串中 不含串\(s\)的串的数量有几个 ...

随机推荐

  1. Pycharm github登录 Invalid authentication data. Connection refused.

    在github.com前加上 https:// 注意登录时使用的是用户名不是邮箱

  2. MISC-吹着贝斯扫二维码

    题目 [安洵杯 2019]吹着贝斯扫二维码 解压附件,有36个文件和一个压缩包,压缩包带密码和备注 分析 文件类型 随便打开一个不明文件,是jpg图片啊(FF D8 FF) 改一个试试,有一个小块二维 ...

  3. 性能测试工具 jmeter 分布式压力测试实操

    性能测试工具 jmeter 分布式压力测试实操 本文在Non-GUI Mode下进行,准备好三台有jdk环境,linux操作系统,同一局域网测试机器,运行两台slave,一台master机器,进行分布 ...

  4. 2. 使用Shell能做什么

    批处理 在批处理的过程中,能够实现脚步自动化,比GUI自动化速度高效 日常工作场景 服务端测试 移动端测试 持续集成与自动化部署,这是最最场景的场景,可以说离开了shell,持续集成和自动化部署也会遇 ...

  5. HBase按照行键范围删除数据

    #!/bin/bash #TOOL_PATH=$(cd "$(dirname "$0")"; pwd) #TOOL_PATH_TMP=$(cd "$( ...

  6. 2020-2021-1 20209307《Linux内核原理与分析》第七周作业

    这个作业属于哪个课程 <2020-2021-1Linux内核原理与分析)> 这个作业要求在哪里 <2020-2021-1Linux内核原理与分析第七周作业> 这个作业的目标 & ...

  7. wpa_supplicant 检测错误密码

    选好了 wifi ssid,填了密码,生成新配置文件,重启了wpa_supplicant,怎么知道输入的密码对不对,如果不对有什么体现? wpa_supplicant 前台运行时,打印信息中会有: W ...

  8. js上 七、表达式

    (1).什么是表达式 任何有值的内容都是表达式 一个表达式会产生一个值,它可以放在任何需要一个值的地方,比如a=3中的3就是一个表达式,a=3整体也可以作为一个表达式. 常见表达式有如下几种: ü 原 ...

  9. 推荐一款最强Python自动化神器!再也不用写代码了!

    本文的文字及图片来源于网络,仅供学习.交流使用,不具有任何商业用途,如有问题请及时联系我们以作处理 搞过自动化测试的小伙伴,相信都知道,在Web自动化测试中,有一款自动化测试神器工具: seleniu ...

  10. [.NET] - 在Socket编程中遇到的问题总结

    问题1.无法访问已释放的对象. 对象名:"System.Net.Sockets.Socket" 产生这个scenario的原因是程序中的某个地方调用到了socket.close后, ...