Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oracle not available ora-01034

I am trying to create to connect with oracle sqlplus. When I login with:

User: sys as sysdba
Pass:

It says Connected to an idle instance.

And when I try to create a table, it gives the error

ORA-01034: Oracle not available
Process ID: 0
Session ID: 0 Serial number: 0

Why is it not creating the table?

like image 241
user1889200 Avatar asked Dec 12 '22 19:12

user1889200


1 Answers

First - and most importantly:

Only use the SYS account for DBA work. Never use it for "regular" work (e.g. creating tables) - use a dedicated regular user account for that.

Secondly: "connected to an idle instance" means Oracle was not started. So as you are already connected as sysdba (again: which you should only do for DBA tasks) you need to start Oracle using the command

startup

in SQL*Plus.

Then log off, log in with a regular user and create your table.

For details see the manual:

  • Startup Command
  • Administrator's Guide
like image 161
a_horse_with_no_name Avatar answered Dec 28 '22 07:12

a_horse_with_no_name