Unix Technical Forum

make a copy of database to local

This is a discussion on make a copy of database to local within the DB2 forums, part of the Database Server Software category; --> i am a db2 newbie. we have a server hosting a db2/6000 database that restricts the use of backup, ...


Go Back   Unix Technical Forum > Database Server Software > DB2

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 07:12 AM
alanchinese
 
Posts: n/a
Default make a copy of database to local

i am a db2 newbie. we have a server hosting a db2/6000 database that
restricts the use of backup, generate ddl. i wonder if there is a
simple way to transfer the database structure and data into my laptop,
on which db2/nt was installed.
i had tried to use DTS service from microsoft sql server. it didn't
work.
any suggestion?
any help would be appreciated.
alan.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 07:12 AM
Phil Sherman
 
Posts: n/a
Default Re: make a copy of database to local

If you have access to the database through the control center on your
laptop, is there a "Generate DDL" option for the database? If so, you
can use it to generate the DDL you are looking for.

Data can be copied using:
INSERT INTO local_table
SELECT * FROM remote_table

Good luck!


Phil Sherman



alanchinese wrote:
> i am a db2 newbie. we have a server hosting a db2/6000 database that
> restricts the use of backup, generate ddl. i wonder if there is a
> simple way to transfer the database structure and data into my laptop,
> on which db2/nt was installed.
> i had tried to use DTS service from microsoft sql server. it didn't
> work.
> any suggestion?
> any help would be appreciated.
> alan.
>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-27-2008, 07:12 AM
Larry
 
Posts: n/a
Default Re: make a copy of database to local

alanchinese wrote:

> i am a db2 newbie. we have a server hosting a db2/6000 database that
> restricts the use of backup, generate ddl. i wonder if there is a
> simple way to transfer the database structure and data into my laptop,
> on which db2/nt was installed.
> i had tried to use DTS service from microsoft sql server. it didn't
> work.
> any suggestion?
> any help would be appreciated.
> alan.
>

You will need to use the db2move utility.

Larry Edelstein
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-27-2008, 07:12 AM
Phil Sherman
 
Posts: n/a
Default Re: make a copy of database to local

Correction:

INSERT .... SELECT ......

won't work across databases.

You should be able to export the data to your laptop then import it to a
local table. If you can't export the data, then you could select it to a
file and use that as input to load. You'll need to build delimiters or
use fixed length output from the select. Watch out for long character
and varchar columns if you try to use fixed length records - they can
cause very large files.

All of these options require you to "catalog" the remote database on
your laptop.

The "Generate DDL" option is accessed using a right-click on the
database name in the control center's list of databases.

Phil Sherman


Phil Sherman wrote:
> If you have access to the database through the control center on your
> laptop, is there a "Generate DDL" option for the database? If so, you
> can use it to generate the DDL you are looking for.
>
> Data can be copied using:
> INSERT INTO local_table
> SELECT * FROM remote_table
>
> Good luck!
>
>
> Phil Sherman
>
>
>
> alanchinese wrote:
>
>> i am a db2 newbie. we have a server hosting a db2/6000 database that
>> restricts the use of backup, generate ddl. i wonder if there is a
>> simple way to transfer the database structure and data into my laptop,
>> on which db2/nt was installed.
>> i had tried to use DTS service from microsoft sql server. it didn't
>> work.
>> any suggestion?
>> any help would be appreciated.
>> alan.
>>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-27-2008, 07:12 AM
Rhino
 
Posts: n/a
Default Re: make a copy of database to local


"alanchinese" <alanchinese@yahoo.com> wrote in message
news:1149109511.703890.81340@h76g2000cwa.googlegro ups.com...
>i am a db2 newbie. we have a server hosting a db2/6000 database that
> restricts the use of backup, generate ddl. i wonder if there is a
> simple way to transfer the database structure and data into my laptop,
> on which db2/nt was installed.
> i had tried to use DTS service from microsoft sql server. it didn't
> work.
> any suggestion?
> any help would be appreciated.
> alan.
>

Have a look at the db2move command. It is documented in the Information
Center; just enter the following in the Search box and click on the GO
button: db2move

--
Rhino


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-27-2008, 07:12 AM
alanchinese
 
Posts: n/a
Default Re: make a copy of database to local

generate ddl is not allowed in control center.
export a table is not working too.
i tried db2move, it complains: SQL0551N "xxx" does not have the
privilege to perform operation "BIND" on object "NULLID.DB2MOVE".
SQLSTATE=42501
looking for bind file in current directory...
bind file: DB2MOVE.BND .... could not be opened.

actually, is db2move doing some sort of xml transferring from one
database to another?

Rhino wrote:
> "alanchinese" <alanchinese@yahoo.com> wrote in message
> news:1149109511.703890.81340@h76g2000cwa.googlegro ups.com...
> >i am a db2 newbie. we have a server hosting a db2/6000 database that
> > restricts the use of backup, generate ddl. i wonder if there is a
> > simple way to transfer the database structure and data into my laptop,
> > on which db2/nt was installed.
> > i had tried to use DTS service from microsoft sql server. it didn't
> > work.
> > any suggestion?
> > any help would be appreciated.
> > alan.
> >

> Have a look at the db2move command. It is documented in the Information
> Center; just enter the following in the Search box and click on the GO
> button: db2move
>
> --
> Rhino


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-27-2008, 07:12 AM
Larry
 
Posts: n/a
Default Re: make a copy of database to local

alanchinese wrote:

