SQL Server backup scripts

  • I am using SQL server 2005. I need some script that will do transactional backup every 2 hrs, differential backup every 6 hs and Full backup 2 times in a week. does any body have a script like that. or something similar will also be helpful.

    Thanks

  • and yes if if the script first create a folder by date every day.

  • any help is appreciated friends.............

  • You dont want much do you...

    You havent mentioned if this is for a single database or for all the user databases on the server.

    This is an example of a script that is on this site

    http://www.sqlservercentral.com/scripts/Backup+%2F+Restore/31932/

    or this for another example

    http://www.sqlservercentral.com/scripts/Backup+%2f+Restore/62380/

    --------------------------------------------------------------------------------------
    [highlight]Recommended Articles on How to help us help you and[/highlight]
    [highlight]solve commonly asked questions[/highlight]

    Forum Etiquette: How to post data/code on a forum to get the best help by Jeff Moden[/url]
    Managing Transaction Logs by Gail Shaw[/url]
    How to post Performance problems by Gail Shaw[/url]
    Help, my database is corrupt. Now what? by Gail Shaw[/url]

  • actually i have more than one databases............

  • have a look at the links that I gave to to you in my precious post, they should help you with your query.

    --------------------------------------------------------------------------------------
    [highlight]Recommended Articles on How to help us help you and[/highlight]
    [highlight]solve commonly asked questions[/highlight]

    Forum Etiquette: How to post data/code on a forum to get the best help by Jeff Moden[/url]
    Managing Transaction Logs by Gail Shaw[/url]
    How to post Performance problems by Gail Shaw[/url]
    Help, my database is corrupt. Now what? by Gail Shaw[/url]

  • thanks a lot.

  • But instead of coping over to server and then moving on the network path, is there anything to direct take a bak on the network path.

  • Of course you can do it:

    BACKUP DATABASE MyDatabase TO DISK = '\\myserver\myshare\MyDatabase.bak' WITH INIT

    Do not forget to provide the folder level permissions on a shared folder (myshare in my example) and to share this folder for your SQL Agent account.

  • Hi

    My "limited" experience of network backups are they work fine if the db is small but larger db's might have issues. We had a 75Gb db which 1 of the DBAs here initially set up to do a full network backup and it consistently fell over. To counter this and ensure we always had a recent backup we set up a local backup and then a copy across to the network location which then deleted the local bak file on successful copy.

    Obviously depends on the infrastructure capacity as well tho.

    KG

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply