[20170112]为什么提示不一样.txt

简介: [20170112]为什么提示不一样.txt --问题链接:http://www.itpub.net/thread-2074643-1-1.html --自己也测试看看: 1.

[20170112]为什么提示不一样.txt

--问题链接:http://www.itpub.net/thread-2074643-1-1.html
--自己也测试看看:

1.环境:
SYS@book> @ &r/ver1
PORT_STRING                    VERSION        BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx            11.2.0.4.0     Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

SYS@book> startup nomount
ORACLE instance started.
Total System Global Area  634732544 bytes
Fixed Size                  2255792 bytes
Variable Size             197133392 bytes
Database Buffers          427819008 bytes
Redo Buffers                7524352 bytes

--本机执行sqlplus sys as sysdba,执行如下:
SYS@book> select * from v$database;
select * from v$database
              *
ERROR at line 1:
ORA-01507: database not mounted

--使用tnsname连接:
$ rlsql sys@book as sysdba
SYS@78> select * from v$database ;
select * from v$database
              *
ERROR at line 1:
ORA-01507: database not mounted

--//很明显我没有这个问题.
--//另外如果使用远程机器连接在nomount状态下要配置静态监听.

2.我再仔细看连接,发现一个细节:
sqlplus sys/a***@hw as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Wed Jan 4 23:52:11 2017
Copyright (c) 1982, 2009, Oracle.  All rights reserved.
Connected to an idle instance.

--//版本11.2.0.1,提示的是Connected to an idle instance.,也就是实例没用启动.相当于在我的机器上执行如下:
$ export ORACLE_SID=book1
$ rlsql
SQL*Plus: Release 11.2.0.4.0 Production on Thu Jan 12 09:37:33 2017
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to an idle instance.
SYS@book1> select * from v$database ;
select * from v$database
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0

3.看到这里问题明白了,一定是ORALCE_HOME定义里面有多余的斜线存在.

--我以前提到11.2.0.4没有斜线的问题,链接:
http://blog.itpub.net/267265/viewspace-2055052/
http://blog.itpub.net/267265/viewspace-1443469/
http://blog.itpub.net/267265/viewspace-1797866/

--//我找来一台11.2.0.3的环境测试看看:

$ echo $ORACLE_HOME
/u01/app/oracle11g/product/11.2.0/db_2
$ export ORACLE_HOME=/u01/app/oracle11g/product/11.2.0/db_2/

$ rlsql
SQL*Plus: Release 11.2.0.3.0 Production on Thu Jan 12 09:43:34 2017
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Connected to an idle instance.
~~~~~~~~~~~~~~~~~~~~~~~~~~~

$ export ORACLE_HOME=/u01/app/oracle11g/product/11.2.0/db_2
$ rlsql
SQL*Plus: Release 11.2.0.3.0 Production on Thu Jan 12 09:44:32 2017
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
--//正常!!关闭数据库,模拟问题:
SYS@test> shutdown immediate ;
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@test> quit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

--//开始模拟问题,先设置环境变量加入斜线,然后启动数据库:
$ export ORACLE_HOME=/u01/app/oracle11g/product/11.2.0/db_2/

$ rlsql
SQL*Plus: Release 11.2.0.3.0 Production on Thu Jan 12 10:22:40 2017
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Connected to an idle instance.

SYS@test> startup nomount
ORACLE instance started.
Total System Global Area 1603411968 bytes
Fixed Size                  2228784 bytes
Variable Size             989859280 bytes
Database Buffers          603979776 bytes
Redo Buffers                7344128 bytes
--启动到nomount状态.

$ rlsql sys@40 as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Thu Jan 12 10:24:51 2017
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Enter password:
Connected to an idle instance.

SYS@40> select * from v$database ;
select * from v$database
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0

$ rlsql
SQL*Plus: Release 11.2.0.3.0 Production on Thu Jan 12 10:25:15 2017
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SYS@test> select * from v$database ;
select * from v$database
              *
ERROR at line 1:
ORA-01507: database not mounted

--OK,模拟出来,问题一定出在你环境变量的定义,多余讨厌的斜线.

目录
相关文章
touch-cat-more命令,touch 命令可以创建文件,touch test.txt创建一个txt文件,ls -l 标识为d,头部显示,行,的就是文件的意思,cat查看文件,more支持翻页q
touch-cat-more命令,touch 命令可以创建文件,touch test.txt创建一个txt文件,ls -l 标识为d,头部显示,行,的就是文件的意思,cat查看文件,more支持翻页q
|
2月前
|
弹性计算 运维 Shell
批量将txt 文件修改为doc 文件
【4月更文挑战第29天】
30 1
os.rename批量修改文件名称报错:[WinError 2] 系统找不到指定的文件的解决方案
os.rename批量修改文件名称报错:[WinError 2] 系统找不到指定的文件的解决方案
os.rename批量修改文件名称报错:[WinError 2] 系统找不到指定的文件的解决方案
|
Python
Python基础-常见问题:访问文件时,提示“PermissionError: [WinError 5] 拒绝访问。: ‘test.txt‘”,怎么办呢?
Python基础-常见问题:访问文件时,提示“PermissionError: [WinError 5] 拒绝访问。: ‘test.txt‘”,怎么办呢?
740 0
|
Shell 关系型数据库 Oracle
[20180302]使用find命令小错误.txt
[20180302]使用find命令小错误.txt --//上午一台机器磁盘空间爆满,腾出磁盘空间顺便清理adump目录文件,再次遇到小问题.做一个记录. --//我使用find遇到的问题还不少,链接:http://blog.
1107 0
|
Oracle 关系型数据库 数据库
[20170628]11g修改用户名.txt
[20170628]11g修改用户名.txt --//昨天看了链接,提到修改用户名: http://www.oratea.com/2017/06/26/oracle-11g%e4%bf%ae%e6%94%b9%e7%94%a8%e6%88%b7%e5%90%8d/ --//自己也测试看看.
954 0
|
运维 Oracle 关系型数据库
[20160604]浅谈出错提示.txt
[20160604]浅谈出错提示.txt --这个问题主要由于上个礼拜正常上班时间遇到的问题,导致整个业务停顿10分钟上下,出错提示"解析URL错误",实际上这个问题我遇到过 --一次,当时不是我解决的,我提交软件组,我记得对方提到1台服务器服务出现问题,重启服务就ok了.
1158 0
[20160111]使用提示no_unnest.txt
[20160111]使用提示no_unnest.txt --今天被人问及这个提示,我记忆使用这个提示,就会出现filter过滤条件.我以前遇到这种语句,一般两者提示都使用看看那个效果好.
755 0
|
关系型数据库 Oracle 测试技术
[20151231]空文件.txt
[20151231]空文件.txt --记录上午工作中一个小错误,忘记存盘,直接调用出现的问题,通过例子来说明: 1.测试环境: SCOTT@test01p> @ ver1 PORT_STRING                    VERSION     ...
597 0