[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 303
  • Last Modified:

backup the db remotely via vb6

Backup the database from remotely

Sometime users will need to send us their backup so we can review their data or fix it. It has been done for years using MS Access and we are now migrating over to MS SQL.  Is it there syntax or something that I can write in VB6 to copy the database to the user machine then zip it up? In the past all we had to do was zip up the mdb file and this was possible because mdb file has to be in shared folder out on the server.

I am open to any suggestions.
  • 2
1 Solution
You can create a backup of a SQL Server by running a TSQL command:

sSQL = "BACKUP DATABASE [databasename] TO DISK='C:\temp\backup.bak'"
Connection.Execute(sSQL), , 128

lunchbyteAuthor Commented:
That backup the db on the server but I need it to backup on the local computer.
Create a share on the server where the backups are created, and users can get it from there. You have it in a file (just like the Access file), and you knew how to deal with that. Use the same procedure.
Anthony PerkinsCommented:
In general, it is not recommended to backup (not to mention difficult to accomplish) using the standard SQL Backup.  You are better off doing a backup to the server and then copying the backup to the local drive.  Assuming you have permissiong, that is.

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now