Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. How can i forcibly make my developers to use StoredProcedure Naming conventions??

How can i forcibly make my developers to use StoredProcedure Naming conventions??

Scheduled Pinned Locked Moved Database
questiondatabasesysadminhelp
6 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Aman786Singh
    wrote on last edited by
    #1

    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

    R P 2 Replies Last reply
    0
    • A Aman786Singh

      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

      R Offline
      R Offline
      Rajesh Anuhya
      wrote on last edited by
      #2

      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 <--

      D 1 Reply Last reply
      0
      • A Aman786Singh

        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

        P Offline
        P Offline
        PIEBALDconsult
        wrote on last edited by
        #3

        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.

        A 1 Reply Last reply
        0
        • R Rajesh Anuhya

          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 <--

          D Offline
          D Offline
          David Skelly
          wrote on last edited by
          #4

          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.

          R 1 Reply Last reply
          0
          • D David Skelly

            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.

            R Offline
            R Offline
            Rajesh Anuhya
            wrote on last edited by
            #5

            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 <--

            1 Reply Last reply
            0
            • P PIEBALDconsult

              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.

              A Offline
              A Offline
              Ashfield
              wrote on last edited by
              #6

              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

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups