i have two database A,B with same number of tables and schema in sql server. All tables contain autogenerated PK, both databases contain their own data.
Now i have to move all data of A to B. because i want to use only one database in future
i tried to move them with SSIS packages but it copied data with new PK. so where these keys are using as FK lost there reference and data is going to corrupt.
Please help me out, how i can move data with there all constraint and PK,FK consistency.
One simple way to do it, without SSIS, is to have SSMS (SQL Server Management Studio) script out the entire database, including both schema and data, and then run the script against the target database. I have done this many times, and it works quite well.