| | |
How to move a SQL Server Database from One Server to another server
![]() |
•
•
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 10: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
Views: 2874 | Replies: 4
| Thread Tools | Search this Thread |
Tag cloud for VB.NET
.net .net2008 2005 2008 access ado.net application array arrays assignment basic bindingsource browser c# center checkbox client code combobox connection control convert crystal crystalreport data database datagrid datagridview dataset date datetimepicker design designer dissertation dissertations error excel file form gridview image images insert listview login loops mobile ms msaccess net null objects openxml path pdf port print printing printpreview problem read release save search security serial server settings shutdown sms socket sorting sql statement studio syntax tagging tags textbox time timer type update upload user validation vb vb.net vb2008 vbnet view visual visualbasic visualstudio2008 vs2008 web webbrowser windows wpf xml






