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 > How to maintain copies of system table and ddl

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-26-11, 07:18
shore shore is offline
Registered User
 
Join Date: Aug 2011
Location: Mumbai,India
Posts: 49
How to maintain copies of system table and ddl

Hi,

How to maintain copies of system table and ddl??

Is it possible without taking tablespace level backup.

DB2 v9.5 fp5.

Request help.
Reply With Quote
  #2 (permalink)  
Old 08-26-11, 07:24
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Look at the db2look command in the Command Reference manual. Make sure you use a different terminator such a '@' so you could easily re-generate the stored procedures, functions, triggers if necessary. There are lots of options, such as caputuring statistics, grants, etc that you can use.

For db2set, db cfg, and dbm cfg, just put those in a scipt to display the contents and pipe to a file.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 08-26-11, 07:40
shore shore is offline
Registered User
 
Join Date: Aug 2011
Location: Mumbai,India
Posts: 49
Will db2look output also contain ddl's of system tables??

My actual moto is to take backup of system table data and ddls.

i can do it by taking tablespace level backup SYSCATSPACE.

but i am looking for an alternative.

Request help.

Last edited by shore; 08-26-11 at 07:52.
Reply With Quote
  #4 (permalink)  
Old 08-26-11, 13:35
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Quote:
Originally Posted by shore View Post
Will db2look output also contain ddl's of system tables??

My actual moto is to take backup of system table data and ddls.

i can do it by taking tablespace level backup SYSCATSPACE.

but i am looking for an alternative.

Request help.
No, you cannot do that. Even if you could, you it would be of no use whatsoever since you cannot create system catalog tables (they are created automatically when a database is created), and only a very small number of columns in the catalog are updateable. If you want to take a backup, backup the entire database. In the event of a disaster, if have the complete db2look output from the old database, you can create a new database, then run the db2look output, then you will have the system catalog schema and system catalog data (with possibly some minor exceptions that can be fixed if do a runstats on all the tables).

DB2 LUW is not like DB2 z/OS and we don't backup just the system catalog.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #5 (permalink)  
Old 08-28-11, 06:41
shore shore is offline
Registered User
 
Join Date: Aug 2011
Location: Mumbai,India
Posts: 49
Thanks Marcus.
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