Copying tables from one database to another (databases are on different servers)

  • We have a production and development environment at our location.

    I was asked to move some tables that exist in the development environment into the production environment.

    The databases reside on different servers.

    Does SQL Server have the equivalent of Oracle Database links? I could then just do a 'create table as select * from @dblink'.

    SQL Server have that ability? If not...what is the best way to do so?

    Appreciate the help.

    -Jason

  • Use IMPORT/EXPORT Wizard to copy Table across Servers.

    Check the Indexes after you move the Tables.

    Or Use Linked server like : Select * into PRODSERVER.DatabaseName.dbo.productiontable from localTablename

    But using this method, the Keys/Indexes are not copied over. you will have to recreate them. Or if this is Going to be a regular Task, create a SSIS PAckage to do the same.

  • I use BCP for this.

    ---------------------------------------
    elsasoft.org

  • yes correct, Use BCP, if you have Heavy data Loads.

  • I am not familiar with BCP...can I trouble you to fill me in?

    THx.

  • bcp is a command line import/export tool. There are a multitude of command line options and switches. Books Online has a full list of all and some examples on usage.

    Basically you'd use it to export the tables to file, then you could copy the files to the other server and use bcp to import them again.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

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

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