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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Sql 2000 permission on truncate statement

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-10-28 : 07:57:44
Luca writes "How can i truncate a table in sql 2000 if i don't have permission to do it? i can have permissions to execute stored procedures... I've seeing that in sql 2005 this is grant by the "execute as" command...but in sql 2000?
For example: Sam have account Sam, and he has permissions only like "db_writer","db_reader" and another, customizable, "prova".
I am the db_administrator and i grant to Sam permission to create table,view and execute s.procedures,but i don't want that Sam has dbadmin permissions. How can i allow to Sam to truncate a dbo.test table? Thanks... "

robvolk
Most Valuable Yak

15732 Posts

Posted - 2005-10-28 : 07:59:28
From Books Online:
quote:
Permissions

TRUNCATE TABLE permissions default to the table owner, members of the sysadmin fixed server role, and the db_owner and db_ddladmin fixed database roles, and are not transferable.
Add Sam to the db_ddladmin or db_owner database roles, otherwise there's no other way.

Go to Top of Page

jbates99
Constraint Violating Yak Guru

396 Posts

Posted - 2005-11-03 : 14:46:50
... see if Sam can execute this:
DELETE FROM tablename

This will remove all rows, just not as fast as truncate table. Worth a try.
John
Go to Top of Page
   

- Advertisement -