Re: Schema Problems



John
If the user is an owner of the object he/she will be able to delete them,
however , in SQL Server 2005 we have a new feature as DDL Triggers.

You can create a trigger on database level to DENY some users to delete/drop
whatever


CREATE TRIGGER trg_capture_drop_table ON DATABASE FOR DROP_TABLE

AS

-- PRINT event information For DEBUG

PRINT 'DROP TABLE Issued'

-- Can investigate data returned by EventData() and react accordingly.

RAISERROR('You cannot drop tables in this database.', 16, 1)

ROLLBACK

GO

DROP TABLE dbo.f












"John" <John@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:9B5D971B-416C-45B0-AF82-DFD548D9A04A@xxxxxxxxxxxxxxxx
SQL 2005

"Arnie Rowland" wrote:

What version of SQL Server are you using?

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous


"John" <John@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:E8E1DA25-757A-4C64-979A-038CBE8CCB7E@xxxxxxxxxxxxxxxx
I am trying to add a new developer to access our SQL 2005 box. I
created a
role called "developer" and added him to the role. In the properties
for
the
role, I added several tables for select permission and the create
procedure.

I would like him to be able to select from certain tables and insert
into
others (doesn't seem to be too hard to do). However, I would like to
allow
creation of sprocs and tables, buy DENY dropping any sprocs or tables.
it
seems like the only option is to grant the "alter" permission at the
schema
level (schema for all tables is dbo).





.



Relevant Pages

  • Re: Schema Problems
    ... Most good judgment comes from experience. ... creation of sprocs and tables, buy DENY dropping any sprocs or tables. ... seems like the only option is to grant the "alter" permission at the ... level (schema for all tables is dbo). ...
    (microsoft.public.sqlserver.security)
  • Re: Schema Problems
    ... Most good judgment comes from experience. ... creation of sprocs and tables, buy DENY dropping any sprocs or tables. ... seems like the only option is to grant the "alter" permission at the ... level (schema for all tables is dbo). ...
    (microsoft.public.sqlserver.security)
  • Re: Granting EXEC to all my user sprocs in one hit
    ... this assigns the passed user id exec ... Grant the EXEC permission using SEMgr across all my user-sprocs at ... >> I'm detaching the live copy and copying the files across to dev machine, ... >> over 200 sprocs. ...
    (microsoft.public.sqlserver.security)
  • Re: Yukon schemas
    ... ALTER to the schema. ... you have to grant create permission to perform the action ... data and to create and alter stored procedures and views that they owned. ...
    (microsoft.public.sqlserver.security)
  • Re: Permission for a role...
    ... Best regards ... The role db_dealer owns schema AT. ... Permission checking is bypassed for the object owner. ... should only have permission to connect to the database and execute stored ...
    (microsoft.public.sqlserver.security)