Is there any way to block a truncate command on a table via a trigger or
something else in MS SQL Server 2000?
Thanks,
--
JasonHere's a quote from Books Online:
"TRUNCATE TABLE permissions default to the table owner, members of the
symin fixed server role, and the db_owner and db_ddladmin fixed database
roles, and are not transferable."
Are you worried about the above users executing a TRUNCATE TABLE command?
Also note that this command cannot be run against a table that is referenced
by foreign key.
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"JasonDWilson" <JasonDWilson@.discussions.microsoft.com> wrote in message
news:9E2D92A7-C397-4538-9574-1133F9B37B33@.microsoft.com...
> Is there any way to block a truncate command on a table via a trigger or
> something else in MS SQL Server 2000?
> Thanks,
> --
> Jason|||If you don't want the table truncated, then don't issue the truncte in the
first place.
"JasonDWilson" <JasonDWilson@.discussions.microsoft.com> wrote in message
news:9E2D92A7-C397-4538-9574-1133F9B37B33@.microsoft.com...
> Is there any way to block a truncate command on a table via a trigger or
> something else in MS SQL Server 2000?
> Thanks,
> --
> Jason|||No.
Try better user/permissions management.
Do you have people that have been given symin or dbo privileges and are
going to go in and issue unauthorized TRUNCATE commands? I think you need
to fix that problem instead of trying to patch the symptom...
"JasonDWilson" <JasonDWilson@.discussions.microsoft.com> wrote in message
news:9E2D92A7-C397-4538-9574-1133F9B37B33@.microsoft.com...
> Is there any way to block a truncate command on a table via a trigger or
> something else in MS SQL Server 2000?
> Thanks,
> --
> Jason|||I want them to be able to truncate some tables, but not others.
--
Jason
"Aaron Bertrand [SQL Server MVP]" wrote:
> No.
> Try better user/permissions management.
> Do you have people that have been given symin or dbo privileges and are
> going to go in and issue unauthorized TRUNCATE commands? I think you need
> to fix that problem instead of trying to patch the symptom...
>
>
> "JasonDWilson" <JasonDWilson@.discussions.microsoft.com> wrote in message
> news:9E2D92A7-C397-4538-9574-1133F9B37B33@.microsoft.com...
>
>|||But only the table owner can truncate anyhow. Are you saying that these user
s act as dbo, the object
owner, db_owner or symin in your system?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"JasonDWilson" <JasonDWilson@.discussions.microsoft.com> wrote in message
news:76E0D204-6026-4BDB-8B54-F384FF67556A@.microsoft.com...
>I want them to be able to truncate some tables, but not others.
> --
> Jason
>
> "Aaron Bertrand [SQL Server MVP]" wrote:
>
No comments:
Post a Comment