ORA-01109: database not open
oracle@ria1:~> cd $ORACLE_HOME/dbs
oracle@ria1:~/product/10.2/db_1/dbs> ls
cms_data.dbf initdw.ora inittmorcl.ora orapwtmorcl sqlnet.log
hc_tmorcl.dat init.ora lkTMORCL spfiletmorcl.ora
oracle@ria1:~/product/10.2/db_1/dbs> fuser -u lkTMORCL
lkTMORCL: 4380(oracle) 4382(oracle) 4384(oracle) 4386(oracle) 4388(oracle) 4390(oracle) 4392(oracle) 4394(oracle) 4396(oracle) 4398(oracle) 4400(oracle) 4408(oracle) 4410(oracle) 4412(oracle)
oracle@ria1:~/product/10.2/db_1/dbs> fuser -k lkTMORCL
lkTMORCL: 4380 4382 4384 4386 4388 4390 4392 4394 4396 4398 4400 4408 4410 4412
oracle@ria1:~/product/10.2/db_1/dbs> sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on 星期二 11月 3 20:05:28 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> conn /as sysdba
SQL> startup
ORACLE instance started.
Total System Global Area 1677721600 bytes
Fixed Size 1219760 bytes
Variable Size 402654032 bytes
Database Buffers 1258291200 bytes
Redo Buffers 15556608 bytes
Database mounted.
Database opened.
# 转: https://blog.csdn.net/cjj134679/article/details/100250607
[oracle@orcl dbs]$ ll
total 28
-rw-rw----. 1 oracle oinstall 1544 Feb 29 12:27 hc_ORCL01.dat
-rw-rw----. 1 oracle oinstall 1544 Feb 29 13:35 hc_orcl.dat
-rw-r--r--. 1 oracle oinstall 2851 May 15 2009 init.ora
-rw-r-----. 1 oracle oinstall 2031 Feb 29 12:01 initorcl.ora
-rw-r-----. 1 oracle oinstall 24 Feb 29 11:48 lkORCL
-rw-r-----. 1 oracle oinstall 1536 Feb 29 11:50 orapwORCL01
-rw-r-----. 1 oracle oinstall 2560 Feb 29 12:28 spfileORCL01.ora
[oracle@orcl dbs]$ fuser -u lkORCL
/work/oracle/product/11.2.0/dbs/lkORCL: 6097(oracle) 6103(oracle) 6107(oracle) 6111(oracle) 6113(oracle) 6115(oracle) 6117(oracle) 6119(oracle) 6121(oracle) 6123(oracle) 6125(oracle)
[oracle@orcl dbs]$ fuser -k lkORCL
/work/oracle/product/11.2.0/dbs/lkORCL: 6097 6103 6107 6111 6113 6115 6117 6119 6121 6123 6125
# 如果报错,-bash: fuser: command not found ,就 yum -y install psmisc
# 执行成功后记得重启数据库才能使配置生效
[oracle@orcl dbs]$ sql
SQL*Plus: Release 11.2.0.4.0 Production on Sat Feb 29 13:46:40 2020
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> create user lxcx identified by lxcx;
create user lxcx identified by lxcx
*
ERROR at line 1:
ORA-01109: database not open
SQL> startup
ORA-01081: cannot start already-running ORACLE - shut it down first
SQL> shutdown
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 1286066176 bytes
Fixed Size 2252904 bytes
Variable Size 402657176 bytes
Database Buffers 872415232 bytes
Redo Buffers 8740864 bytes
Database mounted.
Database opened.
SQL> create user lxcx identified by lxcx;
User created.
-bash: fuser: command not found
yum -y install psmisc