saving stored procedures in sql server 2005

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Garima12
    New Member
    • Mar 2007
    • 58

    saving stored procedures in sql server 2005

    There r some stored procedures in the database I m working with. When I create new stored procedure and save it, it does not appear in the list of existing procedures. Why so? Where should I store it?
    Where r stored procedures physically stored?
    thks
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    Originally posted by Garima12
    There r some stored procedures in the database I m working with. When I create new stored procedure and save it, it does not appear in the list of existing procedures. Why so? Where should I store it?
    Where r stored procedures physically stored?
    thks
    What version are you using? How did you create the stored proc?

    -- CK

    Comment

    • Garima12
      New Member
      • Mar 2007
      • 58

      #3
      using sql server 2005.
      expnded database, then programmability ,right clicked on stored procedure,selec ted create new. Window with sp structure got open. changed as per requirement and using file menu clicked on save, it asks for name f file.there specified. Now it is storing by default in sql management studio(under my documents). So where should I store? and the main thing is if I create new sp, then now it should be included in the list of existing stored procedures. but it is not storing. can u pls guide?
      thks

      Comment

      • ck9663
        Recognized Expert Specialist
        • Jun 2007
        • 2878

        #4
        When you click Save, you are saving the script and not actually running it. You may still save the script for reference. But saving it does not mean the stored proc has been created. Instead, click Execute.

        -- CK

        Comment

        • bhmadhukar
          New Member
          • Mar 2008
          • 4

          #5
          to view the user created stored procedures

          use below script

          exec sp_stored_proce dures <stored_procedu re_name>

          It is recommended to give a specific prefix name before any stored procedure.

          if your stored procedure starts with 'sp_', for example: sp_showempinfo,

          then, execute like below

          exec sp_stored_proce dures 'sp%'

          that's it my friend.

          Comment

          Working...