From: Gary on
What command can be used to show which archive log files needed to
restore from the most recent ocopy backup? Is there such a command?

Thanks in advance.
From: ddf on
On Dec 8, 2:26 pm, Gary <gjwater...(a)gmail.com> wrote:
> What command can be used to show which archive log files needed to
> restore from the most recent ocopy backup? Is there such a command?
>
> Thanks in advance.

There is no such command; ocopy is merely the standard copy command
'gussied up' to allow it to copy files currently in use. It is not a
fully featured backup utility; for that you use RMAN.



David Fitzjarrell
From: Gary on
ddf wrote:
> There is no such command; ocopy is merely the standard copy command
> 'gussied up' to allow it to copy files currently in use. It is not a
> fully featured backup utility; for that you use RMAN.
>
>
>
> David Fitzjarrell

I figured as much. Thanks for the response.

The trouble I'm having is knowing when to remove unneeded archive logs.
Currently, I remove older logs based on the file creation date. I figure
that retaining logs created at least a day before the most recent
successful backup should guarantee that the first archive log in the
restore sequence will be present. This is error prone, I know. I was
hoping the DB would keep track of the name of the first archive log
after the ocopy was started, but seeing as ocopy just concurrently
copies the datafiles, it makes sense that it doesn't.

Regarding RMAN vs ocopy, I inherited this setup and plan to change it in
the future. To what, I'm not sure. I've heard RMAN is complicated (never
used it). I'm after something simple like exp, but faster.
From: joel garry on
On Dec 8, 2:38 pm, Gary <gjwater...(a)gmail.com> wrote:
> ddf wrote:
> > There is no such command; ocopy is merely the standard copy command
> > 'gussied up' to allow it to copy files currently in use.  It is not a
> > fully featured backup utility; for that you use RMAN.
>
> > David Fitzjarrell
>
> I figured as much. Thanks for the response.
>
> The trouble I'm having is knowing when to remove unneeded archive logs.
> Currently, I remove older logs based on the file creation date. I figure
> that retaining logs created at least a day before the most recent
> successful backup should guarantee that the first archive log in the
> restore sequence will be present. This is error prone, I know. I was
> hoping the DB would keep track of the name of the first archive log
> after the ocopy was started, but seeing as ocopy just concurrently
> copies the datafiles, it makes sense that it doesn't.
>
> Regarding RMAN vs ocopy, I inherited this setup and plan to change it in
> the future. To what, I'm not sure. I've heard RMAN is complicated (never
> used it). I'm after something simple like exp, but faster.

RMAN could be complicated, but for simple use, it is simple. What
version are you on? For any recent version, it is simpler than any
other way. It also has commands so you can have it figure out if what
it needs is around, or what it would need if it isn't. There are
situations where you need something older than the first archive log
after the copy was started. Don't forget, there are things going on
in the background, too.

RMAN stands for Recovery Manager, which is a lot more important than
backups, right? See the backup manuals for examples.

If you are on fully patched 10gR2 or above and have dbcontrol, default
backup is almost good enough (though I'd recommend copying the backup
command it makes elsewhere for when it screws up). Just a few
configuration changes are necessary, site dependent - you can tell it
things like retention policies. The compressed backups work good, and
wind up being quicker than any other backup method plus compression.
Also, RMAN is smarter than user managed backups as far as fractured
blocks (look it up), it doesn't have to generate excess redo because
of placing files in backup mode.

All the other stuff it does is icing. Really good icing if your
management decides it is needed.

jg
--
@home.com is bogus.
http://www.signonsandiego.com/news/2009/dec/05/sec-slaps-nova-gen-charges/
From: Jeremiah Wilton on
On Dec 8, 9:26 am, Gary <gjwater...(a)gmail.com> wrote:
> What command can be used to show which archive log files needed to
> restore from the most recent ocopy backup? Is there such a command?

You can query something like:

select l.name
from v$archived_log l,
v$database d
where l.activation# = d.activation#
and l.next_change# <
(select min(change#)
from v$backup);

The above query lists all archivelogs older than the earliest start-
backup time of all datafiles. You can delete logs in this list,
assuming that:

1. You are in fact using tablespace hot backup mode. If not, then all
open backups are invalid.
2. You never want to recover to a point in time prior to the most
recent backup using a prior backup
3. You are in fact copying all files that you put into backup mode
4. Your controlfile record keep time is longer than the age of your
oldest archivelog

Regards,

Jeremiah Wilton
Blue Gecko, Inc.
http://www.bluegecko.net