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 > Copying Database

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-17-05, 10:18
Skevtaz Skevtaz is offline
Registered User
 
Join Date: Feb 2004
Posts: 13
Copying Database

Hi there,

I try some ways to copy a database.

I try to backup the master and create a new with a restore : it works fine.

Then I try to get a DDL of my master and to generate the object with the DDL, and I'm in trouble whith that !!

I succeed whith generating the DLL (I had save it on a text file), I create a new emtpy database and when I try to execute the DDL file, I've got some errors.

The way I do this :
- I open a DB2 CLP windows
- I connect to my database using : db2 connect to XXXX user db2admin using XXXX
- I try to run my DDL scriptfile : db2 - tvf My_File

Then I get a lot of errors : SQL1024N You're not connected ...

But I modify the ddl file for the "connect" instruction refering to the new DB !

Have U got any idea ??

Thanks a lot and sorry for my poor english..

Regards,

Kevin
__________________
MS MVP.NET
CodeWise Member
Reply With Quote
  #2 (permalink)  
Old 10-17-05, 11:26
przytula przytula is offline
Registered User
 
Join Date: Nov 2004
Posts: 374
copy db

if running db2look -d -e -l -o xx.yy against your base db
if you have sql sp, you should set another delimiter
in this file, there is a connect statement
modify this to the new name and this do
db2 -tvf xx.yy
otherwise, copy a part of the output..
__________________
Best Regards, Guy Przytula
DB2/ORA/SQL Services
DB2 DBA & Advanced DBA Certified
DB2 Dprop Certified
http://users.skynet.be/przytula/dbss.html
Reply With Quote
  #3 (permalink)  
Old 10-17-05, 12:24
Skevtaz Skevtaz is offline
Registered User
 
Join Date: Feb 2004
Posts: 13
great I'll test it at the prime hours tomorow morning.

Thanks

Kevin
__________________
MS MVP.NET
CodeWise Member
Reply With Quote
  #4 (permalink)  
Old 10-18-05, 07:38
Skevtaz Skevtaz is offline
Registered User
 
Join Date: Feb 2004
Posts: 13
I execute script manually..
And I found the error, one tablespace already exist !

So it's OK !

Thanks all

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