Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
newsqlbee
Starting Member
3 Posts |
Posted - 2009-07-01 : 09:13:52
|
Hi Guru !!When i run a DBCC shrinkfile command i got an error that "User 'public' does not have permission to run DBCC shrinkfile for database"can someone please tell me what all the permission one should required to run the dbcc command? and why i am getting this msg?thanks in advanceRegardsChander |
|
rajdaksha
Aged Yak Warrior
595 Posts |
Posted - 2009-07-01 : 09:32:51
|
Because you are not connected as a sysadmin role member |
 |
|
newsqlbee
Starting Member
3 Posts |
Posted - 2009-07-06 : 03:11:07
|
quote: Originally posted by rajdaksha Because you are not connected as a sysadmin role member
I cant add the user into system admin role, can u please advice which else role can be appropriate for this specific task ?regardsshekhar |
 |
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2009-07-06 : 03:35:09
|
According to Books Online, DBCC Shrinkfile requires membership in the sysadmin fixed server role or the db_owner fixed database role. So, either connect as a member of sysadmin or as a member of db_owner for that database.--Gail ShawSQL Server MVP |
 |
|
|
|
|