Question

I had created a USER, named Sandra and I granted her a SELECT privilege to a TABLE with GRANT OPTION.

I had created another USER, named Jim.

Sandra then granted her SELECT privilege to Jim.

When I was trying to DROP USER Sandra, an error message came out saying:

Msg 15284, Level 16, State 1, Line 1
The database principal has granted or denied permissions to objects in the database and cannot be dropped.

I'm wondering is there a CASCADE OPTION in DROP USER in SQL Server 2005 databases?

Thanks in advance :)

Was it helpful?

Solution

no there is no such option. you have to wrote code for that to find and drop ownership owned by this user.

check the bwlow link.

MSDN BOL "Drop User"

"Users that own securables cannot be dropped from the database. Before dropping a database user that owns securables, you must first drop or transfer ownership of those securables"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top