VC client can not log on are redo logs to blame

Source: Internet
Author: User

Environment: vsphere5.5+ Independent Oracle 11G Database

phenomenon: Open vcenter Server console, enter the password after the card in the Welcome interface is not responding, the client will not be able to log in normally.
650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M01/85/45/wKioL1ee4QDRBnqeAAEFBd1mKqo938.jpg "title=" 11.jpg "alt=" Wkiol1ee4qdrbnqeaaefbd1mkqo938.jpg "/>


Normal restart is not possible. Because the VC is the virtual machine for the independent disk can not take a snapshot, the state can not be prepared.



See where The WINDOWS system log discovers that there may be a problem with the hardware.

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/85/45/wKioL1ee4WyxRSvlAAGWme2gTs8177.jpg-wh_500x0-wm_3 -wmp_4-s_3486759964.jpg "title=" 22.jpg "alt=" Wkiol1ee4wyxrsvlaagwme2gts8177.jpg-wh_50 "/>

This is offset and does not represent a problem with the hardware, suspect VC Connection Database has a problem, log-on troubleshooting.
1. Login 11.15.146.2

Look at the database process first, normal.

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/85/45/wKioL1ee4cCjfc0aAAWiUNM6dFU615.jpg-wh_500x0-wm_3 -wmp_4-s_4155794958.jpg "title=" 33.jpg "alt=" Wkiol1ee4ccjfc0aaawiunm6dfu615.jpg-wh_50 "/>

2, Check the database alarm log, found a problem.

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/85/45/wKioL1ee4lWCrpd9AAGg4StEW14432.jpg-wh_500x0-wm_3 -wmp_4-s_2758175400.jpg "title=" 44.jpg "alt=" Wkiol1ee4lwcrpd9aagg4stew14432.jpg-wh_50 "/>


This is actually a more common mistake. This is usually because the log group is toggled when the log is full and is triggered onceCheckpoint,DBWRThe dirty blocks in memory are written to the data file, and the log group is not freed as long as the write is not completed. If the archive mode is turned on, it will be accompanied byARCHthe process of writing an archive. IfRedo Logproduced too fast, whenCPKor the archive has not been completed,LGWRThe rest of the log groups have been filled, and the current log group is writtenRedolog, there will be a conflict at this time,Database will be suspended. And will always write a similar error message to the Alert.log.

Analysis Reason:
The server has three log groups G1, G2, G3. When G1 finished, to write to the G2, this time G1 to archive, but also to carry out checkpoint. Then the other two log groups continue to write. When G2 and G3 all finished, but also to write to G1, but the problem came, G1 has not finished archiving and checkpoint operations. So this will be the police.
Workaround:
Add a few more log groups, and each log group is a bit larger, so you can delay time and leave G1 sufficient time to complete the archive and checkpoint tasks. There will be no error.

Operation Steps:

First look at the log group status of the next database

To view the online log group: Sql> select * from V$log;

to view members in a log group: Sql> select * from V$logfile;

to view the specific status of a log group: Sql> select Group#,sequence#,bytes,members,status from V$log;

group# sequence# BYTES Members STATUS

------------------------------------------------

1 28825 52428800 1 INACTIVE

2 28826 52428800 1 INACTIVE

3 28827 52428800 1 Current

Log only 50M too small

Expand the size of the log group

sql> ALTER DATABASE Add logfile Group 4 ('/u01/app/oracle/oradata/pvdb/redo04.log ') size 500M;

Database altered.

sql> ALTER DATABASE Add logfile Group 5 ('/u01/app/oracle/oradata/pvdb/redo05.log ') size 500M;

Database altered.

sql> ALTER DATABASE Add logfile Group 6 ('/u01/app/oracle/oradata/pvdb/redo06.log ') size 500M;

Database altered.


Toggle Log Group


sql> alter system switch logfile;

System altered.

sql> alter system switch logfile;

System altered.


NOTE: Alter SYSTEM switch logfile and alter system archive log current are the differences between the two switches.

The alter system switch logfile is not waiting for the archive to complete on the switch logfile. If database has not yet turned on archive log mode. There's no doubt about that switch. In addition, log switching is performed on the current instance in single-instance database and RAC mode.

The Alter system archive log current needs to wait for the archive to complete before switch logfile. Log switching is performed on all instances.

On the whole, the two commands produce almost the same result in an automated archive. The difference is that the ALTER system archive log current takes longer than the alter system switch logfile.


Delete a log group


sql> ALTER DATABASE drop logfile group1;

Database altered.

sql> ALTER DATABASE drop logfile group2;

Database altered.

sql> ALTER DATABASE drop logfile Group3;

Database altered.


Note Delete log groups and log group members:

Principle: The following principles must be observed before deletion, each instance must have at least two log groups, when a group is in active or current state, can not be deleted; The operation to delete a log group only changes the database, the operating system's files have not been deleted, and the drop LOGFILE is applied when deleted. Group N statement, all members within group N will be deleted at this time.

ALTER DATABASE DROP LOGFILE GROUP N;

The principle of deleting log Members: You cannot delete a member when you delete the last member of the group, you cannot delete the members when the group's turntable is in the current state, and in archive mode, it must be archived before it can be deleted; the actions of deleting log group members only make changes to the database. The operating system's files have not been deleted.

Delete the log group before deleting the log file, for example Redo01.log

Sql>!rm/u01/app/oracle/oradata/pvdb/redo01.log


sql> alter system switch logfile;

System altered.


Sql> selectgroup#,sequence#,bytes,members,status from V$log;

group# sequence# BYTES Members STATUS

------------------------------------------------

4 28828 524288000 1 INACTIVE

5 28829 524288000 1 ACTIVE

6 28830 524288000 1 Current


After the final cut log Group, observe the new redo log group has been applied, the database is normal, the database log no alarm, problem resolution.

This article from "Hollows Jie Sun" blog, reproduced please contact the author!

VC client can not log on are redo logs to blame

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.