Unable to connect database ORA-01034 & ORA-27101 with connection string

Source: Internet
Author: User

Unable to connect database ORA-01034 & ORA-27101 with connection string

The operating system is linux as5 and the database is 10 Gb. After the machine is restarted, @ connecct_string cannot be used to connect to the database. You can only use the user/password.

Summary later: this problem occurs when two databases are created again after the existing data is deleted. If you have done similar operations, it is basically the same problem.

The error is as follows:
SQL> conn system/test @ orcl
ERROR:
A ORA-01034: Oracle not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or directory
Check the environment variables and check whether the monitoring status and instance status are normal.
[Oracle @ localhost ~] $ Cat. bash_profile
#. Bash_profile

# Get the aliases and functions
If [-f ~ /. Bashrc]; then
.~ /. Bashrc
Fi

# User specific environment and startup programs

Export TMP =/tmp;
Export TMPDIR = $ TMP;
Export ORACLE_BASE =/usr/oracle;
Export ORACLE_HOME =/usr/oracle/product/10.2.0/db_1;
Export ORACLE_SID = ORCL;
Export ORACLE_TERM = xterm;
Export LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/lib
Export CLASSPATH = $ ORACLE_HOME/JRE: $ ORACLE_HOME/jlib: $ ORACLE_HOME/rdbms/jlib
Export NLS_LANG = AMERICAN_AMERICA.ZHS16GBK
Export PATH = $ PATH: $ ORACLE_HOME/bin:/sbin:/usr/bin:/usr/sbin;
Umask 022
[Oracle @ localhost ~] $ Lsnrctl status

LSNRCTL for Linux: Version 10.2.0.4.0-Production on 31-OCT-2011 11:57:36

Copyright (c) 1991,200 7, Oracle. All rights reserved.

Connecting to (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1 )))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.4.0-Production
Start Date 31-OCT-2011 11:43:36
Uptime 0 days 0 hr. 14 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File/usr/oracle/product/10.2.0/db_1/network/admin/listener. ora
Listener Log File/usr/oracle/product/10.2.0/db_1/network/log/listener. log
Listening Endpoints Summary...
(DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (KEY = EXTPROC1 )))
(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = 192.168.2.4) (PORT = 1521 )))
Services Summary...
Service "orcl" has 1 instance (s ).
Instance "orcl", status UNKNOWN, has 1 handler (s) for this service...
The command completed successfully
[Oracle @ localhost ~] $ Sqlplus/nolog

SQL * Plus: Release 10.2.0.4.0-Production on Mon Oct 31 11:57:39 2011

Copyright (c) 1982,200 7, Oracle. All Rights Reserved.

SQL> conn system/test
Connected.
SQL> conn system/test @ orcl
ERROR:
A ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or directory


Warning: You are no longer connected to ORACLE.

After searching on the network, you can find that local_listener is set.

SQL> conn/as sysdba
Connected.
SQL> show parameter local_listener;
SQL> show parameter local;

NAME TYPE VALUE
-----------------------------------------------------------------------------
Local_listener string
Log_archive_local_first boolean TRUE

SQL> alter system set local_listener = '(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.2.4) (PORT = 1521) (SID = ORCL ))';

System altered.

SQL> alter system register;

System altered.

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0-Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[Oracle @ localhost admin] $ sqlplus system/test @ orcl

SQL * Plus: Release 10.2.0.4.0-Production on Mon Oct 31 12:13:17 2011

Copyright (c) 1982,200 7, Oracle. All Rights Reserved.


Connected:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0-Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>
-The End-

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.