469,304 Members | 1,888 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,304 developers. It's quick & easy.

ORA-01219: database not open

I am working on Oracle database 10G. My database was working fine till last night but today when i tryed to connect, it was showing me following error:
ORA-01219: database not open: queries allowed on fixed tables/views only

So I did the following steps from command prompt:

Expand|Select|Wrap|Line Numbers
  1. C:\>sqlplus
  2.  
  3. SQL*Plus: Release 10.2.0.3.0 - Production on Thu Jul 7 10:49:58 2011
  4.  
  5. Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.
  6.  
  7. Enter user-name: / as sysdba
  8.  
  9. Connected to:
  10. Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
  11. With the Partitioning, OLAP and Data Mining options
  12.  
  13. SQL> shutdown abort
  14. ORACLE instance shut down.
  15. SQL> startup
  16. ORACLE instance started.
  17.  
  18. Total System Global Area  251658240 bytes
  19. Fixed Size                  1289964 bytes
  20. Variable Size             163578132 bytes
  21. Database Buffers           79691776 bytes
  22. Redo Buffers                7098368 bytes
  23. Database mounted.
  24. ORA-01157: cannot identify/lock data file 7 - see DBWR trace file
  25. ORA-01110: data file 7: 'C:\ORACLE\TABLE_SPACES\SWT_TBLSPC'
  26.  
  27.  
  28.  
  29. SQL> select * from dba_users;
  30. select * from dba_users
  31.               *
  32. ERROR at line 1:
  33. ORA-01219: database not open: queries allowed on fixed tables/views only
  34.  
  35.  
  36. SQL> select open_mode from v$database;
  37.  
  38. OPEN_MODE
  39. ----------
  40. MOUNTED
  41.  
  42.  
Then I tried to open the database but I got errors:

Expand|Select|Wrap|Line Numbers
  1. SQL> alter database open;
  2. alter database open
  3. *
  4. ERROR at line 1:
  5. ORA-01157: cannot identify/lock data file 7 - see DBWR trace file
  6. ORA-01110: data file 7: 'C:\ORACLE\TABLE_SPACES\SWT_TBLSPC'
  7.  
  8.  
  9.  
I checked this path but it is not available physically

Expand|Select|Wrap|Line Numbers
  1. SQL> recover database until cancel;
  2. ORA-00283: recovery session canceled due to errors
  3. ORA-01110: data file 7: 'C:\ORACLE\TABLE_SPACES\SWT_TBLSPC'
  4. ORA-01157: cannot identify/lock data file 7 - see DBWR trace file
  5. ORA-01110: data file 7: 'C:\ORACLE\TABLE_SPACES\SWT_TBLSPC'
  6.  
So, what is the problem?
may someone explaine and fix this problem?

regards
Osman
Jul 7 '11 #1
4 28827
rski
700 Expert 512MB
What changed since the last time oracle started successfuly?
Did you remove manually or rename any oracle files?
Does the file C:\ORACLE\TABLE_SPACES\SWT_TBLSPC exist?


If you or somebody removed that file a dn you are sure it is not needed you can try below
Expand|Select|Wrap|Line Numbers
  1. alter database datafile 7 offline drop;
  2. alter database open;
  3.  
Jul 11 '11 #2
I'm not sure if there is any changes for oracle files.
The file C:\ORACLE\TABLE_SPACES\SWT_TBLSPC does not exist.

this file was not important
So I executed the statements above, and the problem has been solved.

But I have a question, what is the solution for this problem if I need the deleted file?

THANKS.
Jul 11 '11 #3
rski
700 Expert 512MB
If you need the deleted file you will have to recover data backup.
Jul 11 '11 #4
Thanks alot rski for your help.

osman.
Jul 13 '11 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Adam Ruth | last post: by
6 posts views Thread by bdj | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.