Hello,
I hope this doesn't come across as totally newbieish, but I've been
searching the web and the IBM docs until smoke is coming out of my head.
Scenario: We are trying to take primitive "snapshots" of our production
database into a test environment by taking (what we thought are) offline
backups of production, then doing a redirected restore into test.
Here's the steps I do:
-- Make absolutely sure there's nobody connected but the admin.
$ db2stop force;
$ db2start admin mode user db2admin;
$ db2 CONNECT TO REX;
$ db2 QUIESCE DATABASE IMMEDIATE FORCE CONNECTIONS;
$ db2 CONNECT RESET;
$ db2 FORCE APPLICATION ALL;
$ db2 DEACTIVATE DB REX;
-- Just checking...
$ db2 list application
$ db2 BACKUP DATABASE REX TO "/tmp" WITH 2 BUFFERS BUFFER 1024
PARALLELISM 1 WITHOUT PROMPTING;
-- verify we can get back in
$ db2 CONNECT TO REX;
$ db2 UNQUIESCE DATABASE;
$ db2 CONNECT RESET;
$ db2stop force
$ db2start
$ db2 connect to rex;
Now, this should have taken an OFFLINE backup, correct? Yet, when I try
to restore it into the test environment:
$ db2 create db rex alias testrex;
$ db2 restore db rex from /tmp taken at 'yyyymmddhhmmss' on
'/db/rextest' into testrex newlogpath '/translogs/rextest' redirect
without rolling forward;
I get:
"SQL2537N Roll-forward is required following the Restore."
Err, what? I thought/read that only happens if I work with an ONLINE
backup! How did my supposed OFFline backup turn into an ONline one?
What am I missing here? Is there another mystery incantation I have to
mumble to enforce that absolutely, totally, certainly, assuredly makes
sure that my backup is offline so that I can "ignore" the logs and not
have to do a rollforward?
Thanks
Mike