Solved

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

Posted on 2012-03-26
4
419 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 250 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 250 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 77

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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

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 post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

728 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