469,592 Members | 1,889 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,592 developers. It's quick & easy.

Can't restore database in asp.net

ad
I want to backup and restore a database in asp.net.
The backup process is successful and fail when restore with message:

User does not have permission to RESTORE database 'Health'.
RESTORE DATABASE is terminating abnormally

the restore SQL is :
restore database Health from disk =
'D:\Data\ASPNET\Health8\Backup\myback.bck'
and the backup SQL is:
backup database Health to
disk='D:\Data\ASPNET\Health8\Backup\myback.bck' with init

The two state are all execute in asp.net, why the backup one can do, but the
restore on fail with no permission?

I have also test the Restore statement in Enterprise manager, it done
sucessfully.
Nov 19 '05 #1
1 2165
Have you doule checked the permissions required for RESTORE DATABASE
against the permissions granted to your login? See BOL [1]. Different
roles are required the the database does not exist compared to if the
database does exist....

[1]
http://msdn.microsoft.com/library/de...ra-rz_25rm.asp

--
Scott
http://www.OdeToCode.com/blogs/scott/
On Sun, 28 Aug 2005 11:53:51 +0800, "ad" <ad@wfes.tcc.edu.tw> wrote:
I want to backup and restore a database in asp.net.
The backup process is successful and fail when restore with message:

User does not have permission to RESTORE database 'Health'.
RESTORE DATABASE is terminating abnormally

the restore SQL is :
restore database Health from disk =
'D:\Data\ASPNET\Health8\Backup\myback.bck'
and the backup SQL is:
backup database Health to
disk='D:\Data\ASPNET\Health8\Backup\myback.bck' with init

The two state are all execute in asp.net, why the backup one can do, but the
restore on fail with no permission?

I have also test the Restore statement in Enterprise manager, it done
sucessfully.


Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Chris | last post: by
2 posts views Thread by Buck Turgidson | last post: by
4 posts views Thread by africantract | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.