Stored procedures

From Species File Help
(Difference between revisions)
Jump to: navigation, search
(Created page with " * Stored procedures are kept in source control, and normally published to the database during builds * To debug a stored procedure against the database # Open SSMS, find the ...")
 
m
Line 4: Line 4:
 
# Open SSMS, find the database containing the SP, and navigate to '''programmability'', you'll find a list of SPs
 
# Open SSMS, find the database containing the SP, and navigate to '''programmability'', you'll find a list of SPs
 
# Right click, choose "Modify" ''or'' '''Script to -> Alter''', you'll get the code in a new query window
 
# Right click, choose "Modify" ''or'' '''Script to -> Alter''', you'll get the code in a new query window
 
 
# To execute the SP in SSMS right click, chose "Execute", you'll get a popup that will allow you to parameterize the SP, it will then generate *and execute* something like the following (this can be used subsequently to step through the SP):
 
# To execute the SP in SSMS right click, chose "Execute", you'll get a popup that will allow you to parameterize the SP, it will then generate *and execute* something like the following (this can be used subsequently to step through the SP):
  

Revision as of 10:52, 3 October 2012

  • Stored procedures are kept in source control, and normally published to the database during builds
  • To debug a stored procedure against the database
  1. Open SSMS, find the database containing the SP, and navigate to 'programmability, you'll find a list of SPs
  2. Right click, choose "Modify" or Script to -> Alter, you'll get the code in a new query window
  3. To execute the SP in SSMS right click, chose "Execute", you'll get a popup that will allow you to parameterize the SP, it will then generate *and execute* something like the following (this can be used subsequently to step through the SP):
 USE [SFdbPractice]
 GO
 DECLARE	@return_value int
 EXEC	@return_value = [dbo].[spTestSpecimenLocNotInDist]
 @blnFix = 0,
 @intFileID = 1, 
 @intFileUserID = 11
 SELECT	'Return Value' = @return_value
 GO
Personal tools
Namespaces

Variants
Actions
Navigation
Species Files
Wiki
Toolbox