locked
Send data to another database RRS feed

  • Question

  • Hi everyone!!

    I've got a database in sql 2008 that is already populated by data... These tables are on a network where various companies uses these tables. Now I created local tables (in visual studio itself) where I have to copy all the information belonging to this company into this local tables... Does anybody know how I can send/copy information from one database into another?

    The local tables are exactly the same as the database on the network....

    Any help will be greatly appreciated!!! Thank you very much in advance!!

    Kind Regards


    Rising Storm Technologies
    Tuesday, March 8, 2011 7:15 AM

Answers

  • You have a number of options that can be used separately or in some combination. Things to consider:
    Use SSIS to create a package to periodically move data.
    Use SQL Server transactional replication to keep tables on two servers synchronized or perhaps just snapshot replication to create the original copy.
    Use bcp to copy out the data to a text file, and then use bcp to copy data into a new server.
    Use linked servers and execute SELECT INTO ... to create copies of tables.


    Rick Byham, Microsoft, SQL Server Books Online, Implies no warranty
    • Proposed as answer by Papy Normand Tuesday, March 8, 2011 9:08 PM
    • Marked as answer by KJian_ Tuesday, March 15, 2011 5:33 AM
    Tuesday, March 8, 2011 4:45 PM

All replies

  • You have a number of options that can be used separately or in some combination. Things to consider:
    Use SSIS to create a package to periodically move data.
    Use SQL Server transactional replication to keep tables on two servers synchronized or perhaps just snapshot replication to create the original copy.
    Use bcp to copy out the data to a text file, and then use bcp to copy data into a new server.
    Use linked servers and execute SELECT INTO ... to create copies of tables.


    Rick Byham, Microsoft, SQL Server Books Online, Implies no warranty
    • Proposed as answer by Papy Normand Tuesday, March 8, 2011 9:08 PM
    • Marked as answer by KJian_ Tuesday, March 15, 2011 5:33 AM
    Tuesday, March 8, 2011 4:45 PM
  • Hello,

    Please, could you tell us how to have created your tables ? You have said "in Visual Studio itself", but it is not clear;

    Have you used in the main menu of Visual Studio , the menuitm Data , the subitemmenu Add a connection and you arrived to the datasource configuration wizard ? Please, check that , in the connection string, you have not user instance = true. If user instance = true, it is not the good way to create your database ( you have created an user instance which can be used locally and you cannot load it or send/copy information between the original and the local databases in a simple way ( none of the solutions proposed by Rick are useable ).

    If user instance = false, all the solutions provided by Rick are oK.

    Have a nice day  


    Mark Post as helpful if it provides any help.Otherwise,leave it as it is.
    Tuesday, March 8, 2011 9:07 PM
  • Hi there!!

    Yes sorry, I did create it in the menu item Data - Add connection...  Will give Rick's a try...

    Thanks very much for your help!! Really appreciate it!!!

    Kind Regards


    Rising Storm Technologies
    Wednesday, March 9, 2011 6:36 AM