September 23rd, 2008 by Andrew Chen
Different database system has different level of control on the truncate statement.
In Sybase you can grant the truncate
privilege to user. In SQL or Oracle database you can not do that. In Oracle in order to truncate a table you have to have the right to drop any table which is not good in terms of security. So in order to grant the truncate privilege in Oracle you have to run this statement: “Grant drop any table to user” and you need DBA access to grant that.
In SQL Server it is more restrictive. The minimum privilege need to truncate a table is to alter table. So in order to truncate a table you can run this statement: “grant alter on yourtable to someone”
I am no expert on Sybase and Oracle. So drop a few lines if you find this information not accurate. I didn’t do any post for a long while and I am trying to find more topics to write on and post more frequently.
Related Posts:
Delete Can Not be Rolled BackThe Best Way to Grant Execution Right on xp_cmdshell and Cross Database Ownership ChainingRecover Data Using Transaction LogList All Permissions a User Has in SQL Server Database and Error 4064SQL Mail vs Database Mail
Posted in Programming, SQL Server | 4,443 views

Loading ...
RSS feed
| Trackback URI
No comments yet.