> generate ddl is not allowed in control center.
> export a table is not working too.
> i tried db2move, it complains: SQL0551N "xxx" does not have the
> privilege to perform operation "BIND" on object "NULLID.DB2MOVE".
> SQLSTATE=42501
> looking for bind file in current directory...
> bind file: DB2MOVE.BND .... could not be opened.
>
> actually, is db2move doing some sort of xml transferring from one
> database to another?
>
> Rhino wrote:
>
>>"alanchinese" <alanchinese@yahoo.com> wrote in message
>>news:1149109511.703890.81340@h76g2000cwa.googleg roups.com...
>>
>>>i am a db2 newbie. we have a server hosting a db2/6000 database that
>>>restricts the use of backup, generate ddl. i wonder if there is a
>>>simple way to transfer the database structure and data into my laptop,
>>>on which db2/nt was installed.
>>>i had tried to use DTS service from microsoft sql server. it didn't
>>>work.
>>>any suggestion?
>>>any help would be appreciated.
>>>alan.
>>>

>>
>>Have a look at the db2move command. It is documented in the Information
>>Center; just enter the following in the Search box and click on the GO
>>button: db2move
>>
>>--
>>Rhino

>
>

No ... it is using the db2look utility to generate the DDL and the
export utility to move the data. Probably requires additional
authorities. Best thing to do is to see your DBA.

Larry Edelstein
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-27-2008, 07:12 AM
situ
 
Posts: n/a
Default Re: make a copy of database to local

woul'nt it be possible using some third party tool like "DATA AQUA
STUDIO".

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-27-2008, 07:13 AM
alanchinese
 
Posts: n/a
Default Re: make a copy of database to local

DBA will not give me those access for just duplicating the database
into my laptop.
lol~
i am seeking an alternate way....


Larry wrote:
> alanchinese wrote:
>
> > generate ddl is not allowed in control center.
> > export a table is not working too.
> > i tried db2move, it complains: SQL0551N "xxx" does not have the
> > privilege to perform operation "BIND" on object "NULLID.DB2MOVE".
> > SQLSTATE=42501
> > looking for bind file in current directory...
> > bind file: DB2MOVE.BND .... could not be opened.
> >
> > actually, is db2move doing some sort of xml transferring from one
> > database to another?
> >
> > Rhino wrote:
> >
> >>"alanchinese" <alanchinese@yahoo.com> wrote in message
> >>news:1149109511.703890.81340@h76g2000cwa.googleg roups.com...
> >>
> >>>i am a db2 newbie. we have a server hosting a db2/6000 database that
> >>>restricts the use of backup, generate ddl. i wonder if there is a
> >>>simple way to transfer the database structure and data into my laptop,
> >>>on which db2/nt was installed.
> >>>i had tried to use DTS service from microsoft sql server. it didn't
> >>>work.
> >>>any suggestion?
> >>>any help would be appreciated.
> >>>alan.
> >>>
> >>
> >>Have a look at the db2move command. It is documented in the Information
> >>Center; just enter the following in the Search box and click on the GO
> >>button: db2move
> >>
> >>--
> >>Rhino

> >
> >

> No ... it is using the db2look utility to generate the DDL and the
> export utility to move the data. Probably requires additional
> authorities. Best thing to do is to see your DBA.
>
> Larry Edelstein


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-27-2008, 07:13 AM
Phil Sherman
 
Posts: n/a
Default Re: make a copy of database to local

It appears that you are atempting to make a copy of corporate data for
your own (business?) needs. As long as you can read the data, this is
possible but you have a number of non-database issues that need to be
addressed:
1. Why does the data owner NOT want copies of the data made?
2. What laws apply to controlling access to the data? Which of them are
likely to be broken when you have your own copy of the data?
3. What are your potential consequences to you and your employer of
having the data on your laptop? Imagine that it's stolen and the data
becomes available to the thief. Worse, what happens if you catch a virus
that downloads the data to a nefarious individual?
4. Will you need to keep the data current? if so, how will you update
it? When you update it, how much of your workday will it take?



alanchinese wrote:
> DBA will not give me those access for just duplicating the database
> into my laptop.
> lol~
> i am seeking an alternate way....
>
>
> Larry wrote:
>
>>alanchinese wrote:
>>
>>
>>>generate ddl is not allowed in control center.
>>>export a table is not working too.
>>>i tried db2move, it complains: SQL0551N "xxx" does not have the
>>>privilege to perform operation "BIND" on object "NULLID.DB2MOVE".
>>>SQLSTATE=42501
>>>looking for bind file in current directory...
>>>bind file: DB2MOVE.BND .... could not be opened.
>>>
>>>actually, is db2move doing some sort of xml transferring from one
>>>database to another?
>>>
>>>Rhino wrote:
>>>
>>>
>>>>"alanchinese" <alanchinese@yahoo.com> wrote in message
>>>>news:1149109511.703890.81340@h76g2000cwa.googl egroups.com...
>>>>
>>>>
>>>>>i am a db2 newbie. we have a server hosting a db2/6000 database that
>>>>>restricts the use of backup, generate ddl. i wonder if there is a
>>>>>simple way to transfer the database structure and data into my laptop,
>>>>>on which db2/nt was installed.
>>>>>i had tried to use DTS service from microsoft sql server. it didn't
>>>>>work.
>>>>>any suggestion?
>>>>>any help would be appreciated.
>>>>>alan.
>>>>>
>>>>
>>>>Have a look at the db2move command. It is documented in the Information
>>>>Center; just enter the following in the Search box and click on the GO
>>>>button: db2move
>>>>
>>>>--
>>>>Rhino
>>>
>>>

>>No ... it is using the db2look utility to generate the DDL and the
>>export utility to move the data. Probably requires additional
>>authorities. Best thing to do is to see your DBA.
>>
>>Larry Edelstein

>
>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:27 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com