Search This Blog & Web

Monday, March 30, 2009

Database restore using T-SQL

If you find difficulty with SSMS to restore your database you can restore it with T-SQL as follows.

RESTORE DATABASE CC_DEV FROM DISK = 'C:\CC_DEV.bak' WITH MOVE CC_Data' TO 'c:\CC_Dev\CC_Data.mdf',MOVE 'CC_log' TO 'c:\CC_Dev\CC_Log.mdf'

This post will use for restore in all version of SQL SERVER

1 comment:

Shamas DBA said...

This helps me. when I am working from remote machine and do not have admin rights also when i got timeout error from remote machine.