[dba-SQLServer]SQL-DMO backup remote database

Elizabeth ecarey at myway.com
Thu Apr 24 11:26:14 CDT 2003


Hi,

I just joined the list, so I apologize if this topic has been covered.

I have a situation where we have some packaged-off-the-shelf software called IRIMS that is using MSDE (version 8) for the backend.  There appears to be no backup capabilities written in the software, so I am writing some code to handle it – using SQL-DMO (pretty cool stuff).  We are on Windows 2000 machines, locked down for everyone to the power user level.  I do not have access to Enterprise Manager, and DBAMgr (freeware) won’t install properly without administrator rights to the PC.  

Now my question is, has anyone been able to get around the problem of not being able to backup a remote database? My code snippet:

oServer.LoginSecure = False
oServer.LoginTimeout = 60
oServer.Connect "remote_server_name", "sa", ""
oBackup.Database = gstrDBName
oBackup.Files = "C:\Temp\" & gstrDBName & gnFileNumber & ".bak"
oBackup.SQLBackup oServer

This runs fine.  I get no error raised.  I have confirmed my connection to the database. The SQLBackup method runs without error, it just doesn’t create the backup file.  If I connect to the database on the remote machine and run the backup command from the “Tools, Database Utilities” menu in Access, Access complains that it can only backup a database running on the local machine.

Any ideas?

Thanks,

Elizabeth Carey
mailto: beth6230 at thecareys.net


_______________________________________________
No banners. No pop-ups. No kidding.
Introducing My Way - http://www.myway.com


More information about the dba-SQLServer mailing list