Tuesday, 19 March 2013

RESTORE DATABASE ON ANOTHER LOCATION WITH SQL COMMAND



-CHECK .MDF AND .LDF LOGICAL NAME IF YOU HAVE A .BAK DATABASE BACKUP FILE-
 Restore filelistonly from disk='E:\DEMO1.bak'


 CREATE DATABASE DEMO1---CREATE A DATABASE 

   SP_HELPDB'DEMO1'

RESTORE DATABASE DEMO1 FROM disk='E:\Demo1.bak'
WITH MOVE 'DEMO1' TO 'E:\MOVE\Demo1.MDF',
MOVE 'demo1_log' TO 'E:\MOVE\demo1_log.LDF',REPLACE 

No comments:

Post a Comment