.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> Sql Server >> Post New QuestionBookmark and Share Subscribe to Forum

Restoring the Database

Posted By: Savi3     Posted Date: August 27, 2008    Points:2   Category :Sql Server
Am Using the SQLServer 2005.
Through Coding how to restore the Database


Advance Thanks

Responses
Author: Pankaj Mishra             
Posted Date: August 27, 2008     Points: 5   

HI,
Its simple use this sql query to restore database with simple ADO command to call stored procedure

check this article

http://www.sqlmag.com/Article/ArticleID/46560/sql_server_46560.html

Hope this will help you

Cheers
Pankaj

Author: sriram             
Posted Date: October 28, 2011     Points: 20   

BACKUP DATABASE:


BACKUP DATABASE FROM DISK='D:\BACKUP\PUBS.BAK'

RESTORE DATABASE:


RESTORE BATABASE TO DISK='D:\BACKUP\PUBS.BAK'

REGARDS
SRIRAM



Author: Narayanan             
Posted Date: February 22, 2012     Points: 20   
Author: Ashutosh Jha             
Posted Date: December 26, 2013     Points: 20   

Hi,

Below is the code to restore the database-
RESTORE DATABASE new_database_name

FROM backup_device [ ,...n ]

[ WITH

{

[ RECOVERY | NORECOVERY ]

[ , ] [ FILE ={ backup_set_file_number | @backup_set_file_number } ]

[ , ] MOVE 'logical_file_name_in_backup' TO 'operating_system_file_name' [ ,...n ]

}

;


for more details follow below link-

http://technet.microsoft.com/en-us/library/ms186390.aspx

Regards,
Ashutosh Jha
ashutosh741@gmail.com

http://www.tricksroad.com


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend