temp db backup

  • i have a question that can i take tempdb backup?

    my server is on it never stop////

    so can i take that backup?

  • You can, but there's no reason to do so.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • No, you can't. I just wonder how you can use that backup even if you can? Tempdb has information that is necessary for current stage of the user’s and other databases activity. Everything is out of date when the moment gone, the info is aged there the moment you dump it. Do not forget that tempdb rebuilds from scratch every time server is restarted.

    You are going to see message:

    Msg 3147, Level 16, State 3, Line 1

    Backup and restore operations are not allowed on database tempdb.

    Msg 3013, Level 16, State 1, Line 1

    BACKUP DATABASE is terminating abnormally.

    if you try to do it.

    Alex Prusakov

  • You cannot backup the tempdb. It gets recreated every time SQL Server is restarted.

  • As others have stated - no it is not possible. The real question is what problem are you trying to resolve? What data exists in tempdb that you need to keep and/or be able to restore?

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • Really I don't have any idea how to take that backup sure that you cannot do it couz everything is temporary and also what do you need it! :hehe:

    ============================================================
    SELECT YOUR PROBLEM FROM SSC.com WHERE PROBLEM DESCRIPTION =
    http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]

  • san (5/7/2009)


    i have a question that can i take tempdb backup?

    my server is on it never stop////

    so can i take that backup?

    No, but why did u want to though? There's a solution for every problem....

  • Tempdb is not recovered like every other database, but it is re-created.

    Regards,

    Sam

  • Sorry to say, but surprised to see....everybody keep saying no....if you agree what’s the need to post reply? We should keep the forum easy readable so that users can see valuable information in a go without wasting time.

    Thanks,

  • Tempdb backup cannot be taken.After SQL Server starts,tempdb is automatically created so if we take its backup the database will be in inconsistent state :-).Even no need of taking its backup,how will you restore it and where.

  • parulpriya10 (2/3/2011)


    Tempdb backup cannot be taken.After SQL Server starts,tempdb is automatically created so if we take its backup the database will be in inconsistent state :-).Even no need of taking its backup,how will you restore it and where.

    This reply is pretty ironic if you read the one above:

    ...if you agree what’s the need to post reply? We should keep the forum easy readable so that users can see valuable information in a go without wasting time.

    Especially since this is a 1.5-year old thread...

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Although I agree with you, did you notice that it's his/her first forum post?

    Maybe when they get to 30 or 40 posts, you can start slamming them for any dumb ones 😀

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • Phil Parkin (2/3/2011)


    Although I agree with you, did you notice that it's his/her first forum post?

    I sure did 😀

    Education starts early 😛

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Well, that was question and one should answer that.:-P

  • Most people here pick things up pretty quick.

    Using a thesaurus to say the same thing in several hundred ways isn't going to impress anyone.

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

Viewing 15 posts - 1 through 15 (of 16 total)

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