How can i forcibly make my developers to use StoredProcedure Naming conventions??
-
Hi, I would like to implement Stored procedure naming conventions on my databases? I don't want to mess up with developers for this. Is there any way with which my server automatically check whether the request coming for creation of stored procedure following naming conventions or not?? and if not then it pass error message to developer. Regards, Aman
-
Hi, I would like to implement Stored procedure naming conventions on my databases? I don't want to mess up with developers for this. Is there any way with which my server automatically check whether the request coming for creation of stored procedure following naming conventions or not?? and if not then it pass error message to developer. Regards, Aman
Try this create a database[schema] level trigger for CREATE in your database. go through this for more info..... Data Base Level Triggers[^] Cheers..
Rajesh B --> A Poor Workman Blames His Tools <--
-
Hi, I would like to implement Stored procedure naming conventions on my databases? I don't want to mess up with developers for this. Is there any way with which my server automatically check whether the request coming for creation of stored procedure following naming conventions or not?? and if not then it pass error message to developer. Regards, Aman
First, have a policy; make sure everyone has a copy and has read it. They don't need to agree with it, only agree to comply with it. Second, be sure your policy states that stored procedure names do not begin with sp_. Third, try the honor system, and see if you need to take further steps. Fourth, fire any offenders. Fifth, do as Rajesh said. Sixth, abandon using stored procedures, they are nothing but trouble.
-
Try this create a database[schema] level trigger for CREATE in your database. go through this for more info..... Data Base Level Triggers[^] Cheers..
Rajesh B --> A Poor Workman Blames His Tools <--
Does SQL Server support database level triggers? Just realised that the OP doesn't say he is using SQL Server, but I guess the point is, not all databases support database or schema-level triggers.
-
Does SQL Server support database level triggers? Just realised that the OP doesn't say he is using SQL Server, but I guess the point is, not all databases support database or schema-level triggers.
David Skelly wrote:
Does SQL Server support database level triggers?
Yes - Sqlserver supports the Schema Level Triggers. Sql Server Schema level triggers syntex/examples[^]
David Skelly wrote:
Just realised that the OP doesn't say he is using SQL Server, but I guess the point is, not all databases support database or schema-level triggers.
your right.., but popular database like Oracle, Sqlserver , Mysql .. etc supports Schema Level Triggers . and if you see the OP requirement is such complex/hard to do in the small databases.
Rajesh B --> A Poor Workman Blames His Tools <--
-
First, have a policy; make sure everyone has a copy and has read it. They don't need to agree with it, only agree to comply with it. Second, be sure your policy states that stored procedure names do not begin with sp_. Third, try the honor system, and see if you need to take further steps. Fourth, fire any offenders. Fifth, do as Rajesh said. Sixth, abandon using stored procedures, they are nothing but trouble.
PIEBALDconsult wrote:
Sixth, abandon using stored procedures, they are nothing but trouble.
That may be your opinion, but many large companies (certainly most financial institutions) insist on them for ease of deployment - if your sql is in your code (dll or whatever) and you have thousands of users worldwide, changes are far more complex than a single stored proc change (even if it does get replicated).
Bob Ashfield Consultants Ltd