File tree Expand file tree Collapse file tree
samples/containers/unit-testing/tsqlt-docker/source Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ -- -----------------------------------------------------------------------
2+ -- Demo: SQL Server CI/CD -
3+ -- -
4+ -- Script: Create stored procedure usp_Raiserror_SafetyStockLevel -
5+ -- Author: Sergio Govoni -
6+ -- Notes: -- -
7+ -- -----------------------------------------------------------------------
8+
9+ USE [AdventureWorks2017];
10+ GO
11+
12+ /*
13+ DECLARE @user AS SYSNAME;
14+ SELECT
15+ @user = QUOTENAME(SL.Name)
16+ FROM
17+ master..sysdatabases AS SD
18+ INNER JOIN
19+ master..syslogins AS SL ON SD.SID = SL.SID
20+ WHERE
21+ SD.Name = DB_NAME();
22+ EXEC('EXEC sp_changedbowner ' + @user);
23+ GO
24+ */
25+
26+ CREATE OR ALTER PROCEDURE Production .usp_Raiserror_SafetyStockLevel
27+ (
28+ @Message NVARCHAR (256 )
29+ )
30+ AS
31+ BEGIN
32+ ROLLBACK ;
33+ RAISERROR (@Message, 16 , 1 );
34+ END ;
35+ GO
You can’t perform that action at this time.
0 commit comments