Results 1 to 10 of 10
  1. #1
    Join Date
    Sep 2010
    Posts
    153

    Unanswered: How to take a back up?

    Hi guys,
    i want to know how to take a back up. i have everything in server and i am accessing database in server. whenever i am takign backup, it is getting saved in the server instead of local computer. i.e c, d, or e drive. Please let me know how to take a back up from the database which runs in server into the local system.


    Thanks

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Code:
    USE master 
    GO
    
    BACKUP DATABASE my_db
    TO DISK = 'E:\backups\my_db_backy_wacky.bak'
    WITH 
        DESCRIPTION     = 'Full backup of my_db'
      , NAME            = 'my_db_backy_wacky'
      , CHECKSUM
      , STATS           = 10
    Enter the location you want. Note you should backup to a local disk and then move to where you need it, not backup to a remote location.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Sep 2010
    Posts
    153

    Smile it is not working :( and thanks

    its not working at all . may be my mistake or i am doing something wrong that is why it is not working. nyways thanks a lot

    thanks

  4. #4
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Without a definition of "not working" I'm afraid I can't help any further.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  5. #5
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    If it isn't working at all, someone turned the server off. Turn the server back on and your script should work nicely.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  6. #6
    Join Date
    Apr 2008
    Location
    Along the shores of Lake Michigan
    Posts
    242
    Be sure you have enough free space on the local drive that you are backing up to. A screen shot of the error you receive would be beneficial to those trying to help. As Pootle said, without a definition of "not working", we really can't offer much constructive help.

    -edit: sorry, "fat-fingered" that one!!
    Last edited by tosscrosby; 10-05-10 at 15:41.
    -- You can't be late until you show up.

  7. #7
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Quote Originally Posted by tosscrosby View Post
    As Pottle said
    You are now dead to me.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  8. #8
    Join Date
    Mar 2009
    Location
    Australia
    Posts
    113
    It sounds to me like the OP's problem is he's connecting to a remote server and executing a backup and expecting the resulting backup file to end up on his local machine.

    Not going to happen - unless you map a network drive. But that would be rather slow. Just transfer the file after the backup has completed.

  9. #9
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Quote Originally Posted by tosscrosby View Post
    -edit: sorry, "fat-fingered" that one!!
    Aw - I can never stay mad at you
    Testimonial:
    pootle flump
    ur codings are working excelent.

  10. #10
    Join Date
    Sep 2010
    Posts
    10
    Yes it does sound like op is trying to backup a remote DB. Without any further information about what isn't working 'at all' the amount of help you will get will be limited.

    Just keep in mind follow best practices and that should help. It's a general answer, but the details of the issue are general. As multiple people have said, backup locally, then offload those backups somewhere else.

    As a side note, I often see people buying expensive agents for backup programs to backup SQL Server databases directly. The best backup program in the world for SQL Server is SQL Server. Backup the database using the native commands, then offload to a share, tape, remote SAN, etc.

Posting Permissions

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