Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Assuming it's a Microsoft SQL Server Database, then you can backup the database to a single file using the BACKUP DATABASE command.</p> <p>Backing Up: <a href="http://msdn.microsoft.com/en-us/library/ms186865.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/ms186865.aspx</a></p> <p>Restoring: [same URL as above, not got enough rep] /ms186858.aspx</p> <p>Backup Example:</p> <pre><code>BACKUP DATABASE AdventureWorks TO DISK = 'Z:\SQLServerBackups\AdvWorksData.bak' WITH FORMAT; GO </code></pre> <p>You could write this into a stored procedure and then call it in VB using a SQLCommand object. Here's a basic example:</p> <pre><code>Dim objCommand As SqlCommand = Nothing Dim objConnection as SQLConnection Try objConnection = new SQLConnection(sConnectionString) objConnection.Open() objCommand = New SqlCommand("P_YOUR_INSERT_SPROC", mobjConnection) objCommand.CommandType = CommandType.StoredProcedure objCommand.Parameters.Add(New SqlParameter("@SomeParam", pParamValue)) objCommand.ExecuteNonQuery() Return True Catch ex As Exception Throw Return False Finally objCommand = Nothing If objConnection.State = ConnectionState.Open Then objConnection.Close() End If End Try </code></pre> <p>If you need to move the backup off the server and bring it back down locally then you can use something like FTP or something to bring the actual file down. Or.. if you just wanted to store it remotely and be able to restore it at will then you can name it to something which you can store, which gives you enough information to generate the RESTORE function.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload