SQL Server Questions

  • Hi,

    I would like to find out whether there is a way to perform the following things by using the functions provided in SQL Server :

    1. Table A at Database1 (Database1 located at PC1).

    2. Table A at Database1 (Database1 located at PC2).

    Table A structure is same.

    I want to make both Table A data in Database1 & Database2 to be inserted or updated at Table B at MainDatabase which located at MainServer.

    Table B structure is similar with Table A, but extra 1 column to indicates data from which PC.

    Anyway to do this?

    Thanks.

  • As it looks like you are using SQL Server 2000, I'd use DTS packages to import the data from the two tables. Of course, you have only provided partial requirements. One main question, and I'm sure I could think of more given time, is how often does the data need to be pulled from the two databases?

    😎

  • DST need done manually rite?

    i think 5-10 minutes need pull the data

  • The creation of the DTS package has to be done manually and should be quite simple to do. It can be scheduled to run as often as you'd like, provided you save it after creation.

    -- You can't be late until you show up.

  • There's also a wizard in EM that creates a DTS package for you. Use the Import Wizard against the target server.

  • If my table contain primary key, will DTS package be done?

    If not mistaken, it will show error while copying...

    Please correct me if I'm wrong 🙂

    Thanks.

  • Depends on how you want to do it. You can export/import the entire data set or build a SQL script to insert only those rows that don't exist in the target table. Either option can be placed on a scheduler to run at the desired time. See Lynn's comments about providing partial requirements. Table structures, data samples of your target tables and a sample of the expected results would show us what exactly you're trying to accomplish. More info = more help.

    -- You can't be late until you show up.

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply