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
Solved

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

Posted on 2012-03-26
4
416 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 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Suggested Solutions

Title # Comments Views Activity
Performance issue with case statement in oracle 11G 7 80
Export table into csv file in oracle 10 246
SQL query question 8 92
dbms_crypto.decrypt   errors out 6 34
How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows how to recover a database from a user managed backup

860 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