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 is the difference between dataadapter and datareader?

0 Answers  


What is a trigger and its types?

0 Answers  


How to call a function from a stored procedure in SQL Server ?

0 Answers   HCL,


How to create function with parameter in sql server?

0 Answers  


What specific conditions database should meet, before you can bulk copy data into it using bcp?

0 Answers  






How to download and install microsoft sql server management studio express?

0 Answers  


Why does a sql statement work correctly outside of a user-defined function, but incorrectly inside it?

0 Answers  


Table - Products has number of products as below Productid ProductName 1 iPhone 2 iPad 3 BlackBerry Table - SalesPersonProduct has the below records Salespersonid productid S1 1 S1 2 S1 3 S2 1 S3 2 Write a SQL query that returns the number of sales for each product

2 Answers  


explain databases and sql server databases architecture? : Sql server database administration

0 Answers  


how many clustered indexes can be created on a table? : Sql server database administration

0 Answers  


What does this statement do @@rowcount?

0 Answers  


IN Vs OR operator which is best to use sql server.

4 Answers  


Categories