Skip to main content

Posts

Showing posts with the label SP_

Restrict SP_ (Naming convention) with DDL Trigger

Sometimes naming convention also impact the performance problem in SQL SERVER. Whenever we creating the stored procedures we are giving the name just like SP_Get_Customer. SP_ it first checks the Master Database system procedures. All the system procedures stored in Master Database. In this article we do not allow SP_ whenever stored procedure creating by using DDL Trigger. --Create Student Table create table Student (                               id int identity ( 1 , 1 ) ,                 Name varchar ( 100 ) ) --Create DDL Trigger on Database create   trigger Restrict_Sp_NameConvenction on database for create_Procedure as begin declare @EventData XML = EVENTDATA (), @ObjectName Nvarchar ( 100 ); select   ...