Solved

Hot Backup - is this ok - multiple start / stop backup of a tablespace

Posted on 2012-03-26
4
409 Views
Last Modified: 2012-03-26
I found a very straightforward script to do hot backups and I'd like to use it.  The only part that I'm wondering about is that if I have 5 files in a tablespace, it does 5 begin / end backups for the same tablespace.  Any risk in this ?

Example:

alter tablespace INDX_101_TPTRZ begin backup;
host copy /data/test1/indx_101_tptrz_01.dbf /backup/DAY-1/test1/ >> /temp/hotbackup.log
alter tablespace INDX_101_TPTRZ end backup;

alter tablespace INDX_101_TPTRZ begin backup;
host copy /data/test1/indx_101_tptrz_02.dbf /backup/DAY-1/test1/ >> /temp/hotbackup.log
alter tablespace INDX_101_TPTRZ end backup;

alter tablespace INDX_101_TPTRZ begin backup;
host copy /data/test1/indx_101_tptrz_03.dbf /backup/DAY-1/test1/ >> /temp/hotbackup.log
alter tablespace INDX_101_TPTRZ end backup;

alter tablespace INDX_101_TPTRZ begin backup;
host copy /data/test1/indx_101_tptrz_04.dbf /backup/DAY-1/test1/ >> /temp/hotbackup.log
alter tablespace INDX_101_TPTRZ end backup;

alter tablespace INDX_101_TPTRZ begin backup;
host copy /data/test1/indx_101_tptrz_05.dbf /backup/DAY-1/test1/ >> /temp/hotbackup.log
alter tablespace INDX_101_TPTRZ end backup;

Thanks in advance
0
Comment
Question by:MTL999
  • 2
  • 2
4 Comments
 
LVL 76

Accepted Solution

by:
slightwv (䄆 Netminder) earned 250 total points
Comment Utility
No risk but also no real gain.  I would reduce it to one.  begin backup, copy ALL datafiles, end backup.
0
 
LVL 5

Assisted Solution

by:Bajwa
Bajwa earned 250 total points
Comment Utility
and if you want to backup the whole database  and your DB is greater or equal to 10g do this

1. alter database begin backup
2. copy all the files and archived logs.
3. alter database end backup
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
Comment Utility
I would suggest not placing the whole database in backup mode at once.  This will likely generate a lot of unecessary redo.

Now if the tablespace in question contains MOST of the database, then it probalby won't matter.
0
 
LVL 5

Expert Comment

by:Bajwa
Comment Utility
and you can also see the status of the backup by running

select file#,status from v$backup;

status of 'NOT ACTIVE' means datafile is not in a BACKUP MODE
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
This video shows how to recover a database from a user managed backup

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now