⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ch16.htm

📁 Teach yourself Oracle8 in 21 day
💻 HTM
📖 第 1 页 / 共 5 页
字号:

<UL>
	<LI>Time allotted for the backup
	<P>
	<LI>Amount of data to be backed up
	<P>
	<LI>Speed of the backup device(s)
	<P>
	<LI>System downtime allotted for backups (if any)
	<P>
	<LI>Off hours (if no downtime allotted)
	<P>
	<LI>Performance degradation allowed
</UL>

<P>These factors and others will affect the backup strategy. They must be measured
against the main goals of the backup process, which include

<UL>
	<LI>Protecting the database by having a current backup.
	<P>
	<LI>Reducing the time necessary to recover.<BR>
	<BR>
	
	<LI>Affecting the performance of the system as little as possible.
</UL>

<P>By putting together all these factors, you should be able to come up with a backup
strategy that meets as many of these requirements as possible.


<BLOCKQUOTE>
	<P>
<HR>
<FONT COLOR="#000077"><B>NOTE:</B></FONT><B> </B>It is unlikely that you will be
	able to meet all the goals of a backup strategy. Do your best to come up with the
	best compromises you can. 
<HR>


</BLOCKQUOTE>

<H3><FONT COLOR="#000077"><B>When and What to Back Up</B></FONT></H3>
<P>Scheduling backups is usually not a very easy task. Backups should be taken often
enough to protect the system's data from loss, yet should not interfere with normal
business operations. Depending on the size of the data that needs to be backed up
and the operational schedule of your business, you might choose different options.
The options vary, depending on which type of operation your business runs:

<UL>
	<LI>5x8 Operation: This term designates a business whose corporate data must be available
	5 days a week, 8 hours a day.<BR>
	<BR>
	
	<LI>7x24 Operation: This term designates a business whose corporate data must be
	available 7 days a week, 24 hours a day. No downtime is allowed.
</UL>

<P>Each of these types of operation has different backup needs, depending on the
type of data and the frequency of modifications to that data. Let's look at those
cases.
<H4><FONT COLOR="#000077"><B>Scheduling Backups in a 5</B>x<B>8 Shop</B></FONT></H4>
<P>Scheduling backups is a little easier in a 5x8 shop because there is plenty of
time when the system need not be available to the users and can be backed up without
disturbing them. The frequency of the backups in this type of operation can depend
in some part on the activity in the database. Here are some guidelines that might
help you determine your backup schedule:</P>
<P><BR>

<TABLE BORDER="0">
	<TR ALIGN="LEFT" rowspan="1">
		<TD ALIGN="LEFT"><B><I>Type of database or operation</I></B></TD>
		<TD ALIGN="LEFT"><B><I>When to back up</I></B></TD>
	</TR>
	<TR ALIGN="LEFT" rowspan="1">
		<TD ALIGN="LEFT">Small database</TD>
		<TD ALIGN="LEFT">For a small database, perform a full offline backup every night. This will offer
			the most protection possible for your data.</TD>
	</TR>
	<TR ALIGN="LEFT" rowspan="1">
		<TD ALIGN="LEFT">Large database</TD>
		<TD ALIGN="LEFT">If the database is very large, perform a full offline backup every weekend and incremental
			backups during the week.</TD>
	</TR>
	<TR ALIGN="LEFT" rowspan="1">
		<TD ALIGN="LEFT">Active tablespaces</TD>
		<TD ALIGN="LEFT">If certain tablespaces are very active, target them for tablespace backups as often
			as possible.</TD>
	</TR>
	<TR ALIGN="LEFT" rowspan="1">
		<TD ALIGN="LEFT">Structural changes</TD>
		<TD ALIGN="LEFT">Any time a structural change is made to the database, you should perform a full offline
			backup.</TD>
	</TR>
	<TR ALIGN="LEFT" rowspan="1">
		<TD ALIGN="LEFT">Unrecoverable operations</TD>
		<TD ALIGN="LEFT">Any time unrecoverable operations are performed on the database, a full offline backup
			should be done.</TD>
	</TR>
	<TR ALIGN="LEFT" rowspan="1">
		<TD ALIGN="LEFT"><TT>RESETLOGS</TT></TD>
		<TD ALIGN="LEFT">Anytime that you have to reset the redo logs with the <TT>RESETLOGS</TT> command,
			you should perform a full offline backup.</TD>
	</TR>
	<TR>
		<TD ALIGN="LEFT">Recover until</TD>
		<TD ALIGN="LEFT">Any time you have recovered with the Recover until option, you should perform a full
			offline backup.</TD>
	</TR>
	<TR>
		<TD>Archive log files</TD>
		<TD>Every night or every few nights, back up the archive log files. The frequency depends
			on the number of archive log files created every day.</TD>
	</TR>
