By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,851 Members | 1,752 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,851 IT Pros & Developers. It's quick & easy.

Backup Question

P: n/a
Hello,

- I have a database, which i want to backup, not only the data, but
also the indexes and views/procedures associated with it. Is the
backup/restore operations (Through the DB2 Control Center) sufficient ?

- And what happens if I later on add an index, and then restore the old
database, will this new index/view be removed ?

Any help would be appreciated.

Thanks

Regards,
Salem

Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"UnixSlaxer" <un********@hotmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
Hello,

- I have a database, which i want to backup, not only the data, but
also the indexes and views/procedures associated with it. Is the
backup/restore operations (Through the DB2 Control Center) sufficient ?

- And what happens if I later on add an index, and then restore the old
database, will this new index/view be removed ?

Any help would be appreciated.

Thanks

Regards,
Salem

A database backup includes everything, except for certain DB2 environment
variables (DB2SET) and database manager instance variables (dbm dfg),
neither of which are specific to a database. In certain cases, if you
restore a database that already exists, some database level configuration
variables (db cfg) are not over-written with a restore.

However, all DDL (tables, indexes, views, etc, and procedures, etc) are
contained in the database backup, in addtion to the data. So if you restore
the entire database to a prior point in time, you will loose any changes
made after that backup time. But if you restore the database and roll the
logs forward, DB2 will reapply any changes up to the latest consistent
commit point on the logs (or some other point in time you define). In order
to roll the logs forward, you will need LOGRETAIN = ON (or the user exit
program defined).

If you don't want to restore procedures, indexes, etc (only restore data),
you could do a tablespace restore. Tablespace restores also require
LOGRETAIN = ON.
Nov 12 '05 #2

P: n/a
Thank you very much for your response. I appreciate it.

Best Regards,
Salem

Nov 12 '05 #3

P: n/a
This is pretty rare, but if you happen to write an external user-defined
function, the binary part of it won't be backed up, as it is a file sitting
in your functions directory. You wouldn't really expect something like this
to be backed up, but its easy to forget about and would be a bummer if you
lost your only copy.

"Mark A" <no****@nowhere.com> wrote in message
news:u_********************@comcast.com...
"UnixSlaxer" <un********@hotmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
Hello,

- I have a database, which i want to backup, not only the data, but
also the indexes and views/procedures associated with it. Is the
backup/restore operations (Through the DB2 Control Center) sufficient ?

- And what happens if I later on add an index, and then restore the old
database, will this new index/view be removed ?

Any help would be appreciated.

Thanks

Regards,
Salem

A database backup includes everything, except for certain DB2 environment
variables (DB2SET) and database manager instance variables (dbm dfg),
neither of which are specific to a database. In certain cases, if you
restore a database that already exists, some database level configuration
variables (db cfg) are not over-written with a restore.

However, all DDL (tables, indexes, views, etc, and procedures, etc) are
contained in the database backup, in addtion to the data. So if you
restore the entire database to a prior point in time, you will loose any
changes made after that backup time. But if you restore the database and
roll the logs forward, DB2 will reapply any changes up to the latest
consistent commit point on the logs (or some other point in time you
define). In order to roll the logs forward, you will need LOGRETAIN = ON
(or the user exit program defined).

If you don't want to restore procedures, indexes, etc (only restore data),
you could do a tablespace restore. Tablespace restores also require
LOGRETAIN = ON.

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.