By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,404 Members | 1,873 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,404 IT Pros & Developers. It's quick & easy.

How to restore backupfile from ASP.

P: n/a

i want to restore SQL Server 2000 database backup file
using ASP.I have some code to restore backup file but it
gives an error like "Device is not correct or Device-
offline.see error log files for more details".The relevent
code is:

Set srv=Server.CreateObject("SQLDMO.SQLServer")
srv.Connect "server", "sa", "thanks"
Set rest=Server.CreateObject("SQLDMO.Restore")
rest.Action=0 ' full db restore
rest.Files="D:\Arizona\Arizona_db_200412200200.BAK "
rest.ReplaceDatabase=True 'Force restore over existing
rest.SQLRestore srv

response.write "Done!"

set rest=nothing
set srv=nothing


How can i proceed?please give me the solution.Thanks in
advance.Otherwise could you please tell me,how can i
restore a backup file manually using SQL Server 2000
enterprise adition,Because in my system i don't have
original database,i contain only backup file.Now i want to
retore that file using ASP or manually.


Nov 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.