Skip to content

Instantly share code, notes, and snippets.

@appikonda
Last active February 11, 2020 23:32
Show Gist options
  • Save appikonda/b76dc86929e5f4dd0aca186cead12bce to your computer and use it in GitHub Desktop.
Save appikonda/b76dc86929e5f4dd0aca186cead12bce to your computer and use it in GitHub Desktop.
Oracle DB issues

Resolve ORA-011033: ORACLE initialization or shutdown in progress


sqlplus "sys as sysdba"


SQL> select status, database_status from v$instance;

STATUS       DATABASE_STATUS
------------ -----------------
MOUNTED      ACTIVE


SQL> startup mount

ORACLE Instance started

SQL> recover database 

Media recovery complete

SQL> alter database open;

Database altered


SQL> select status, database_status from v$instance
  2  ;

STATUS       DATABASE_STATUS
------------ -----------------
OPEN         ACTIVE


Error report - ORA-01658: unable to create INITIAL extent for segment in tablespace DATA_TS

SQL> SELECT
   a.tablespace_name,
   a.file_name,
   a.bytes allocated_bytes,
   b.free_bytes
FROM
   dba_data_files a,
   (SELECT file_id, SUM(bytes) free_bytes
    FROM dba_free_space b GROUP BY file_id) b
WHERE
   a.file_id=b.file_id
ORDER BY
   a.tablespace_name;  
 
SQL> ALTER DATABASE DATAFILE  '/tmp/system02.dbf' AUTOEXTEND ON;

Database altered.

SQL> ALTER DATABASE DATAFILE  '/tmp/system02.dbf' RESIZE 25M;

Database altered.

SQL> 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment