[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2012-03-26
4
Medium Priority
?
423 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 78

Accepted Solution

by:
slightwv (䄆 Netminder) earned 1000 total points
ID: 37765519
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 1000 total points
ID: 37766013
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 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37766026
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
ID: 37766035
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
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…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Via a live example, show how to take different types of Oracle backups using RMAN.
Suggested Courses
Course of the Month20 days, 2 hours left to enroll

872 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