This is a discussion on QUESTION: Doing first db restore within the DB2 forums, part of the Database Server Software category; --> Hi, all. I'm working to do a command-line restore of a database (8.2 on Windows) to a different server. ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, all. I'm working to do a command-line restore of a database (8.2 on Windows) to a different server. I have run through various permutations of the process, to ensure I understand as much as I can. Sadly, I'm not an expert (I'm better with Oracle's rman than I am with db2 backups), and am learning as I go. The goal here is to restore a backup into a net new database, onto a development server. My main caution is that I don't overwrite any existing files. I believe I have all the required information, and the various attempts at restoring a smaller test backup on my workstation appear to have succeeded. My process will be as follows: 1) create directories for non-system tablespace containers (I got names for these from the output of a 'list tablespaces' command done on the source db) 2) connect to the instance on the target server 3) "restore db *source_db_name* user *admin_id* using *admin_pw* from *location_of_backup_root_folder* to c: into *new_target_db_name* redirect" 4) enter a series of "set tablespace containers for # using (path '*tablespace_container_folder*')" statements 5) "restore db *source_db_name* continue" 6) "get db cfg for *new_target_db_name*", review the listed config details. Following this process appears to have worked to this point. As to my main concern, about overwriting existing information, db2 appears to be creating a new directory under c:\db2\node0000, called 'SQL#####' (next incremental number), and creating a dozen or so files and a couple of directories (DB2EVENT, SQLOGDIR). I believe that as long as I assign specific folders for the tablespace containers, I should be fairly safe in conducting this restore. Are there any other 'gotchas' that more experienced DBAs can point to here? I've gone through the Data Recovery PDF in some detail, but who knows what I may have missed in a 400+ page document. Thanks for all input! BD |