Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2010
    Posts
    7

    Unanswered: How to Export database in Sql server 2005

    How to Export a Database

    source db : 5 tables each with 1 million rows

    Now I want this in Destination : 5 tables each with only top 10,000 rows

    can any one help

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    The "top" 10,000 rows based on what criteria? There isn't any order on the rows in a table, although you can put an order on the rows in a result set.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    Oct 2010
    Posts
    7
    as db is big... i need to have only top few rows.... no criteria...

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Code:
    SELECT TOP 10000 *
       INTO destinationTable1
       FROM sourceTable1
    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  5. #5
    Join Date
    Oct 2010
    Posts
    7
    but destination is in different server? then how to manage

  6. #6
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Use a Linked Server, or use SSIS, or use BCP. It depends on how the servers are connected, what other conditions you're going to add after I answer this question, how much time you've got to learn, how much time you've got for the extract to run, etc.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Posting Permissions

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