Data Transfer Between Databases Different Structur

Sep 18, 2006

Ok say we've got two databases with two tables and we need to
transfer data from one to another. However, the data structure in
sourceDB is different to targetDB. Better to illustrate:
sourceDB
tablesource
PIN SYSTEM HEADER PROPERTY VALUE STATUS
1000 AF ADDRESS DETAILS LINE 1 The Grange Active
1000 AF ADDRESS DETAILS LINE 2 69 Tintagel Way
1000 AF ADDRESS DETAILS LINE 3 Woking
1001 AF ADDRESS DETAILS LINE 1 50 Active
8888 AF ADDRESS DETAILS LINE 2 Evans Way
8888 AF ADDRESS DETAILS LINE 3 Islington
8888 AF ADDRESS DETAILS
8888 AF ADDRESS DETAILS
8888 AF ADDRESS DETAILS

Now each matching PIN on the multiple rows in sourceDB above relates to
one customer. In order to extract the relevant info for an address for
instance for each customer, we need to know the unique PIN, header,
property and value fields.

So I created this piece of SQL which gives me the result in targetDB:

INSERT into targetDB.dbo.tabletarget (address1)
SELECT
value
FROM sourceDB.dbo.tablesource
WHERE pin = 1000
AND header ='address details'
AND property = 'line 1'

targetDB
tabletarget
PIN ADDRESS1 ADDRESS2 ADDRESS3 SOURCE
The Grange

Fine, I've proved I can extract a specific field, but I need to do
this for all fields and all customers.

Any ideas?

View 1 Replies


ADVERTISEMENT

Data Transfer Between Two Databases

Jan 22, 2008

I have two databases DB1 and DB2
With Tables T11,T12 and T21, T22 respectively.
All the tables in the two databases have the same structure.

I need help on a script to clear the contents of Table T21 and T22 in the DB2 database
And load the contents of Table T11 and T12 ( Table have about 2 Million records of data ) into T21 and T22.

View 7 Replies View Related

Whats The Best Way To Transfer Data Between 2 Databases

Sep 6, 2007

What is the best way to transfer data between 2 databases.
 
Any ideas will be appreciated.
Regards
Karen

View 5 Replies View Related

Transfer Of Data Between Tables In Different Databases On Same Server

Jun 22, 1999

When executing an inline insert into command from isqw/w the command executes perfectly. Yet when I try to create a stored procedure with exactly the same insert into statement it will not create. It does not like the database.owner.table prefix on the selected rows. Any suggestions ??

Thanks.... Tom

View 1 Replies View Related

Advice Needed - Regarding Data Transfer Between Databases On Seperate Servers

Aug 29, 2007

Hello everyone,
Here's my situation...
I'm running a web service which involves 51 seperate servers and databases.
There are fifty licensee servers (One for each US state) and one corporate server.
Each night I need to upload sales and membership data from the licensee's databases to the corporate database to compile reports.
The application platform I'm using is ASP.NET 2.0 and the the database is SQL2005 express.
I want this process to be run automatically, so I believe it's a scheduled windows service I need to setup up in .NET to make the data transfers.
If anyone has already set something up like this, or knows the steps to take? I would love to have your input.
Thanks in advance,
Robert

View 5 Replies View Related

Source And Destination Databases On Same Server While Data Transfer Using SSIS

May 9, 2007

Hi,

I am having one query regarding data transfer using SSIS. If we use

DTS packages for the data transfer between two databases then the source database and

destination database must be on different db servers or instances.Here, I

am talking about the DTS Packages with Distributed Transactions enabled.

I need to know that whether this constraint has been rectified with SSIS Packages or it still persists.



One more thing is that while transferring the data, can we view/insert/update source database or it is locked if the transfer is in process.



Please reply..........



Thanks and Regards,

Rajesh

View 5 Replies View Related

Transfer Databases From One Server To Other

Sep 29, 2004

