var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Permissions issue
We have about 100 objects including tables and procedures,in our DDL scripts after creating the objects, we are also executing the following commands.
grant all on <object_name> to public.
Since we are granting permissions to public all the objects are wide open, any user who can access the database can access all the tables.
I want revoke these permissions from all the objects and grant permission to only dbo.
Ex: grant all on <object_name> to <db_dbo>
Can I revoke and grant permissions in two statements, one to revoke from all the objects another to grant permission on all objects to dbo .
If the tables/objects are owned by the dbo, then you don't need to grant anything - access to tables that you own is implicit.
The revoke request has to be done on a per-object basis, but it is fairly easy to create such a script. For example, to revoke access from all tables:
select "revoke all on " + name + char(10) + "go" from sysobjects where type='U'
Save the output in a file, and then execute the file.