Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
General
cancel
Showing results for 
Search instead for 
Did you mean: 

Oracle hot backup still not copying all user files to tape

SOLVED
Go to solution
Randy Hagedorn
Regular Advisor

Oracle hot backup still not copying all user files to tape

Hi,

I am doing a hot backup on an oracle database that is archivelog mode, using a third-party software. Even though I have set the tablespaces into backup mode, but backup software still reports that some of my index and user data files have been modified during the backup.

Here is may hot backup script.

alter database backup controlfile to '$ORACLE_BASE/admin/backup/control.TOR';
alter tablespace SYSTEM begin backup;
alter tablespace INDEX_DATA begin backup;
alter tablespace RB_SEGS begin ckup;
alter tablespace USER_DATA begin backup;
alter tablespace TOOLS begin backup;
Is there anything else that I am missing to allow the backup software to cleanly get the oracle files?

Thanks in advance,
3 REPLIES
twang
Honored Contributor
Solution

Re: Oracle hot backup still not copying all user files to tape

4 steps for each tablespace,
a- OFFLINE TABLESPACE to be backuped, here 'user_data'
b- ALTER TABLESPACE user1 BEGIN BACKUP;
c- Save datafile under Unix, example: 'user_data.dbf'
d- ALTER TABLESPACE user_data END BACKUP;

Example :

SVRMGR> alter tablespace USERS begin backup;
Statement processed.

SVRMGR> select * from v$backup;

FILE# STATUS CHANGE# TIME
---------- ------------------ ---------- -------------------
1 NOT ACTIVE 0 27/09/03 00:00:00
2 NOT ACTIVE 0 27/09/03 00:00:00
3 NOT ACTIVE 0 27/09/03 00:00:00
4 NOT ACTIVE 0 27/09/03 00:00:00
5 ACTIVE 2214652 27/09/03 15:02:19 <== Backuping now
6 NOT ACTIVE 0 27/09/03 00:00:00
6 rows selected.


$ tar cvf /dev/rmt0 /usr/oradata/â ¦/â ¦/user1.dbf (Unix)


SVRMGR> alter tablespace USERS end backup;
Statement processed.

SVRMGR> select * from v$backup;
FILE# STATUS CHANGE# TIME
---------- ------------------ ---------- -------------------
1 NOT ACTIVE 0 27/09/03 00:00:00
2 NOT ACTIVE 0 27/09/03 00:00:00
3 NOT ACTIVE 0 27/09/03 00:00:00
4 NOT ACTIVE 0 27/09/03 00:00:00
5 NOT ACTIVE 2214652 27/09/03 15:02:19 <== Backup ended
6 NOT ACTIVE 0 27/09/03 00:00:00
6 rows sele
Brian Crabtree
Honored Contributor

Re: Oracle hot backup still not copying all user files to tape

The Oracle hot backup does not freeze the files, but expects that the files will change during the course of the backup. As long as your software is picking up the files even though they change, you are ok.

The process for the hot backup is, as entries are updated, the database copies the full changed Oracle block (ie: 8k) into the archive log file, so that in the event of a recovery, there isn't a chance that the block itself is made invalid because the backup only copied half of the block during the change. This will increase the size of your archive log files, so it should be done at the slowest possible time.

You should make sure to test your recovery routine however, and make sure that everything is working the way that you expect, and you can successfully recover the database.

Thanks,

Brian
Hari Kumar
Trusted Contributor

Re: Oracle hot backup still not copying all user files to tape

The above explanations are very good to follow.
All that you have correct one.But it will be better if u query all the tablespaces present in your database and then make them each in backup mode, then take backup and end backup mode. Do switching of log files and then copy all the log files.
Many scripts are available and you can test them on a test database and go.
The HOT backup method is usually as follows :

select name from v$tablespace;
alter system switch log file
Backup control file
###Repeat for each tablespace
begin backup for tablespace
make a backup
End backup for tablespace
####
and then follow for each tablespace
alter system switch logfile
backup control file
alter system switch logfile
alter system archive log current
Backup all your archive log files

Thanks,
Information is Wealth ; Knowledge is Power