Hi,
I have several databases on one MSQL Server which I want to transfer to new server. So, basically it is tranferring all contents of sql server databases on one server to another one. I know I can use import Wizard, but it will take long time, is there a more better way to do this.

Thanks,
Mashro.

View 1 Replies View Related

MS-SQL7 Transfer Databases

Nov 13, 1998

Hi there,

I would like to make multiples copies of a database. What I used to do in MS-SQL 6.5 was create a backup of the database that I want to make copy from. Create new (empty) databases and restored the backed up database into the new databases. Another way that I used to do is to use the Database Transfer feature in the Enterprise Manager.

I want to do the same thing in MS-SQL 7 (beta 3) but it seems to me that I couldn't do that. First, there is no Database Transfer feature like that in 6.5. Next, I couldn't restore a backed up database to another database.

I know there is the Import/Export utility but it is the last thing I have to use if I don't have any other choice.

Thanks in advance for your help.

Tung Nguyen

View 1 Replies View Related

Transfer SQL 6.5 Databases To SQL 2005 Server

Jun 6, 2007

I got 2 SQL servers. One is legacy SQL 6.5 and the other one is SQL 2005. They are installed in different machine. How can I copy or migrate the old 6.5 version databases to SQL 2005 server?

Someone said I should upgrade the 6.5 to version 2000 first. Is it the only method? I didn't have SQL 2000 install cdrom and license. How can I do that?

Please help.

View 1 Replies View Related

Transfer Data To New Table Then Transfer Indexes

May 30, 2008

Is it possible/advisable when transfering very large amounts of data from server to server to:
trasnfer the data to a new table first
second alter new table adding indexes, defaults, ets based on original table

if it is what flow item would be used to transfer/alter the indexes and defaults?

I'm very new to ssis so the more detail you can give the better.

Thanks

View 5 Replies View Related

How To Transfer A Table Between Databases In SQL Server 2005 Express

Jan 10, 2007

Hi,
In SQL Server 2005 Express I currently have 2 databases which I€™m working on, my problem is I want to transfer a table from one of the databases to the other but don't know how to go about achieving this? I want the table structure and all the info held within the table transferred across. Any ideas are welcome.



View 1 Replies View Related

SQL 2012 :: Log File Data Transfer Amount (MB) Versus Data File Transfer Amount (MB)

Mar 19, 2014

In the full recovery model, if i run a transaction that inserts 10MB of data into a table, then 10 MB of data is moved in the data file. Does this mean then that the log file will grow by exactly 10MB as well?

I understand that all transactions are logged to the log file to enable rollback and point in time recovery, but what is actually physically stored in the log file for this transactions record? Is it the text of the command from the transaction or the actual physical data from that transaction?

I ask because say if I have two drives, one with 5MB/s write speed for the log file and one with 10MB/s write speed for the data file, if I start trying to insert 10 MB of data per second into the table, am I going to be limited to 5MB/s by the log file drive, or is SQL server not going to try and log all 10 MB each second to the log file?

View 6 Replies View Related

Transfer Data To Excel 2007 By Using SQL Server Data Transformation Services

Jun 11, 2007

My vendor requires data to be sent in Excel format.  Some of my tables have rows over 65,536 so I need to use Excel 2007 (Max of 1,048,576).  Right now my data sits in SQL 2000.  I am using MS SQL Enterprise Manager 8.0 to prepare the data.  Is there some kind of add on or selection I am missing to use DTS to export from SQL to Excel 2007?Thanks in advance. 

View 3 Replies View Related

Data Access :: Transfer Data From One To Another Table On Another Server Using Stored Procedures

Jun 9, 2013

I have two database(MYDB1 , MYDB2) on two different server's(SERVER1 , SERVER2) . I want to create an store procedure in MYDB1 on SERVER1 and get some data from a table of MYDB2 on SERVER2. How can i do this?

View 5 Replies View Related

Transfer Data From An Excel Sheet To Table In Sql Data Base

Nov 15, 2006

