Create table between 2 linked servers

  • I am still a little green in some parts of sql, but I have 2 SQL2005 databases, we will call them PROD1 and RPT1. What I need to do is drop a table on RPT1, we will call it CUST, then copy the CUST from PROD1 onto RPT1. What I was thinking of was dropping RPT1.CUST, then CREATING/SELECTING INTO RPT1.CUST from PROD1.CUST.

    Hope this makes sense.

    Any help would be appreciated.

  • Technically speaking that could work but you would need to make sure

    it is practical...ie

    How much data would you be pushing across the linked servers ?

    Do you need indexes on the remote end ?

    You may want to investigate an ssis solution.

  • I have never used SSIS, can you point me to a good website or book for dummies that could help me out?

  • 1)

    Drop table

    Generate the script of structure and date of the other table with Sql Publishing Wizard

    Run generated script

    2)

    Drop table

    Generate the script of the table

    USE bcp tool to load data (table -> file -> table)

    -------------------------
    - Name?
    - Abu Dalah Sarafi.
    - Sex?
    - 3 times a week!
    - No, no. Male or Female?
    - Male, female, sometimes camel...

  • Carol Adams (4/7/2009)


    I am still a little green in some parts of sql, but I have 2 SQL2005 databases, we will call them PROD1 and RPT1. What I need to do is drop a table on RPT1, we will call it CUST, then copy the CUST from PROD1 onto RPT1. What I was thinking of was dropping RPT1.CUST, then CREATING/SELECTING INTO RPT1.CUST from PROD1.CUST.

    Hope this makes sense.

    Any help would be appreciated.

    What is the volume of the data?? does it has any partitions??

  • These are actually Great Plains databases that I need to move from one server to another overnight. The problem is there are over 100 databases from 2mb upto 2gb in size.

    The way they had me set it up was to create .bak files, copy them over the network, then restore them on to the 2nd server.

    It is taking FOREVER!! Like 14 hours for 70ish databases.

    So I was thinking of replication by rebuilding the databases.

    I may be way off on this but the way they have this set up is not working out too well.

  • Carol Adams (4/8/2009)


    The problem is there are over 100 databases from 2mb upto 2gb in size.The way they had me set it up was to create .bak files, copy them over the network, then restore them on to the 2nd server.

    that is not a huge database. Did you think of compressing the .bak files and then send them over your network? but the number is too many.

    It is taking FOREVER!! Like 14 hours for 70ish databases.

    So I was thinking of replication by rebuilding the databases.

    Logshipping or database mirroring? or is that you have to replicate only few objects?

  • The problem is that the network is crap. But I have no control over that and I still need to get my work done.

    We need a duplicate of the production databases so that the user can run a billing process off of them.

    I believe this idea came from the vendor of the software for the billing process.

  • In that case you could think of Pull subscription where the subscriber pulls the data from the publisher whenever the network is connected.

Viewing 10 posts - 1 through 9 (of 9 total)

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