Droping Logfile Group Failed


 

How to drop a log file group that is being the current logfile group?
I have 4 groups. In that I want to drop one group and that group is the active one.
If I drop that group it is telling that it is the current group.
If I try to switch logfile it is telling that database is not open.

----->
Have you use the SYS user to start the database ?

SQL> conn sys/<password> as sysdba
connected to an idle instance
SQL> startup

----->
In mount stage I want to drop it.

----->
In mount stage you can drop non-current log group but cannot drop or switch current log group.

----->
1. You must have at- least two online groups.
2. You can not drop a active online active redo log group.
3. If it active switch it by alter system switch logfile before dropping.
3. make sure that online redo log group is archived ( if archiving is enabled).
Syntax :- Alter database drop logfile group <group no>.

----->
Open the database
switch logfile.
drop the logfile

Why do you want to drop the logfile only on mount stage??

----->
There was some problem with the logfile while opening the database.   So to rectify that I need to drop that group.
Database is not starting.. If it get started then I would have used switch log file command then I would have droped it.
Since it is not starting I am forced to drop it in mount stage.

Since the log file is the current log then in mount stage switch log file is not working.
So what I did I recreated control file.  Now it is working

----->
Well if the problem has been solved, No issues.
But the appropriate solution would have been:

Alter database clear unarchived logfile group < group number>;

----->
My database is in no archivelog mode.. will it work....

Moreover suppose if it is in archivelog mode then

If we clare the logfile group will it clear the data or will it move the data to the logfiles... and what effect will be there if the database is in archivelog mode? Like dataloss?

----->
This statement is to be used only when the current logfile has became corrupt and cannot be dropped.It will simply clear the contents and will not copy them any other log group

ALTER DATABASE CLEAR LOGFILE GROUP <group_number>;
Use this for noarchivelog mode

ALTER DATABASE CLEAR UNARCHIVED LOGFILE GROUP <group_number>;

Use this verison of clearing a log file if the corrupt log file has not been archived

----->
I have a question how does creating a new control file , solves the problem as the new control file will be pointing to the current logfile which has the problem

----->
In the new control which I created in the trace file I edited and droped the logfile which is giving problem and then assigend the new control file to the database.

Have a Oracle Question
Do you have an Oracle Question?

Oracle Books
Oracle Certification, Database Administration, SQL, Application, Programming Reference Books

Oracle Application
Oracle Application Hints and Tips

Oracle Home
Oracle Database, SQL, Application, Programming Tips

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.
The site www.erpgreat.com is not affiliated with or endorsed by any company listed at this site.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
 The content on this site may not be reproduced or redistributed without the express written permission of
www.erpgreat.com or the content authors.