If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Physical Backup

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-19-10, 09:45
hazy_dba hazy_dba is offline
Registered User
 
Join Date: Dec 2009
Posts: 40
Physical Backup

I would like to take a physical backup of a DB2 database, but I am struggling to find all the files I would need to make a copy of.

I need to write a script to do this that will be able to find all the files rather than hardcode anything.

So far I have...
select container_name from sysibmadm.container_utilization for the tablespaces and I know I need the SQLSPCS.1 and SQLSPCS.2 files, although I'm not sure yet how I would script finding those.

I searched the web and searched this forum, but I can't find many references to taking physical backups of DB2 databases, I guess everyone must be happy with the backup functionality that is already available.

Where I work, we take physical backups of the Oracle databases and want to do the same for the DB2 databases.

Any thoughts / directions please?
Reply With Quote
  #2 (permalink)  
Old 01-19-10, 09:50
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
There is no reason to do that. While this is a standard way of backing up an Oracle database, the only supported method to back up a DB2 database is to use the BACKUP command.
Reply With Quote
  #3 (permalink)  
Old 01-20-10, 02:19
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
If you also want to take a backup of your DB2 instance directory, stop the instance and backup the "sqllib" directory in the instance's HOME directory. Backing up the databases is only to be done with the BACKUP command as Nick explained.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #4 (permalink)  
Old 01-21-10, 03:01
hazy_dba hazy_dba is offline
Registered User
 
Join Date: Dec 2009
Posts: 40
Thank you both for your answers.

I will continue with the BACKUP command as you have advised.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On