Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL generating SQL
"Kevin S. Smith" wrote:
>
> I have just come to the stunning realization (yes, I am sort of new at this)
> that my backups that I have been creating are useless. I need to do
> complete backups at night without shutting down. Right now I am just using
> the cron (Linux rh6.2) to dump the directories to tape without shutting
> down. Well, this is useless because the datafiles are being written to and
> the headers and synch are getting hosed up. To make a long story short, I
> am looking for an efficient script that would capture all my datafiles,
> control file, and archive logs, so I can put them in "backup mode", and then
> copy them to tape one at a time. I am told the best way to do this is to
> use "sql generating sql" to create a script. It is my understanding that
> this method would freeze the headers while still allowing the datafile to be
> written to. Please tell me if i am barking up the wrong tree. This is
> obviously very important and any help would be appreciated.
>
> Oracle 8161 on Linux RedHat 6.2
>
> Thanks
Kevin,
Before you undertake this endeavor, you will really need a complete understanding of how Oracle keeps it's datafiles in synch. This subject is covered in the Oracle docs - this is where I would start. If your instance(s) are not in archive log mode, you will need to shut down and perform the backup (I recommend this ASAP - you are in danger of a complete failure!).
For doing backups, you should look at either RMAN or doing hot backups. Both are covered (RMAN in more detail) in the Oracle docs. I have also seen many shell scripts floating in places on the internet (I have written several for different clients using Perl). My preference is RMAN, but others on this group may have differing opinions.
Good luck.
-- Ron Reidy Oracle DBA Reidy Consulting, L.L.C.Received on Fri Sep 28 2001 - 08:41:14 CDT