sqlplusで「アイドル・インスタンスに接続しました。」になった時

[oracle@oracle_db ~]$
[oracle@oracle_db ~]$ sqlplus /NOLOG

SQL*Plus: Release 12.1.0.2.0 Production on 火 2月 7 11:22:02 2023

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

SQL> connect as sysdba
ユーザー名を入力してください: sys
パスワードを入力してください:
アイドル・インスタンスに接続しました。
SQL>
SQL> select sysdate from dual;
select sysdate from dual
*
行1でエラーが発生しました。:
ORA-01034: ORACLE not available
プロセスID: 0
セッションID: 0、シリアル番号: 0

[oracle@oracle_db bin]$
[oracle@oracle_db bin]$ echo $ORACLE_HOME
/u01/app/oracle//product/12.1.0/dbhome_1
[oracle@oracle_db bin]$
[oracle@oracle_db bin]$ echo $ORACLE_SID
xxx
[oracle@oracle_db bin]$
[oracle@oracle_db bin]$ cat ~/.bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

export ORACLE_BASE=/u01/app/oracle/
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/dbhome_1
export NLS_LANG=Japanese_Japan.AL32UTF8
export ORACLE_SID=xxx

PATH=$PATH:$HOME/.local/bin:$HOME/bin

#export PATH

export PATH=$ORACLE_HOME/bin:$PATH
[oracle@oracle_db bin]$
[oracle@oracle_db bin]$ vi ~/.bash_profile
[oracle@oracle_db bin]$
[oracle@oracle_db bin]$ cat ~/.bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/dbhome_1
export NLS_LANG=Japanese_Japan.AL32UTF8
export ORACLE_SID=sis

PATH=$PATH:$HOME/.local/bin:$HOME/bin

#export PATH

export PATH=$ORACLE_HOME/bin:$PATH
[oracle@oracle_db bin]$
[oracle@oracle_db bin]$ echo $ORACLE_HOME
/u01/app/oracle//product/12.1.0/dbhome_1
[oracle@oracle_db bin]$
[oracle@oracle_db bin]$ source ~/.bash_profile
[oracle@oracle_db bin]$
[oracle@oracle_db bin]$ echo $ORACLE_HOME
/u01/app/oracle/product/12.1.0/dbhome_1
[oracle@oracle_db bin]$
[oracle@oracle_db bin]$ sqlplus /NOLOG

SQL*Plus: Release 12.1.0.2.0 Production on 火 2月 7 11:31:17 2023

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

SQL> connect as sysdba
ユーザー名を入力してください: sys
パスワードを入力してください:
接続されました。
SQL>
SQL>
SQL> select systimestamp from dual;

SYSTIMESTAMP
---------------------------------------------------------------------------
23-02-07 11:34:26.157777 +08:00

SQL>
 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值