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 > URGENT - copye a full database

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-18-04, 06:25
Skevtaz Skevtaz is offline
Registered User
 
Join Date: Feb 2004
Posts: 13
URGENT - copye a full database

Hi guys

I new to DB2, and I must copy a database from a server on another one with all the data before tonight ??

The first db is on DB 7.2.1 on win2k server the new is on windows 2003 same db version.

I try to backup the db on the first one and restore on the second. But i can't.


Please Help Me !!!

Kevin

ps : and I bring you in a good restaurant if you go to paris one Day !!
__________________
MS MVP.NET
CodeWise Member
Reply With Quote
  #2 (permalink)  
Old 12-18-04, 07:01
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
I'm sure you are aware that version 7.2 is out of support. additionally, I'm not sure if Windows 2003 ever was a supported platform for V7.2 .. So, be prepared for the unexpected!!

To my knowledge, w2k and w2003 are compatible for backup and restore ... Use a sample database to backup and restore between these boxes before you do live ..
http://www-128.ibm.com/developerwork...rected+restore

should give you all the information you need ... (If the directory structure is same on both boxes, then you do not need to redirect)

The other option is to user db2look, export and load.
In brief
1) Use db2look to generate the ddl for the database objects
db2look -d <dbname> -e -a -l -x -o db2look.out -wrapper -server
2) Use the db2look.out to create a database objects in the database on the other machine.
3) On the source machine, generate export and load scripts
select 'export to '||rtrim(tabschema)||'.'||rtrim(tabname)||'.ixf of ixf lobdir . lobfile '||rtrim(tabschema)||'.'||rtrim(tabname)||' modified by lobsinfile select * from '||rtrim(tabschema)||'.'||rtrim(tabname)||' ; ' from syscat.tables where tabschema not like 'SYS%'

select 'load from '||rtrim(tabschema)||'.'||rtrim(tabname)||'.ixf of ixf lobdir . lobfile '||rtrim(tabschema)||'.'||rtrim(tabname)||' modified by lobsinfile replace into '||rtrim(tabschema)||'.'||rtrim(tabname)||' nonrecoverable; ' from syscat.tables where tabschema not like 'SYS%'

4) Use the above export command to export the data and copy all files to the othe box.

5) Use the above load command to load the data into the tables on the target m/c

6) Backup the database on the target ...

HTH

Sathyaram

PS: Would love to meet you in Paris for a drink when I happen to be there
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 12-18-04, 07:09
Skevtaz Skevtaz is offline
Registered User
 
Join Date: Feb 2004
Posts: 13
thanks

I'll try it now !!

I certainly repost some question while I'm doing this..


ps: Sure for a meeting when you are in Paris
__________________
MS MVP.NET
CodeWise Member
Reply With Quote
  #4 (permalink)  
Old 12-18-04, 08:15
Skevtaz Skevtaz is offline
Registered User
 
Join Date: Feb 2004
Posts: 13
Yeahhhh

I'll try on a test db and it works fine !!

great

I'll try on the true DB..

thanks

Kevin
__________________
MS MVP.NET
CodeWise Member
Reply With Quote
  #5 (permalink)  
Old 12-18-04, 09:31
Skevtaz Skevtaz is offline
Registered User
 
Join Date: Feb 2004
Posts: 13
Talking Thanks...

Super ! It works fine. I use backup and restore redirect from the article.
I've got my old base on my new server.
Great

Thanks for all

and if you come to Paris mail me !! ('s'k'e'v't'a'z'@'y'a'h'o'o'.'c'o'm')


Bye bye

Kevin
__________________
MS MVP.NET
CodeWise Member
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