Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Posts
    13

    Unanswered: 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

  2. #2
    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

  3. #3
    Join Date
    Feb 2004
    Posts
    13
    great I'll test it at the prime hours tomorow morning.

    Thanks

    Kevin
    MS MVP.NET
    CodeWise Member

  4. #4
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •