DBCA failing with ORA-01034

I faced this issue while creating database using DBCA in one of the UAT database server. Issue was with just DBCA , I was able to create database manually without any issues.

Each attempt of creating database with DBCA utility was failing with ORA-01034: ORACLE not available.

After putting lots of efforts, I started concentrating on error itself ORA-01034: ORACLE not available. 

What is the possibility of getting ORA-01034 in normal scneario:

  •  Database is down & u r trying execute some sql statement on it

Simple… I am creating my database, means database is not open, & what is the possibility of someone executing any query on my database….

one and only glogin.sql is the culprit.

What Oracle documentation says about glogin.sql

There’s a script in ORACLE_HOME/sqlplus/admin which is called glogin.sql.  This script is automatically run when the user starts SQL*PLUS or uses the Connect command, hence any command added to it will be executed. 

I found following sql was present in glogin.sql:

select name,open_mode from v$database;

After removing all entries from glogin.sql, I was able to create database using DBCA without issues.

..

Hope so this post will be useful for u 🙂

Cheers

Regards,

Adityanath

 

 

 

Advertisements

Create pfile from memory

Many a times situation comes when database initialization parameter file gets accidentally removed or overwritten.

From version 11g Oracle has came up with solution of recreating parameter file from memory if database is up & running.

Oracle already has functionality of creating pfile from spfile & vice-versa. But now with almost similar syntax u can create pfile from memory.


 

SQL> select version from v$instance;
VERSION
----------------
11.2.0.3.0
SQL>
SQL> !pwd
/home/oracle/pfile
SQL> !ls -lrt
total 0
SQL> create pfile='/home/oracle/pfile/initORACLE.ora' from memory;
File created.
SQL> !ls -lrt
total 8
-rw-r--r-- 1 oracle oinstall 6431 Jun 2 21:33 initORACLE.ora
SQL>

Hope so this feature will be useful for you. 🙂

Cheers

Regards,
Adityanath