write the query for taking database restore in sql?

Answers were Sorted based on User's Feedback



write the query for taking database restore in sql?..

Answer / gtp

RESTORE DATABASE NewDatabase
FROM DISK='D:\Backup\NewDatabase.bak'
WITH
MOVE 'NewDatabase' TO 'D:\ActiveDB\NewDatabase.mdf',
MOVE 'NewDatabase_log' TO 'D:\ActiveDB\NewDatabase_log.ldf'

Is This Answer Correct ?    4 Yes 0 No

write the query for taking database restore in sql?..

Answer / sandeep thakur

IN SQL SERVER 2005:-->

RESTORE DATABASE database name FROM DISK
='E:\Dailybackup\backupname.bak'
WITH MOVE 'database name' TO 'D:\database\databasename.mdf',
MOVE 'database name' TO 'D:\database\databasename.ldf',
REPLACE

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More SQL Server Interview Questions

What are the steps you will take to improve performance of a poor performing query?

1 Answers   HCL,


What do you understand by sql server agent?

0 Answers  


What are a scheduled jobs?

0 Answers  


Hi, I Created 3 Tables Person(PersID[prkey],Name,Email,Password), Project(ProjName,ProjID[prkey],ProjLeader,ProjManager) & ProjectInvolvement(EntryDate,ProjID[frkey],PersID[frkey],ProjDuration). For this how can i INSERT,UPDATE & DELETE Through PROCEDURE? Please Post the Answer for me. Desai.

0 Answers  


How to write a query with a left outer join in ms sql server?

0 Answers  






What is the concept of optimization?

0 Answers  


What is a view and what are its advantages?

0 Answers  


What is the dbcc command and why is it used?

0 Answers  


How to query multiple tables jointly?

0 Answers  


Define synonym?

0 Answers  


What is the difference between char, varchar and nvarchar?

0 Answers  


How create table structure only from tableA to TableB if TableA have some data?

4 Answers  


Categories