I have an excel sheet that contain colummns as in a table in a sql database i want to transfer this data from the sheet to the table frombusiness logic code layer not from the enterprise manager by wizardwhat can i do?? ...please urgent

View 1 Replies View Related

Changing Data Source Programatically Does Not Transfer Data

Aug 29, 2006

I have created a SSIS package that transfer data from a Foxpro database to an instance of SQL Server 2005 Express. I used the wizard to create the package but I load and execute the package within a custom application that I have written in C#.

The way the custom application is intended to work is that the user can have the database in any location on the computer and all he has to do is specify the location then the application programatically changes the location of the source on the package that it has loaded and then execute it. When I initially run the package the first time (using the original path), it works fine and transfers the data. However, every subsequent time I run the application and specify a different path, the database on the SQL Server side gets created as expected but the data is not transfered!

Where am I going wrong? Do I need to save the package after I modify the source then reload and run it again or do i need to change something else in the Data Flow to make this work?

View 4 Replies View Related

Master Data Services :: How To Transfer Data From Table To MDS

Nov 26, 2015

I am newbie to MDS of SQL,want to know how we can transfer tables from two different SQL Databases to MDS.Suggest me the steps to proceed with any examples.

View 2 Replies View Related

Encrypting Column Data While Doing Data Transfer

May 8, 2007

Hi,

I have a SSIS project where I am transferring data from DB2 table to SQL Server table. There is a column called REC_ID which I need to encrypt before we store it in SQL Server. Now, SQL Server has buildin encryption functionality and we need to use that as there are views that will decrypt this column and give data to authenticated users.

So, the question is, is there anyway that I can encrypt the column data in my SSIS package using my target SQL server database key and using SQL server encryptbykey function while transferring?

Thanks,
Ujjaval

View 1 Replies View Related

Transfer Data Between Two Data Flow Task

Feb 1, 2007

Hi,

Can I transfer data between two dataflow.

Is it possible through anyway?

Thanks

Dharmbir

View 4 Replies View Related

Help With Data Transfer

Aug 22, 2005

Hi everyone,I need some help transfering my database(SQL2005) to the host's server.In SQL 2000 I had the Management tools > DTS or ImportExport tools.SQL2005 lacks this, all I've got is Express Manager > can't connect to multiple databases.Can connect to one database and has a screen to excute TSQL commands.I don't want to have to recreate the whole database on the server.....This would be crazy... 150 stored procedures and 30 tables. Not to mention all the individual settings for each column.I know there is SQL Studio Management tools for the full version of SQL 2005. Anyone got any idea's ?Any input/suggestions is greatly appreciated.Thanks,JShep

View 1 Replies View Related

Data Transfer

Aug 3, 2000

can any body can tell how data trnsfer from oracle database to sql server database. what is the methods i can use? is it required to write scripts.
if scripts required, can anybody can give me sample scipt.

View 1 Replies View Related

DTS Data Transfer - V7.0

Nov 16, 2000

SQL v7.0 - DTS
Tying to transfer all object info, sp's, constraints and data in to a fresh new database in the same instance, but it's hit and miss when it comes to getting everything transferred. Followed step by step instructions (GUI/Scripts) and sometimes the table structure will transfer without PK's, as well as some data and if you're lucky, some constraints. Stored proc's have a tendency to show up 20 minutes later. I'm testing this on a machine with IE 5, SP2 and fresh new Dll's (just in case something was corrupted). Is there a priority as far as what to transfer first? For example, tables only 1st, then constraints on down to records parent to child? I am assumming you should be able to transfer all at the same time since it's built in to the utility. Or, does it come down to something in the schema? If anyone out there has experienced something similar and found a solution, please advise.

View 1 Replies View Related

Data Transfer From 65 To 70

Jun 14, 2000

hi,
I am having two servers one is 6.5 and another is 7.0.
I would like to export a one database from 6.5 to 7.0.
when i was trying to transfer the data it is saying u have to upgrade the server of 6.5.
pls tell me how i have to transfer data from 65 to 7.0
without bcp.

--raj

View 2 Replies View Related

