Afrikaans
Akan
Albanian
Amharic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
In this lesson, we're going to look at RMAN maintenance--
so how to do maintenance on RMAN backups.
So we've said that RMAN is the preferred way
of doing backup and recoveries on an Oracle database.
However, there are some maintenance tasks
that have to be accomplished because if we've set up
our database to have weekly backups, let's say,
those old backups need to be removed--
and archive logs, as well.
So the archive logs are not needed past a certain point
because our backups are newer than those archive logs.
So all of that goes into maintenance for a database.
We primarily gain information about the database
and its backup status using two commands in RMAN--
list and report.
So let's go into RMAN--
connect target-- and do a list backup of database.
So this command is going to give us
information about the backups that
have occurred in our database.
So it may give us things like the type of backups--
here it says full.
It tells us the piece name, so exactly where the backup file
is, when it completed, when it's elapsed time was or how long,
what type--
was it disk or to tape.
And if we look a little further, we
can see type INCR for incremental.
And it's an incremental LV for level--
0-- the size, the data files that were involved.
Here is an incremental level 1 as well.
So that gives us the information about the backups that
have occurred in our database.
So list backup of database.
One of the most important commands that we could use
is to find out whether or not RMAN thinks
that there are any files in the database that
do need to be backed up.
So this is really important in situations
where sometimes if a backup fails,
say for lack of space, what exactly got backed up,
how much was completed, and what does RMAN think still
needs to be done.
So a report need backup command--
now that will tell us whether or not
RMAN thinks any data files need to be backed up.
And notice that it comes back with no information here,
so it's null information.
So that tells us that there are no data files in our database
that need to be backed up.
Well, what if we were to add one?
So let's go in here and create a tablespace.
So now we have a tablespace named test10.
It has a data file associated with it.
So let's run that command again.
And notice that as soon as we create
that tablespace it now says that datafile needs to be backed up.
So RMAN is smart enough to go out and know
the state of the database.
Now, another major command for maintaining our space--
because we always have a limited amount of space
that we could use for the fast recovery area--
is to do report obsolete.
So report obsolete is going to give us
a list of all of the backups and archive logs and image copies
or anything that we have in the flash recovery
area that is obsolete and can be removed.
So notice here that we have a number of files--
archive logs, backup sets--
that can be removed.
In order to remove these, we'll use
the delete obsolete command.
So when we do delete obsolete, the first thing it does
is come back with the list of obsoletes--
this is what we just saw with the report obsolete command.
Do you really want to delete the above objects?
I'm going to type no here, because oftentimes if we script
our backup, we don't want the interruption of it
asking a question.
If we tell it to delete we want it to delete.
That's the kind of commands we would put
in an automatic scheduled job.
So we would use delete noprompt obsolete.
And then it will go ahead and delete those
without asking us whether or not we want to do it.
Notice that we have deleted archive
logs, deleted backup piece, so on, and so forth.
So now if we say report obsolete again,
no obsolete backups were found.
And finally the crosscheck command.
It's very important when you do RMAN backups
that you use these commands to do your maintenance
to remove your files because if you go out onto the file system
itself, and you delete the backup pieces
that you think are old enough or delete archive logs,
then RMAN doesn't know about those
because we didn't interact with RMAN when we removed them.
And the way that RMAN discovers what is missing
and can update its catalog is the crosscheck command.
So he would say crosscheck backup of database.
And then it gives a list of the backup pieces that it found.
If there are any that it expected
to be there that weren't there, then it
will say that they are expired, and we can go and do cleanup
from there using delete obsolete.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.