Oracle RAC 註冊資料庫Sqlplus無法識別

來源:互聯網
上載者:User

系統內容:

作業系統:RedHat EL55

Oracle : Oracle 11.2.0.1.0

叢集軟體:Oracle GI 11.2.0.1.0

錯誤現象:

[oracle@node1 ~]$ srvctl add database -d stddb -o /u01/app/oracle/product/11.2.0/db_1/ -n cuug

[oracle@node1 ~]$ srvctl add instance -d stddb -i stddb1 -n node1

[oracle@node1 ~]$ srvctl add instance -d stddb -i stddb2 -n node2

[oracle@node1 ~]$ srvctl config database -d stddb

Database unique name: stddb

Database name: cuug

Oracle home: /u01/app/oracle/product/11.2.0/db_1/

Oracle user: oracle

Spfile:

Domain:

Start options: open

Stop options: immediate

Database role: PRIMARY

Management policy: AUTOMATIC

Server pools: stddb

Database instances: stddb1,stddb2

Disk Groups:

Services:

Database is administrator managed

[oracle@node1 ~]$

通過crs啟動資料庫:

[oracle@node1 ~]$ srvctl start database -d stddb

[oracle@node1 admin]$ sqlplus '/as sysdba'

SQL*Plus: Release 11.2.0.1.0 Production on Wed May 21 19:09:19 2014

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

Connected to an idle instance.

通過sqlplus串連Instance:


[oracle@node1 admin]$ sqlplus sys/oracle@stddb as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Wed May 21 19:09:09 2014

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production

With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,

Data Mining and Real Application Testing options

SQL> select instance_name,status from gv$instance;

INSTANCE_NAME    STATUS

---------------- ------------

stddb1          OPEN

stddb2          OPEN

[oracle@node1 admin]$ sqlplus '/as sysdba'

SQL*Plus: Release 11.2.0.1.0 - Production on Thu May 22 16:24:20 2014

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

Connected to an idle instance.

盡然串連的是idle的instance

解決方案:

[oracle@node1 ~]$ srvctl add database -d stddb -o $ORACLE_HOME -n cuug

將Oracle軟體包的主目錄換成變數!

[oracle@node1 ~]$ srvctl add instance -d stddb -i stddb1 -n node1

[oracle@node1 ~]$ srvctl add instance -d stddb -i stddb2 -n node2

[oracle@node1 ~]$ srvctl start database -d stddb

[oracle@node1 ~]$ sqlplus '/as sysdba'

SQL*Plus: Release 11.2.0.1.0 Production on Wed May 21 19:18:37 2014

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production

With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,

Data Mining and Real Application Testing options

SQL> select instance_name,status from gv$instance;

 


INSTANCE_NAME    STATUS

---------------- ------------

stddb1          OPEN

stddb2          OPEN

[oracle@node2 admin]$ export ORACLE_SID=stddb2

[oracle@node2 admin]$ sqlplus '/as sysdba'

SQL*Plus: Release 11.2.0.1.0 Production on Wed May 21 19:19:53 2014

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production

With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,

Data Mining and Real Application Testing options

@至此,問題解決!

Oracle使用者密碼包含特殊字元導致sqlplus無法正常登入解決

rlwrap - 解決Linux下SQLPLUS退格、上翻鍵亂碼問題

SQLPLUS spool 到動態記錄檔名

Oracle SQLPLUS提示符設定

通過設定SQLPLUS ARRAYSIZE(行預取)加快SQL返回速度

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.