Link to home
Start Free TrialLog in
Avatar of lunchbyte
lunchbyte

asked on

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.
Avatar of sybe
sybe

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


Avatar of lunchbyte

ASKER

That backup the db on the server but I need it to backup on the local computer.
ASKER CERTIFIED SOLUTION
Avatar of sybe
sybe

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.