|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Copying SQL database from one server to other
Hi All, I need to take a copy of a database present in a SQL server to other SQl server using VB.net code. I can make it out with wizards but i need the query to execute it thru vb.net. Thanks Aravind.... |
|
#2
|
|||
|
|||
|
Hi,
1. create a dts package 2. Execute that package from code. Public Sub dtsstart(DtsName As String) Dim oPackage As New dts.Package On Error GoTo eh Dim sServername Dim sUid Dim SPwd sServername = "" sUid = "" SPwd = "" oPackage.LoadFromSQLServer sServername, sUid, SPwd, _ DTSSQLStgFlag_Default, "", "", "", DtsName, 0 'Execute the Package oPackage.Execute frmLog.WriteLine oPackage.Description & vbCrLf, vbBlue 'Clean up. Set oPackage = Nothing Exit Sub eh: MsgBox Err.Description, vbCritical, _ "Error refreshing " End Sub Best regards Eddy |
|
#3
|
|||
|
|||
|
Thanks but our sql servers are in a workgroup, so DTS wll not work..
Is there any other solution to copy data from one SQL server to other |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Copying SQL database from one server to other |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|