#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    81
    Rep Power
    12

    Moving SQL Db from one Server to another


    Hi -

    I have a database running on a server and its approx 50 MB. How can u mode the entire database to another server with all its tables, data and login details.

    Please let me know all possible ways.

    Thanks
    Rubal Jain
    Webspiders Interweb Pvt. Ltd. & Brainus Networks
    http://www.it2ecom.com | http://www.brainus.net
    Server Management | Dedicated Servers | Reseller Hosting
    Experienced, Qualified Techs | 24/7 Support Centers in India
    Helm Premium Partners | Email : sales@brainus.net
  2. #2
  3. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,453
    Rep Power
    4539
    You can use DTS to copy the entire database, including logins from the old system. Use the "copy objects and data" mode.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    81
    Rep Power
    12
    Hi Doug -

    I did it the same way - But It gives error and says Failed to do it ..
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    81
    Rep Power
    12
    Is there is any other possible way to do that.
  8. #5
  9. Modding: Oracle MsSQL Firebird
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2001
    Location
    Outside US
    Posts
    8,527
    Rep Power
    539
    Detach the database, copy files to the other server and Attach.
    Works better that DTS.
  10. #6
  11. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Location
    italy
    Posts
    5
    Rep Power
    0
    Hi Rubal
    Try this procedure
    1) Terminate all connection to the db U want to move, setting from enterprise manager the db in 'single user mode'.
    2) Keep trace of the files'names constituting your db (extention mdf (data file) ,and ldf (log file))
    3) From sql query analyzer , user master, Detach the above mentioned db with the system stored procedure sp_detach_db 'dbName',true
    4)From windows explorer select and copy db files to the target unit
    5)From query analizer in the new instance of your db (as master), Use sp_attach_db 'dbName',
    'path to data file (remember .mdf)',
    'path to log file (remember .ldf)'.
    Now you have moved your db from a machine to the other and it should perfectly working...
    Try and ... Good Luck form Jluke-b

IMN logo majestic logo threadwatch logo seochat tools logo