Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2002
    Location
    Ireland
    Posts
    32

    Unanswered: Database backup using T-Sql

    Can anyone help me out here..I am experimenting with backing up a db using Transact-Sql Backup.
    I want to backup the database to a local drive say c:\databaseBk and a remote Server.

    I tried

    BACKUP DATABASE Mydb TO AlternativeServer but am getting errors here.
    I know there is more to it and I also tried as below...
    Even backup to remote for now would be perfect...if anyone has the code to do this locally that would be great also....
    I got this from BooksOnline......

    USE Mydb
    EXEC sp_addumpdevice 'disk', AlternativeServer,
    DISK ='c:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\Mydb.dat'

    -- Back up
    BACKUP DATABASE MyNwind TO MyNwind_1

  2. #2
    Join Date
    Apr 2002
    Posts
    31
    I've got another one for your collection:

    DUMP DATABASE dbname TO device WITH NOUNLOAD , INIT , NOSKIP

    Where is the problem lays?

    Regards,
    OBRP

  3. #3
    Join Date
    May 2002
    Location
    New York
    Posts
    35
    As far as I know you can not backup DB on the remote server - only on a local device (tape or drive).

  4. #4
    Join Date
    Nov 2001
    Posts
    36
    You can backup on a remote computer by :

    backup database dbname to disk='\\remote\server\path\filename.dbk' with init,noskip,NOUNLOAD

    This should help you to backup it up to a remote computer without any problem.

    Thanks.

  5. #5
    Join Date
    Apr 2002
    Posts
    31
    Make sure yours sqlserver runs on domain wide account, or account with write rights on remore compute.

    HTH,
    OBRP

  6. #6
    Join Date
    Jan 2002
    Location
    Ireland
    Posts
    32
    Thanks for that...

Posting Permissions

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