471,852 Members | 1,183 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,852 software developers and data experts.

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 2223
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 YellowAndGreen | last post: by
aboka
reply views Thread by aboka | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.