Home » RDBMS Server » Server Administration » Can't login using sqlplus (Oracle 11 (64), Fedora 15)
Can't login using sqlplus [message #511369] Sun, 12 June 2011 07:48 Go to next message
gruszczy
Messages: 7
Registered: June 2011
Junior Member
When I run sqlplus and try to loging as system/<admin passwd> I get information:


ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
Process ID: 0
Session ID: 0 Serial number: 0



I understand, that this is a common question and the common answer is don't have trailing slash in ORACLE_HOME and set ORACLE_SID. But I did this.


export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
export PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_SID=XE
export LD_LIBRARY_PATH=$ORACLE_HOME/lib



What else I might be doing wrong?
Re: Can't login using sqlplus [message #511372 is a reply to message #511369] Sun, 12 June 2011 08:02 Go to previous messageGo to next message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
The most common answer is "Did you start the instance?"

Regards
Michel
Re: Can't login using sqlplus [message #511373 is a reply to message #511372] Sun, 12 June 2011 08:06 Go to previous messageGo to next message
gruszczy
Messages: 7
Registered: June 2011
Junior Member
I am pretty new to Oracle, so please be patient with me.

Inside my application I have 'Start Database' application, with which I assume I start the database. When some time ago I was using it in Ubuntu 10.10 (32) this was enough to start the database. So this I have done. Also when I hist Get Started I am redirected to: localhost:8090/apex/f?p=4950 (I have set port to 8090 during configuration), but nothing is displayed.

Is it enough to have the database running? What other diagnostics can I do to find out the problem?
Re: Can't login using sqlplus [message #511390 is a reply to message #511373] Sun, 12 June 2011 10:49 Go to previous messageGo to next message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
Inside my application I have 'Start Database' application, with which I assume I start the database.

WE can't assume that.

Copy and paste:
sqlplus / as sysdba
alter session set nls_date_format='DD/MM/YYYY HH24:MI:SS';
select name, open_mode, database_role from v$database;
select instance_name, startup_time, status, logins, database_status, active_state from v$instance;


Regards
Michel

Re: Can't login using sqlplus [message #511394 is a reply to message #511390] Sun, 12 June 2011 11:21 Go to previous messageGo to next message
gruszczy
Messages: 7
Registered: June 2011
Junior Member
I can't do sqlplus / as sysdba from my regular account (I was able to do this, when I was using Ubuntu). I changed account to Oracle and:


bash-4.2$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Beta on Sun Jun 12 18:20:15 2011

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

Connected to an idle instance.

SQL> alter session set nls_date_format='DD/MM/YYYY HH24:MI:SS';
alter session set nls_date_format='DD/MM/YYYY HH24:MI:SS'
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0


I understand this means, that Oracle is not started. Any idea why running 'Start Database' didn't work and what can I do to get it working?
Re: Can't login using sqlplus [message #511395 is a reply to message #511394] Sun, 12 June 2011 11:25 Go to previous messageGo to next message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
The instance is not started.
sqlplus / as sysdba
startup

then the other commands.

Quote:
Any idea why running 'Start Database' didn't work and what can I do to get it working?

I don't know this is your application.

Regards
Michel
Re: Can't login using sqlplus [message #511396 is a reply to message #511395] Sun, 12 June 2011 11:26 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
sqlplus
/ as sysdba
startup
exit
Re: Can't login using sqlplus [message #511399 is a reply to message #511396] Sun, 12 June 2011 11:46 Go to previous messageGo to next message
gruszczy
Messages: 7
Registered: June 2011
Junior Member
Ok, that pushed me a little forward. First I got information about wrong configuration, that it can't connect to HOST=gruszczy-laptop. I couldn't find this entry and change it to localhost, so I edited my /etc/hosts and added gruszczy-laptop there. This helped a little. This is what I got:


SQL> startup
ORACLE instance started.

Total System Global Area  801701888 bytes
Fixed Size		    2230776 bytes
Variable Size		  222299656 bytes
Database Buffers	  574619648 bytes
Redo Buffers		    2551808 bytes
ORA-00205: error in identifying control file, check alert log for more info


SQL> alter session set nls_date_format='DD/MM/YYYY HH24:MI:SS';

Session altered.

SQL> select name, open_mode, database_role from v$database;
select name, open_mode, database_role from v$database
                                           *
ERROR at line 1:
ORA-01507: database not mounted


Now when I try to use sqlplus from my usual account I get: ORA-01033: ORACLE initialization or shutdown in progress

I understand that mounting is a normal step of starting database and it must have failed with this error: ORA-00205: error in identifying control file, check alert log for more info. That's why I don't get proper information.

I have checked /u01/app/oracle/diag/rdbms/xe/XE/alert/log.xml and got this:

<msg time='2011-06-12T18:37:48.618+02:00' org_id='oracle' comp_id='rdbms'
 client_id='' type='UNKNOWN' level='16'
 host_id='gruszczy-laptop' host_addr='127.0.0.1' module=''
 pid='2495'>
 <txt>ORA-00210: cannot open the specified control file
ORA-00202: control file: &apos;/u01/app/oracle/oradata/XE/control.dbf&apos;
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
 </txt>

<msg time='2011-06-12T18:37:48.805+02:00' org_id='oracle' comp_id='rdbms'
 msg_id='opiexe:3036:2780954927' client_id='' type='NOTIFICATION'
 group='admin_ddl' level='16' host_id='gruszczy-laptop'
 host_addr='127.0.0.1' module='sqlplus@gruszczy-laptop (TNS V1-V3)' pid='2514'>
 <txt>ORA-205 signalled during: ALTER DATABASE   MOUNT...
 </txt>
</msg>


But this tells me nothing.
Re: Can't login using sqlplus [message #511400 is a reply to message #511399] Sun, 12 June 2011 11:52 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
how did /u01/app/oracle/oradata/XE/control.dbf file go missing?

What happened between last time DB was OK & now?
Re: Can't login using sqlplus [message #511401 is a reply to message #511400] Sun, 12 June 2011 11:54 Go to previous messageGo to next message
gruszczy
Messages: 7
Registered: June 2011
Junior Member
DB has never been ok. It's a completely fresh install, since I recently switched to Fedora. I installed from the rpm from Oracle website.

Re: Can't login using sqlplus [message #511402 is a reply to message #511401] Sun, 12 June 2011 11:58 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>DB has never been ok. It's a completely fresh install, since I recently switched to Fedora.
To me this is Good News.
Oracle is not certified on Fedora, but it should work OK.
Re-format the disk & try again, again,
Re: Can't login using sqlplus [message #511403 is a reply to message #511402] Sun, 12 June 2011 12:03 Go to previous messageGo to next message
gruszczy
Messages: 7
Registered: June 2011
Junior Member
Re-format the disk? You mean re-install the whole os?
Re: Can't login using sqlplus [message #511413 is a reply to message #511403] Sun, 12 June 2011 17:02 Go to previous message
gruszczy
Messages: 7
Registered: June 2011
Junior Member
I have rerun /etc/init.d/oracle-xe configure and it seems that it created control.dbf properly this time. Now everything works. Thanks a lot for all your help Smile
Previous Topic: identify Tnsnames.ora file
Next Topic: memory issue
Goto Forum:
  


Current Time: Wed May 01 18:29:44 CDT 2024