How Transfer The Data

Nov 15, 1999

Hi,
here we have 5 servers,application server,datawarehousing server,web server,QA server and production server. so i suppose to transfer(by using DTS) the total data(GDWReports) from production server to QA server. so actually i exported that data from production server to one destination by using export wizard and i tried for import that data to qa server by using VB script.but i got one error that "login failed like that". so how to import the data. pl give the suggestions asap.
thanx
Janreddy

View 1 Replies View Related

Transfer Data

Nov 25, 2004

I want to transfer data from a sql2k database to access file.

How can I make a program which I can specify the database?

Can SQLDMO or bcp make it? then how?

thanks

View 1 Replies View Related

Transfer Data

Jan 10, 2006

I would like to ask about the Data transfer . I have huge data in Access database and want to transfer in the MS SQL Server 2000. Can some body help me how i can do it.
Thanks

View 3 Replies View Related

What Is The Best Way To Transfer Data?

Jun 5, 2006

I would like to transfer data from an SQL Server 2000(standard edition) on a server located outside of the department TO a laptop/notebook using MSDE located within the department. This will be 1 or 2 times a year of transfering the data from a server to a laptop. So what are some ways or the best ways of transferring data?

Thanks,

Don

View 14 Replies View Related

Best Way To Transfer Data

Jul 23, 2007

We are working with a Mexican developer to share data between our English database (SQL 2005) and his Spanish database (SQL 2000). We are thinking the best way to gain access to his data (since our website will need data from both databases) is to have them Export data from their Spanish tables into English tables within their database and replicate those tables to our database several times a day. Does this seem like a good idea - any suggestions for a better way to share the data? Thanks

View 3 Replies View Related

Data Transfer

Jul 23, 2005

I have a table in a database that has just over 1 million records, eachrecord about 50-60 characters. I need to transfer this data to anotherdatabase. I implemented two options:1) Read the data record by record and insert into the destinationdatabase, using ODBC. I played with different commit intervals, up to100,000. This version takes about 12 minutes. Having indexes on thedestination table or removing them made little difference.2) Dump the data into a flat file, and use bulk copy to read the fileinto the destination table. This takes less than a minute.Are these results within the normal ranges? I am particularlyinterested in a way to improve upon the first method.

View 3 Replies View Related

Data Transfer

Aug 22, 2006

hi,My problem is I am creating a new database. I need to all the tablesand procedures fromone databse to another database in sql server 2000, both in sameserver.Kalaivanan.

View 1 Replies View Related

Help With Data Transfer

Jul 20, 2005

Hi,We have a unique situation here that is puzzling me. I have a programthat uploads data to our SQL Server. The program runs fine on WIndows95. I have installed it on a Windows 2000 machine and it will connectto our data but will not upload. It processes the file but the datadoes not appear in the database.I have checked the ODBC setup and everything is the same except I usedsqlsvr32.dll instead of sqlsrvr.dll for the 32 bit driver.I know this isn't a lot of information to go on, but the program waswritten by a contractor who has since been replaced and I don't reallyhave an idea of even where to begin checking.Any suggestions would be appreciated.Thank you,

View 1 Replies View Related

Transfer Xml Data

Jul 10, 2007

Using SSIS, how is it possible to transfer the content of an xml file into an xml/varchar(max) field of a table in sql server 2005?
Thanks

View 1 Replies View Related

Data Transfer

Sep 4, 2006

Hi,

Not certain whether this is the right forum to post this question - please advise.

I am fairly new to SQL Server and need to know the best way to transfer data from one data base to another.

For example:

I have a database running via SQL Server 2005 developer edition and another running using SQL Server 2005 Express edition.

If I do a backup on the developer edition I get an error and failure when attempting to upload the data on to the Express edition.

What am I doing wrong can anyone advise?

Also what is the best way to add/remove/update stored procedures and or change the database table structures for a current database (MySql for example allows one to type command line calls direct to the relevant database to alter database tables).

Thanks Andrew

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved