Data Migration from different Databases different tables - sql

I have a Db called Db1, and also I have a different Db called Db2. Db2 has no data. I want to migrate data from Db1 to Db2, but this two databases are not the same with each other. They include different tables, different column names.
Is there anyway to bind one or more tables or columns to other Db's tables columns to transport data?

SQL Server Integration Services
http://msdn.microsoft.com/en-us/library/ms141026.aspx
Using the SQL Server Import and Export Wizard to Move Data
http://msdn.microsoft.com/en-us/library/ms141209.aspx

Related

SQL Server Merge with two tables from different azure SQL Database from same Azure SQL SERVER

I need to merge with 2 different tables from 2 different azure SQL databases where as these two azure sql database are from same azure sql server.
also for performance imporvement purpose, what I need to do is bulk insert and/or bulk update. also, this will be continous activity. for very first time I have to merge all data which is huge. and then whenever respective topic recivies message, I need to add/update that single record only.
what are the different options to do the same. for both processes.
please help. thanks.
You can use Azure SQL Data Sync to merge those tables located on 2 different databases into a third and new database. You just need to create the table with no records, then use Azure SQL Data Sync with one-way sync from those 2 databases (member databases) to the newly created table on the new database (hub database). On the first sync data will be merged on the new table located on the hub database. Every time a record gets updated, deleted or new record arrive on the member databases then that data change is replicated to the hub database and to the merged table.
To know more about the free Azure SQL Data Sync please read here.

Copy from one SQL Server database to another same database on other machine the data for specific dates

I have two identical databases (Schema) in two machines and I need to copy all the data from one database to the other from the date '20/09/2014' to the date '23/09/2014' how can I do it with SSMS? (or other tool maybe entity framework...)

Tool for comparing two databases and creating ALTER scripts to sync them

I have two IBM DB2 databases A and B with different database schemas. Database A schema is older, and database B schema is newer. I would neet to create SQL alter scripts that can update A schema to match that of B schema. This can ofcourse be done manually, but is there a tool that could analyse the two databases and do this for me?
I am using the free IBM Data Studio client for querying the database. Can the above operation be done using this tool?
Redgate sql compare is one of tge bests.

Copy (Import) Data from Oracle Database To Another

I want to Copy a data from One oracle database to another.
I have checked Import/Export Utility but the problem is import utility doesn't support conflicts resolution techniques between rows.
For Example if there's a table in the source database have the same row key in the destination database. if i use 'Ignore' parameter with value = y, the destination table will have a duplicate rows.
I want to ask if there's another way to import data from oracle database to another with some mechanism of detecting the conflicts and resolve them?
You might want to consider using a database link from database A to database B. You can query the data from database B to insert into your database A tables. You are free to query whatever you want using SQL or PL/SQL.
More on database links:
http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_5005.htm

How can i combine more then one database's data in one database with same schema

I have a 5 database with same schema, i want to copy all data in one database with same schema
or how can i copy data from *.mdf files in database.
i am using sql server 2005
Copy Database with T-SQL:
sqlauthority
http://blog.sqlauthority.com/2009/07/29/sql-server-2008-copy-database-with-data-generate-t-sql-for-inserting-data-from-one-table-to-another-table/
Copy Database with Wizard:
kodyaz
http://www.kodyaz.com/sql-server-tools/sql-server-copy-database-wizard.aspx
I'd suggest taking a look at Red Gate SQL Data Compare. That will enable you to merge the data between the two databases and directly control which one wins in any given situation.
As mentioned above you need to deal with the Primary Keys as well...
One way to deal with this to add a "Database ID" to all the tables in the single central version. The central PKs become the PK from the source table, plus the "Database ID". This way you have unique PKs in the central version AND you can tell which database the row came from. This is what sql-hub does - there is a free licence which will let you do this as a one-off task - or you could do the inserts for each database and table in SQL.