</TABLE>
</P>
<P>Remember, these are just guidelines. Your specific situation will determine how
to create an effective backup strategy for your system.
<H4><FONT COLOR="#000077"><B>Scheduling Backups in a 7</B>x<B>24 Shop</B></FONT></H4>
<P>It is much more difficult to plan a backup strategy in a 7x24 shop because there
is never a time when the system is not in use. Whenever you perform the backups,
there will be one or more people who might be inconvenienced by a performance drop.
Remember, backups do tend to affect performance.</P>
<P>The frequency and type of backups will be influenced by the activity of the system.
Here are some guidelines that might help you determine your backup schedule: <BR>
<BR>

<TABLE BORDER="0">
	<TR ALIGN="LEFT" rowspan="1">
		<TD ALIGN="LEFT" VALIGN="TOP"><B><I>Type of database or operation</I></B></TD>
		<TD ALIGN="LEFT" VALIGN="TOP"><B><I>When to back up</I></B></TD>
	</TR>
	<TR>
		<TD ALIGN="LEFT" VALIGN="TOP">Small database</TD>
		<TD ALIGN="LEFT" VALIGN="TOP">If the database is small, perform a full online backup every night. This will offer
			the most protection possible for your data.</TD>
	</TR>
	<TR ALIGN="LEFT" rowspan="1">
		<TD ALIGN="LEFT" VALIGN="TOP">Large database</TD>
		<TD ALIGN="LEFT" VALIGN="TOP">If the database is very large, perform a full online backup every weekend and incremental
			online backups during the week.</TD>
	</TR>
	<TR ALIGN="LEFT" rowspan="1">
		<TD ALIGN="LEFT" VALIGN="TOP">Very large database</TD>
		<TD ALIGN="LEFT" VALIGN="TOP">It is frequently necessary to rotate the backup schedule such that a tablespace or
			set of tablespaces gets backed up every night. It might take several days to get
			a complete backup set, but this will shorten the time each night that the backup
			is active and therefore affecting performance.</TD>
	</TR>
	<TR ALIGN="LEFT" rowspan="1">
		<TD ALIGN="LEFT" VALIGN="TOP">Active tablespaces</TD>
		<TD ALIGN="LEFT" VALIGN="TOP">If certain tablespaces are very active, target them for tablespace backups as often
			as possible.</TD>
	</TR>
	<TR ALIGN="LEFT" rowspan="1">
		<TD ALIGN="LEFT" VALIGN="TOP">Unrecoverable operations</TD>
		<TD ALIGN="LEFT" VALIGN="TOP">Any time unrecoverable operations are performed on the database, a full offline backup
			should be done. If this is not acceptable, avoid performing unrecoverable operations.</TD>
	</TR>
	<TR ALIGN="LEFT" rowspan="1">
		<TD ALIGN="LEFT" VALIGN="TOP"><TT>RESETLOGS</TT></TD>
		<TD ALIGN="LEFT" VALIGN="TOP">Any time you have to reset the redo logs with the <TT>RESETLOGS</TT> command, you
			should perform a full offline backup. If this is not acceptable, avoid using the
			<TT>RESETLOGS</TT> operation.</TD>
	</TR>
	<TR ALIGN="LEFT" rowspan="1">
		<TD ALIGN="LEFT" VALIGN="TOP">Recover until</TD>
		<TD ALIGN="LEFT" VALIGN="TOP">Any time you have recovered with the Recover until option, you should perform a full
			offline backup.</TD>
	</TR>
	<TR ALIGN="LEFT" rowspan="1">
		<TD ALIGN="LEFT" VALIGN="TOP">Archive log files</TD>
		<TD VALIGN="TOP">In a 7x24 shop it is a good idea to back up the archive log files at soon as they
			are created. Keep online and available as least as many as are needed to recover
			from the oldest tablespace backup.</TD>
	</TR>
</TABLE>
<BR>
<FONT COLOR="#000077"><B><BR>
Examples of Backup Strategies</B></FONT></P>
<P>This section provides a few examples for setting up a backup strategy. Your backup
strategy might be more complicated, but I hope these examples can help you in setting
it up.</P>
<P><FONT COLOR="#000077"><B>Example of a Full Daily Backup</B></FONT></P>
<P>The scenario for this example is a small business that is open only during the
day. There is fairly good activity on the database, and the data is very important.
Perhaps in this case the database is small enough that a complete offline backup
to tape can be run every night. The previous night's tape is archived to storage
every day; after a month, the tapes can be reused, keeping one tape from each month
permanently. If a problem occurs and a restore must be performed, a backup tape will
always be available. Backup tapes should always be kept offsite to protect them in
the event of a disaster, such as a fire. If the computer room and backup tape are
destroyed, previous backup tapes are available in offsite storage.</P>
<P><FONT COLOR="#000077"><B>Example of an Online Tablespace Backup</B></FONT></P>
<P>The scenario for this example is a large business that is open 24 hours a day,
7 days a week. There is high database activity, and no downtime is allowed. The data
is extremely critical to the operation of the company. In this situation I would
recommend some sort of standby system, but I discuss that on Day 18, &quot;Administering
Oracle Replication.&quot; For backups, I would suggest that a partial online backup
be done every night on a rotational basis such that all of the tablespaces are backed
up in three or four days, thus minimizing the impact on the users. To further reduce
the effect on the users, these backups should be done to disk, perhaps across a network.
These backup files on disk should in turn be backed up every night and archived offsite.
The backup files should remain online for at least two backup cycles before being
removed. The archive log files should also be backed up to disk, either locally or
on a networked system, and backed up to tape and sent offsite. This will offer a
good level of protection and provide for quick restoration if necessary. A fault-tolerant
system should be a part of this solution as well.
<H2><FONT COLOR="#000077"><B>Summary</B></FONT></H2>
<P>In this chapter you have learned about one of the most important topics related
to database operations. The database backup can make the difference between being
able to effectively and quickly restore the system and suffering a total failure.
Without an effective backup strategy, your system is completely unprotected against
failure.</P>
<P>In this chapter you not only learned about how to develop a backup strategy and
perform Oracle backups, but a little bit about fault tolerance as well. By carefully
designing your system, you might be able to survive a disk failure that might otherwise
have caused you to rebuild your entire system. Careful planning makes all the difference
in this type of situation.
<H2><FONT COLOR="#000077"><B>What's Next?</B></FONT></H2>
<P>On Day 17, &quot;Recovering the Database,&quot; you will learn how to recover
from a failure using the backup strategy you created in this chapter. A backup without
a recovery plan is not much better than having no backup at all. Tomorrow you will
see how to develop a recovery solution and how to recover the database from a failure.
<H2><FONT COLOR="#000077"><B>Q&amp;A</B></FONT></H2>

<DL>
	<DD><B>Q What kind of failures require instance recovery?</B>
	<P><B>A</B> Any failure that causes the Oracle instance to terminate in an unorderly
	fashion will require an instance recovery to occur. This includes system failure,
	software failure, or a shutdown abort.</P>
	<P><B>Q What kind of failure requires the application of archive log files?</B></P>
	<P><B>A</B> Any failure after which a datafile needs to be restored from backup requires
	the application of archive log files.</P>
	<P><B>Q How can my OS and redo log files be protected against the loss of a disk
	drive?</B></P>
	<P><B>A</B> By using a RAID hardware disk controller or software RAID, you might
	be able to save yourself weeks of work trying to restore your system.</P>
	<P><B>Q What different types of backup methods are available?</B></P>
	<P><B>A</B> Under Windows NT, you can back up your database by using Backup Manager,
	the NT Backup utility, OS or third-party utilities, or the Export utility.
</DL>

<H2><FONT COLOR="#000077"><B>Workshop</B></FONT></H2>
<P>The workshop provides quiz questions to help you solidify your understanding of
the material covered and exercises to provide you with experience in using what you've
learned. For answers to quiz questions, see Appendix A, &quot;Answers.&quot;
<H3><FONT COLOR="#000077"><B>Quiz</B>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -