Restore the database into temp database

  • Hi,

    How can i restore the database into temp database in SQL server 2008 R2

    Advance Thanks.......,

  • The [tempdb] is re-created every time the SQL Engine is (re-)started. There is no need and it's even not possible to create a backup of the [tempdb].

    If you want to create a temporary restore of an existing datatabase: restore the backup and supply a different database name.

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • What exactly do you mean by 'restore as a temp database'? If you mean one you'll drop soon, that's no different from a normal database so just use the RESTORE DATBASE, specify a new name and specify a new location for the files.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 3 posts - 1 through 2 (of 2 total)

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