Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks
USE [Act] GO /****** Object: StoredProcedure [dbo].[usp_DenyInsertDeleteUpdateTable] Script Date: 07/16/2009 10:48:41 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[usp_DenyInsertDeleteUpdateTable] ( @ARCHIVE_TABLE Char(100), @REVIEW_YEAR Char(4), @USER_NAME Char(50) ) AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; DECLARE @ARCHIVE_TABLE_NAME varchar(100) DECLARE @SQL_STRING varchar(2000) SET @ARCHIVE_TABLE_NAME = RTRIM(@ARCHIVE_TABLE) + @REVIEW_YEAR SET @SQL_STRING = 'USE ACT; ' SET @SQL_STRING = @SQL_STRING + 'DENY DELETE, INSERT, UPDATE ON OBJECT::dbo.' + @ARCHIVE_TABLE_NAME + ' TO [' + @USER_NAME + '] ' EXECUTE usp_ExecuteSQL @SQL_STRING END
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.