Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2001
    Location
    Belgium
    Posts
    6

    Exclamation Unanswered: SQLDMO - backup to a file NOT on server

    In my VB-application I'm using SQLDMO to create a backup of a database on a SQL server, and the backup file is always put on the server. I'd like to know how I can put the backup file on a local computer.

    example...
    Servername = "MainServer"
    Local PC-name = "TimG"

    How can I put a backupfile from a "Mainserver"-database on "TimG" in VB-code. I think this is a kind of hacking...

  2. #2
    Join Date
    Dec 2001
    Location
    Toronto, Canada
    Posts
    335
    Using SQL-DMO, the the BACKUP object has a property called FILES. Using this you could set the value to "TimG"

    Code:
    oBACKUP.FILES = "\\TimG\C$\Backup\DB.bck"
    The person running this job must have security access to the machine TimG and the machine where this is running from must be able to see the machine TimG.
    MCDBA

  3. #3
    Join Date
    Dec 2001
    Location
    Belgium
    Posts
    6

    Thumbs up

    Thanks for the reply, and indeed it works... but when you use the 'c$', only the administrator can execute the command. Better is when the c-drive on 'TimG' is shared. AND ... the SQL server must be started not with the system account but with the local account. (See properties of SQL-server -> Security -> Start with account...)

    Cheers, Tim

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •