Procedure:
[AdventureWorks2016CTP3].[SQLCop].[test User Aliases]
Procedure properties
| Name | Value |
| Schema | [SQLCop] |
| Owner | [dbo] |
| Creation date | 19.09.2016 |
| Type | P |
| Encrypted | |
| ID | 683865503 |
| Implementation type | Transact SQL |
| Is native compiled |
Creation options
| Name | Value |
| QUOTED_IDENTIFIER | ON |
| ANSI_NULLS | ON |
Objects that [SQLCop].[test User Aliases] depends on
| Object name | Object type | Dep level |
| [SQLCop] | Schema | 1 |
| [tSQLt].[Fail] | Unknown | 1 |
SQL
SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [SQLCop].[test User Aliases] AS BEGIN -- Written by George Mastros -- February 25, 2012 -- http://sqlcop.lessthandot.com -- http://www.mssqltips.com/tip.asp?tip=1675 SET NOCOUNT ON Declare @Output VarChar(max) Set @Output = '' Select @Output = @Output + Name + Char(13) + Char(10) From sysusers Where IsAliased = 1 Order By Name If @Output > '' Begin Set @Output = Char(13) + Char(10) + 'For more information: ' + 'http://www.mssqltips.com/tip.asp?tip=1675' + Char(13) + Char(10) + Char(13) + Char(10) + @Output EXEC tSQLt.Fail @Output End END; GO |
See also