Actually i don't have any idea with SQL and ASP.NET, therefore i'm searching for "restore my backup .bak" database folder. After searching i found the below code, but i don't know how to put this code in asp or aspx page. Can any one help me provide me asp or aspx page so i can downloaded and copy it in my server to restora my database
-- First determine the number and names of the files in the backup.
-- MyNwind_2 is the name of the backup device.
-- Restore the files for MyNwind2_Test.
RESTORE DATABASE MyNwind2_Test
MOVE 'MyNwind2_data' TO 'C:\MyData\MyNwind2_Test_data.mdf',
MOVE 'MyNwind2_log' TO 'C:\MyData\MyNwind2_Test_log.ldf'
I don't think I would put a restore command in an ASP.NET page, for a few reasons. First off, the web applications needs some significant permissions on the server. Is there a reason you are not using SQL Server Management Studio to do the restores?