Showing posts with label db2. Show all posts
Showing posts with label db2. Show all posts

Tuesday, March 20, 2012

Copying specific data from table in DB1 to table in DB2

I need to copy the following columns from my Employee table in my Performance DB to my Employee table in my VacationRequest DB:
CompanyID, FacilityID, EmployeeID, FirstName, LastName,
[Password] = 'nippert', Role = 'Employee'

I tried the advice on this website but to no avail:
http://www.w3schools.com/sql/sql_select_into.aspHi Jason,INSERT INTO should fit your needs.

copying linked server database to local server

Please let me know somebody how to copy linked server AS400 DB2 TO SQL SERVER 2000Originally posted by laddubabu
Please let me know somebody how to copy linked server AS400 DB2 TO SQL SERVER 2000

DTS?

SELECT * INTO myDB..Table1 FROM DB2...Table1

?

What are you trying to do?

Thursday, March 8, 2012

Copying data from SQL2000 to DB2 8.1


I have to setup some scheduled tasks to copy 3-4 tables from an
SQL2000 database to DB2 v. 8.1.

The job must run every night replacing all data.

How can this be done - with standard utilities??
Please be exact - I'm new to this.

Thank for any help.
/Jep"Jep" <dontspam_jep@.jepweb.dk> wrote in message
news:d3g1kvk7p4ppe932pa5a8s7ncegruk6act@.4ax.com...
>
> I have to setup some scheduled tasks to copy 3-4 tables from an
> SQL2000 database to DB2 v. 8.1.
> The job must run every night replacing all data.
> How can this be done - with standard utilities??
> Please be exact - I'm new to this.
>
> Thank for any help.
> /Jep

Some possibilites are BCP, DTS and a linked server. BCP is used to copy
table data to a flat file - the file could then be transferred to the DB2
box and loaded with a similar DB2 utility. DTS is much more complex, but
includes workflow and can transfer data between many different sources. A
linked server would allow you to reference a DB2 table directly from SQL
Server, so you could do a simple INSERT ... SELECT...

All these options are covered in Books Online. If you don't have much
experience of using these tools, I'd suggest looking at BCP as a first
option - it's a command-line tool, and it's usually straightforward to use.

Whatever option you choose, you can use SQL Agent to schedule a job in
SQL2000 - see "Scheduling Jobs" in Books Online.

Simon

copying data across databases

I have a basic question:
We have a database db1 on SQLServer 2005 that gets updated v frequently.
We would to like use a different database db2 (on a different SQL Server
instance) that is a snapshot of db1. db2 is a read-only database that would
be used for reporting purposes. On a daily basis, the new data from db1 must
get copied to db2.
Is there a SQLServer Tool that would help? I tried using Copy data from SQL
Server management Studio; it copied most of the data (not all), but did not
create the indexes that existed for the tables in db1.
Option 1: DTS Package (SSIS in 2005) to update the tables
Option 2: Replication
Thanks & Rate the Postings.
-Ravi-
"Jason Manfield" wrote:

> I have a basic question:
> We have a database db1 on SQLServer 2005 that gets updated v frequently.
> We would to like use a different database db2 (on a different SQL Server
> instance) that is a snapshot of db1. db2 is a read-only database that would
> be used for reporting purposes. On a daily basis, the new data from db1 must
> get copied to db2.
> Is there a SQLServer Tool that would help? I tried using Copy data from SQL
> Server management Studio; it copied most of the data (not all), but did not
> create the indexes that existed for the tables in db1.
|||option 3 = LogShipping
Greg Jackson
PDX, Oregon
|||There is a slight change is our requirements:
Data does NOT have to copied on an incremental basis. A full copy needs to
be done from the database db1 that is periodically updated to the database
db2 that is a read-only database. In that case, what are the options
available on SqlServer 2005?
"pdxJaxon" wrote:

> option 3 = LogShipping
>
> Greg Jackson
> PDX, Oregon
>
>

copying data across databases

I have a basic question:
We have a database db1 on SQLServer 2005 that gets updated v frequently.
We would to like use a different database db2 (on a different SQL Server
instance) that is a snapshot of db1. db2 is a read-only database that would
be used for reporting purposes. On a daily basis, the new data from db1 must
get copied to db2.
Is there a SQLServer Tool that would help? I tried using Copy data from SQL
Server management Studio; it copied most of the data (not all), but did not
create the indexes that existed for the tables in db1.Option 1: DTS Package (SSIS in 2005) to update the tables
Option 2: Replication
--
Thanks & Rate the Postings.
-Ravi-
"Jason Manfield" wrote:
> I have a basic question:
> We have a database db1 on SQLServer 2005 that gets updated v frequently.
> We would to like use a different database db2 (on a different SQL Server
> instance) that is a snapshot of db1. db2 is a read-only database that would
> be used for reporting purposes. On a daily basis, the new data from db1 must
> get copied to db2.
> Is there a SQLServer Tool that would help? I tried using Copy data from SQL
> Server management Studio; it copied most of the data (not all), but did not
> create the indexes that existed for the tables in db1.|||option 3 = LogShipping
Greg Jackson
PDX, Oregon|||There is a slight change is our requirements:
Data does NOT have to copied on an incremental basis. A full copy needs to
be done from the database db1 that is periodically updated to the database
db2 that is a read-only database. In that case, what are the options
available on SqlServer 2005?
"pdxJaxon" wrote:
> option 3 = LogShipping
>
> Greg Jackson
> PDX, Oregon
>
>

copying data across databases

I have a basic question:
We have a database db1 on SQLServer 2005 that gets updated v frequently.
We would to like use a different database DB2 (on a different SQL Server
instance) that is a snapshot of db1. DB2 is a read-only database that would
be used for reporting purposes. On a daily basis, the new data from db1 must
get copied to db2.
Is there a SQLServer Tool that would help? I tried using Copy data from SQL
Server management Studio; it copied most of the data (not all), but did not
create the indexes that existed for the tables in db1.Option 1: DTS Package (SSIS in 2005) to update the tables
Option 2: Replication
Thanks & Rate the Postings.
-Ravi-
"Jason Manfield" wrote:

> I have a basic question:
> We have a database db1 on SQLServer 2005 that gets updated v frequently.
> We would to like use a different database DB2 (on a different SQL Server
> instance) that is a snapshot of db1. DB2 is a read-only database that woul
d
> be used for reporting purposes. On a daily basis, the new data from db1 mu
st
> get copied to db2.
> Is there a SQLServer Tool that would help? I tried using Copy data from SQ
L
> Server management Studio; it copied most of the data (not all), but did no
t
> create the indexes that existed for the tables in db1.|||option 3 = LogShipping
Greg Jackson
PDX, Oregon|||There is a slight change is our requirements:
Data does NOT have to copied on an incremental basis. A full copy needs to
be done from the database db1 that is periodically updated to the database
db2 that is a read-only database. In that case, what are the options
available on SqlServer 2005?
"pdxJaxon" wrote:

> option 3 = LogShipping
>
> Greg Jackson
> PDX, Oregon
>
>

Friday, February 24, 2012

Copy/move data from TableA in DB1 to TableB in DB2 within the same SQL Server

Hallo,
I thouhgt it would be easily done, but no. I have a copy of data i saved in
another DB while laying out the original Database i want to use in producto
n Envi. The Prodution DB is finally ready and i want to move the 3 columns
of data in the first Databs
e into a table in the new database. I have tried "select into", "copy" with
out success.
The old DBTable has 3 Columns of hundreds of rows that i must move to 3 simi
lar columns in a table (15 columns) in the new database. The old table does
not have an ID, but the new table does.
Can someone help. I want to show this to my boss tomorrow.
Thanks.How would you relate the rows in the two tables to each other?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Omooba" <anonymous@.discussions.microsoft.com> wrote in message
news:B2D46104-7C63-4907-AB44-F8EC6FF860A4@.microsoft.com...
> Hallo,
> I thouhgt it would be easily done, but no. I have a copy of data i saved
in another DB while laying out the original Database i want to use in
producton Envi. The Prodution DB is finally ready and i want to move the 3
columns of data in the first Databse into a table in the new database. I
have tried "select into", "copy" without success.
> The old DBTable has 3 Columns of hundreds of rows that i must move to 3
similar columns in a table (15 columns) in the new database. The old table
does not have an ID, but the new table does.
> Can someone help. I want to show this to my boss tomorrow.
> Thanks.