Skip to content

Latest commit

 

History

History
 
 

Stored_Procedure

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Microsoft SQL Server Stored Procedure

SQL Server Name Convention and T-SQL Programming Style

Start all procedure from if exist statement:

IF OBJECT_ID('dbo.ProcedureName', 'P') IS NULL
EXECUTE ('CREATE PROCEDURE dbo.ProcedureName AS SELECT 1');
GO


ALTER PROCEDURE dbo.usp_ProcedureName(

It helps to save all grants for procedure (analog CREATE OR REPLACE PROCEDURE in Oracle).

Author: Jason Strate
Original link: http://www.jasonstrate.com/2013/05/index-analysis-may-update/
Tested on SQL Server version: 2012/2014

Author: Andy Yun
Original link: https://sqlbek.wordpress.com/2015/03/04/sp_helpexpandview-well-i-didnt-expect-that/
Tested on SQL Server version: 2008/2012/2014

Author: Paul Brewer
Original link: https://paulbrewer.wordpress.com/sp_restoregene/
Tested on SQL Server version: 2008/2012/2014

Author: Jefferson Elias
Original link: http://www.sqlshack.com/managing-untrusted-foreign-keys/
Tested on SQL Server version: 2008/2012/2014

Author: Jefferson Elias
Original link: http://www.sqlshack.com/managing-untrusted-foreign-keys/
Tested on SQL Server version: 2008/2012/2014

Author: Unknown
Original link: Unknown
Tested on SQL Server version: 2012/2014

Author: Michael J. Swart
Original link: https://sqlblockedprocesses.codeplex.com/
Tested on SQL Server version: 2012/2014

Author: Erland Sommarskog
Original link: http://www.sommarskog.se/sqlutil/sqltrace.html
Tested on SQL Server version: 2005/2008/2012/2014

Author: Konstantin Taranov
Original link: None
Tested on SQL Server version: 2012/2014

Author: Unknown
Original link: None
Tested on SQL Server version: 2008/2012

Author: Unknown
Original link: None
Tested on SQL Server version: 2008/2012/2014

Author: Unknown
Original link: None
Tested on SQL Server version: 2008/2012/2014

Author: Sean Smith
Original link: http://www.sqlservercentral.com/scripts/object/66798/
Tested on SQL Server version: 2008/2012/2014

Author: Unknown
Original link: None
Tested on SQL Server version: 2008/2012/2014

Author: Microsoft
Original link: None
Tested on SQL Server version: 2008/2012/2014

Author: Unknown
Original link: None
Tested on SQL Server version: 2008/2012/2014

Author: Sean Smith
Original link: http://www.sqlservercentral.com/scripts/Administration/70243/
Tested on SQL Server version: 2008/2012/2014

Author: David Musgrave
Original link: None
Tested on SQL Server version: 2008/2012/2014

Author: Sean Smith
Original link: None
Tested on SQL Server version: 2008/2012/2014

Author: Konstantin Taranov
Original link: None
Tested on SQL Server version: 2012/2014

Author: Sean Smith
Original link: None
Tested on SQL Server version: 2008/2012/2014

Author: Konstantin Taranov
Original link: None
Tested on SQL Server version: 2012/2014

Author: Konstantin Taranov
Original link: None
Tested on SQL Server version: 2012/2014

Author: Konstantin Taranov
Original link: None
Tested on SQL Server version: 2012/2014

Author: Sean Smith
Original link: http://wwwservercentral.com/scripts/sp_who/68607/
Tested on SQL Server version: 2012/2014

Author: John Huang
Original link: http://www.sqlservercentral.com/blogs/john-huangs-blog/2015/11/19/print-long-string/
Tested on SQL Server version: 2014

Author: Narayana Vyas Kondreddi
Original link: https://github.com/SQLauto/generate-sql-merge/blob/master/master.dbo.sp_generate_merge.sql
Tested on SQL Server version: 2008/2012/2014

Author: Jeff Jordan
Original link: http://www.sqlservercentral.com/articles/Integration+Services+%28SSIS%29/135173/
Tested on SQL Server version: 2012/2014

Author: Paul S. Randal
Original link: http://www.sqlskills.com/blogs/paul/code-to-analyze-the-transaction-hierarchy-in-the-log/
Tested on SQL Server version: 2012/2014

Author: Phil Factor
Original link: https://www.simple-talk.com/sql/sql-tools/automatically-creating-uml-database-diagrams-for-sql-server/
Tested on SQL Server version: 2012/2014