Stored procedures

From Species File Help
Jump to: navigation, search
  • 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