The simple solution is:
Sol I:
Login the data base using the sys user, this user is powerful enough to login even the above error occurs (you get an warning message at the time of login- click ok and proceed )
and then type the following query and run it
alter database open
and commit the transaction.
Sol II:
Do the following things
Executed command no & o/p are listed here.
1- SQL> shutdown abort
O/P- ORACLE instance shut down.
2- SQL> start database step by step
O/P- SP2-0310: unable to open file "database.sql"
3- SQL> startup nomount
ORACLE instance started.
Total System Global Area 118255568 bytes
Fixed Size 282576 bytes
Variable Size 83886080 bytes
Database Buffers 33554432 bytes
Redo Buffers 532480 bytes
4- SQL> alter database mount;
Database altered.
5- SQL> alter database open;
OR IF YOU DONT EVEN REMEMBER THE SYS USER PASSWORD, THEN GO TO RUN AND EXECUTE THE FOLLOWING COMMANDS..........
1)
C:\>cd oracle
C:\oracle>
2)C:\oracle>cd ora92
C:\oracle\ora92>cd bin
C:\oracle\ora92\bin>set ORACLE_SID=OID
C:\oracle\ora92\bin>set ORACLE_HOME=C:\Oracle\ora92
3)C:\oracle\ora92\bin>sqlplus /nolog
4)SQL> connect / as sysdba
Connected.
Now you have logged in into the sys user.
And now run this query- Alter database open;
now your database gets opened and now you can login into the database.
SQL>
note: In few systems only 1st step is enough and after that go with the 4th step as :C:\oracle>sqlplus /nolog.

After login into the sysadmin, if you dont remember the users or schema names, then run the following query to list all the user names
ReplyDelete"SELECT username, password FROM DBA_USERS;"