| | |
How to move a SQL Server Database from One Server to another server
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Nov 2008
Posts: 63
Reputation:
Solved Threads: 10
There are a few options but one of the simplest is to detach the database from the server, copy the phisical files to the new dataserver's datapath and attach it to the new dataserver.
For those actions you have to import Microsoft.SqlServer.Management.Smo.SmoApplication and use the EnumAvailableSqlServers() to find the available sql servers (from MSDE2000 up to SQL2008).
Found the correct server, you can call sp_attach_db on an active connection and include the correct physical-filenames (for the mdf & ldf file) to attach it.....
Regards,
Richard
The Netherlands
For those actions you have to import Microsoft.SqlServer.Management.Smo.SmoApplication and use the EnumAvailableSqlServers() to find the available sql servers (from MSDE2000 up to SQL2008).
Found the correct server, you can call sp_attach_db on an active connection and include the correct physical-filenames (for the mdf & ldf file) to attach it.....
Regards,
Richard
The Netherlands
•
•
•
•
How to move (or Duplicate) a Microsoft SQL Server Database from One Physical Server to another server (like backup) in vb.net 2.0 ?
Move is deleting DB from first server and put it is second server
Duplicate is both server having the same DB
So,
First you choose which one you want (Move or Duplicate)
Second, you want to do that by vb.net coding or manual?
When dealing with servers (which are usually important to the company) the safest way to move the database, is to duplicate it first.... then later remove it from the source. So while you are right, moving and duplicating are different.... would you think it is wise from an administration point of view to move the data? No. You duplicate the data... then if everything goes well, you delete the old data. So, assuming we are people who have server administration experience (could be a big assumption), I'd say it's a safe bet to not even talk about the act of "moving" data directly.........
Hi Comatose
That is not necessary.
De-Attach and Attach are safe method and you can do it with no fear of data lost unless the database you want to move has a replication.
I agree, always take a backup before doing such thing
There is three kind of copying/duplicating the DB from one server to another. Backup/Restore,De-attach/Attach, Copy Directly from source to destination.
Each one has it is own characteristics and depends on the situation(error in replication, server hardware failure, etc..) he should choose which one he should use.
I have Microsoft certificate in MSSQL Server Admin in 2003 ad I have 8 years of experience in SQL Server Administrator
•
•
•
•
When dealing with servers (which are usually important to the company) the safest way to move the database, is to duplicate it first....
De-Attach and Attach are safe method and you can do it with no fear of data lost unless the database you want to move has a replication.
•
•
•
•
then later remove it from the source. So while you are right, moving and duplicating are different.... would you think it is wise from an administration point of view to move the data? No. You duplicate the data... then if everything goes well, you delete the old data.
There is three kind of copying/duplicating the DB from one server to another. Backup/Restore,De-attach/Attach, Copy Directly from source to destination.
Each one has it is own characteristics and depends on the situation(error in replication, server hardware failure, etc..) he should choose which one he should use.
•
•
•
•
So, assuming we are people who have server administration experience (could be a big assumption), I'd say it's a safe bet to not even talk about the act of "moving" data directly.........
Last edited by samir_ibrahim; Feb 6th, 2009 at 11:36 am.
![]() |
Similar Threads
- JSP database connectivity according to Model View Controller (MVC) Model 2 (JSP)
- Querystring values not matching with the SQL statement (ASP)
- asp-sql connection (ASP)
- Best choise for a local application database (C#)
- radio button ASP question?? (ASP)
- Tutorial: Search a Database (ASP)
- hover over text tips (JavaScript / DHTML / AJAX)
- need help phpbb please (PHP)
Other Threads in the VB.NET Forum
- Previous Thread: login form
- Next Thread: Field flashes when assigned value then disappears
| Thread Tools | Search this Thread |
"crystal .net .net2005 30minutes 2008 access add application arithmetic array assignment basic binary box button buttons center click code combo combobox component connectionstring convert cpu data database databasesearch datagrid datagridview design dissertation dissertations dissertationthesis dosconsolevb.net editvb.net employees excel exists firewall folder image images isnumericfuntioncall login math memory mobile module ms msaccess mssqlbackend mysql navigate net opacity pan peertopeervideostreaming picturebox picturebox1 port print printpreview problemwithinstallation project record regex reports" reuse right-to-left save savedialog search serial sorting sqldatbase storedprocedure string temp textbox timer txttoxmlconverter updown useraccounts usercontol usercontrol vb vb.net vb.netcode vb.nettoolboxvisualbasic2008sidebar vbnet view vista visual visualbasic visualbasic.net visualstudio web wpf xml






