Re: Backup permission
- From: Erland Sommarskog <esquel@xxxxxxxxxxxxx>
- Date: Fri, 21 Sep 2007 22:22:47 +0000 (UTC)
Matthew (inetuser@xxxxxxxxxxx) writes:
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?
Without know what you are doing, it's up to guesses, and the thought
comes into mind is that the test users are members of the sysadmin
role.
It could help if you posted a script that demonstrtes the problem.
--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.
- Follow-Ups:
- Re: Backup permission
- From: Matthew
- Re: Backup permission
- References:
- Backup permission
- From: Matthew
- Backup permission
- Prev by Date: Re: sa account Connections
- Next by Date: Re: Unauthorized IP address attached
- Previous by thread: Backup permission
- Next by thread: Re: Backup permission
- Index(es):
Relevant Pages
|
|