Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Senior Coder NancyJ's Avatar
    Join Date
    Feb 2005
    Location
    Bradford, UK
    Posts
    3,172
    Thanks
    19
    Thanked 65 Times in 64 Posts

    Question Extracting Tables in SQL Server 2000

    Is there anyway to extract individual tables from an SQL Server database so that they can be inserted into another sql server database else where

    Basically I have a db running locally that I need to take 2 tables from and insert them into a live database but I cant find any way to do this

  • #2
    New to the CF scene
    Join Date
    Mar 2005
    Location
    Houston, Tx
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Ent. Manager

    You can do this fairly easily in Enterprise Manager - select the Table and then Export the data. Generate a SQL script to create the table, run that script on the other server (provided you don't already have that table created), then copy the data to the new server and Import it.


    Hope this helps...

  • #3
    New Coder
    Join Date
    Apr 2005
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    goto ent manager ..select the table u want to export ..wehn it asks for destination ..choose ur new destination server and table after conencting to it first..

    this will copy the table with all columns to new destination...

  • #4
    New to the CF scene
    Join Date
    Jun 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This one said it failed and didn't show up until I re-posted. That one was written better so blanking this one.
    Last edited by Bodestone; 06-12-2006 at 09:59 AM.

  • #5
    New to the CF scene
    Join Date
    Jun 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have been looking for a way to do this from a script so that file name and path can be dynamic as well as data format.

    Text output from a job is fixed width only and you can't get rid of headers. Similarly DTS packages are not dynamic enough. I would need to create one for every export type and database which isn't practical.

    The closest I have come so far is cursing through a query and preparing a string from the results which is then echod to a file using xp-cmdsahell.

    For obvious reasons though, this is not a practical solution for large data sets being exported from an actively in use database.
    Last edited by Bodestone; 06-12-2006 at 09:58 AM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •