Backup permission
- From: "Matthew" <inetuser@xxxxxxxxxxx>
- Date: Fri, 21 Sep 2007 13:02:52 +1200
I have just added to an application I am working on the ability for the user
to create a backup of the database the application is connected to. The
backup works just fine, but prior to the backup I'd like to be able to check
that the user has BACKUP DATABASE, BACKUP LOG and CHECKPOINT privileges so
they won't potentially get a nasty error back from the database server.
As both Sql Server 2000 and Sql Server 2005 must be supported, I've used the
PERMISSIONS function to check for these privileges on the former and the
fn_my_permissions stored procedure for the latter. The problem is that when
I try to test that this actually works, no matter which user I try (using
Microsoft Sql Server Management Studio), I can't seem to *remove* these
privileges from my test users. I've tried every combination of REVOKE and
DENY that I can think of on both Sql Server Authentication and Windows
Authentication users, but every time the fn_my_permissions stored procedure
continues to list all three privileges (using either NULL or 'username' as
the securable and 'DATABASE' as the securable class). What am I doing
wrong?
.
- Follow-Ups:
- Re: Backup permission
- From: Erland Sommarskog
- Re: Backup permission
- Prev by Date: Re: drop a database user. assign objects to dbo.
- Next by Date: Re: Authentication options with SS2005
- Previous by thread: Re: drop a database user. assign objects to dbo.
- Next by thread: Re: Backup permission
- Index(es):
Relevant Pages
|
|