write the query for taking database restore in sql?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Give an example of SQL injection attack ?

568


what is database replication? : Sql server database administration

528


How to delete duplicate rows in sql server?

572


What are the properties and different types of sub-queries?

558


What are ddl (data definition language) statements for tables in ms sql server?

538






What stored by the model? : sql server database administration

544


as a general practice, it is recommended to have dbo be the owner of all database objects however, in your database you find number of tables owned by a user other than dbo, how could you fix this? : Sql server administration

534


Can a stored procedure call itself or a recursive stored procedure? How many levels of sp nesting is possible?

577


Find columns used in stored procedure?

525


What does it mean to normalize data?

512


How do users use Report Builder with SQL Server data sources?

119


What is identity?

548


How to retrieve error messages using odbc_errormsg()?

538


Explain an automatic checkpoint

560


Which are new data types introduced in sql server 2008?

598