473,396 Members | 1,963 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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.

May 31 '06 #1
12 3735
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.

May 31 '06 #2
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
May 31 '06 #3
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.

May 31 '06 #4

"alanchinese" <al*********@yahoo.com> wrote in message
news:11*********************@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
May 31 '06 #5
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" <al*********@yahoo.com> wrote in message
news:11*********************@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


May 31 '06 #6
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" <al*********@yahoo.com> wrote in message
news:11*********************@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
May 31 '06 #7
woul'nt it be possible using some third party tool like "DATA AQUA
STUDIO".

Jun 1 '06 #8
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" <al*********@yahoo.com> wrote in message
news:11*********************@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


Jun 1 '06 #9
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" <al*********@yahoo.com> wrote in message
news:11*********************@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


Jun 1 '06 #10
phil, i understand your concern.
here are my response:
1. it's a security thing. we are not allowed to connect to the db while
we are out of the office. i am not using the data or data model for
personal use or business use.
2. all data are testing, i am a developer. i want to have a copy of the
structure so that i can run the testing environment while i am not in
the office.
3. the only thing potentially will be stolen is the data model, not the
data. but the laptop i am using now is for development. if the laptop
got stolen, the developing app will be stolen too.
4. i don't need to keep the data current. however, i would like the
data model to be current. thereafter, if i am having a updated code, i
can test against the updated data model.

Phil Sherman wrote:
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" <al*********@yahoo.com> wrote in message
>news:11*********************@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



Jun 1 '06 #11
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" <al*********@yahoo.com> wrote in message
news:11*********************@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


Then, you will need to make a business case to have access to that data.
You have no other options. You have a business problem ... not a
technology problem.

Larry Edelstein
Jun 1 '06 #12
Item 2 in your response means that you are want this for business use -
your business of being an application developer for this application.
Larry (06/01/2006 7:29pm) hit the nail on the head with his response.

There's something amiss here; THe database architecture and data are
very rigidly controlled while you are allowed to remove a laptop from
the office containing an application that is being developed?? Surely,
the application contains information about the tables it accesses which
should reveal something about the data structure. If all application
developers work with laptops like this, then even more of the
architecture could be comprimised.

I'd just let it go and accept my employer's desire to prohibit me from
working when I'm not in the office. If this is not your employer's
intent, then you need, as Larry sugggested, to make a business case for
changing the rules. I know this is possible because many years ago, I
worked in an environment where it took 2-3 days to get approval to get
access to a data file for a single test. Each subsequent test required
the same approval process. A well prepared business case showing the
true cost of limited data access and a proposal to develop valid,
"scrubbed" test data enabled development of a test environment that all
of the programmers were able to use without restrictions.
Phil Sherman

alanchinese wrote:
phil, i understand your concern.
here are my response:
1. it's a security thing. we are not allowed to connect to the db while
we are out of the office. i am not using the data or data model for
personal use or business use.
2. all data are testing, i am a developer. i want to have a copy of the
structure so that i can run the testing environment while i am not in
the office.
3. the only thing potentially will be stolen is the data model, not the
data. but the laptop i am using now is for development. if the laptop
got stolen, the developing app will be stolen too.
4. i don't need to keep the data current. however, i would like the
data model to be current. thereafter, if i am having a updated code, i
can test against the updated data model.

Phil Sherman wrote:
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?

Jun 2 '06 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: len | last post by:
I am in a situation where I need to get a copy of test database that is on production server running MSSQL 2000 Standard to my local machine running MSSQL 2000 personel. I tried to use the copy...
1
by: Byron | last post by:
Hi, I have(had) an old Win2k Server server with about 30 web site databases (SQL 2000) that just went under due to hardware problems. Thankfully, I have backups of all the databases plus the MDF...
6
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of...
4
by: JIM.H. | last post by:
Hello, I am trying to write the data I got from a web service to my table in SQL Server I need to append the dataset wsDS to the dataset ds and do update. PVS.myWS.Loader load = new...
4
by: Jim Devenish | last post by:
I wish to copy a table on a SQL Server backend to a table on an Access (.mdb) front end in the simplest way. I have the following to get the recordset but am seeking something easier. Dim...
12
by: =?Utf-8?B?S2plbGw=?= | last post by:
Hello I've taken a four days training in C#, very good training, experienced teacher and all that, very positive. Went home spent a week making my first application, slightly more than the...
0
by: nstefi | last post by:
Hi everybody, I installed DB2 version 7 a few times, I always had some issues with the installation. Now finally seems to be ok, but there is something weird when I want to copy a table from one...
3
by: ll | last post by:
Hi, I have copied a MS SQL database to my local machine and am testing it with ASP pages, locally, on IIS. I have a db connect page that keeps the current connections for the live database. My...
1
by: ll | last post by:
Hi, I have copied a MS SQL database to my local machine and am testing it with ASP pages, locally, on IIS. I have a db connect page that keeps the current connections for the live database. My...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.