Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««1112131415

Preventing usage of "SELECT *..." Expand / Collapse
Author
Message
Posted Tuesday, April 12, 2011 7:53 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, October 30, 2014 3:48 AM
Points: 1, Visits: 8
Hello,

With SQL Server 2008 (at least) there is a problem

DENY SELECT ON OBJECT::MA_TABLE(DUMMY_COLUMN) TO User1;

work like a charm (return an error) when I try to make a "SELECT *"

but in a stored procedure I can do a "select *"
CREATE PROCEDURE [dbo].[myProc]
AS
BEGIN
SELECT * FROM MA_TABLE;
END

Why ? I need to get an error when I execute a stored procedure which contains a "SELECT *"

Regards
Post #1092102
« Prev Topic | Next Topic »

Add to briefcase «««1112131415

Permissions Expand / Collapse