Skip to content

-

The topic describes the EX0001 analysis rule.

EX0001: Identify objects used in the script.

Section titled “EX0001: Identify objects used in the script.”

Identify objects used in the script.

The rule outputs description for the identifiers found in the analyzed T-SQL code.

The rule has a Batch scope and is applied only on the SQL script.

NameDescriptionDefault Value
IgnoreObjectsListComma separated list of database object names that to ignore during the identifier lookup.
IgnoreUnidentifiedIgnore not resolved identifiers.yes

Explicit Rules

There is no additional info for this rule.

INSERT [dbo].[DatabaseLog]
(
[PostTime],
[DatabaseUser],
[Event],
[Schema],
[Object],
[TSQL],
[XmlEvent]
)
VALUES
(
GETDATE(),
CONVERT(sysname, CURRENT_USER),
'@eventType',
CONVERT(sysname, '@schema'),
CONVERT(sysname, '@object'),
'<xsl/>',
'aaa'
);
UPDATE Production.Product
SET ListPrice -= ListPrice * 2;
UPDATE Product
SET ListPrice -= ListPrice * 2;
SELECT
*
FROM
Table1 a
LEFT JOIN Table2
ON bbb.iad+1=1
AND b+1=1
SELECT
*
FROM
Table1
WHERE
SUBSTRING( firstname
, 1
, 1)='m'
SELECT
*
FROM
Table1
WHERE
firstname LIKE 'm%'
SELECT
member_number
, first_name
, last_name
FROM
members
WHERE
DATEDIFF( yy
, datofbirth
, GETDATE())>21
SELECT
member_number
, first_name
, last_name
FROM
members
WHERE
dateofbirth<DATEADD( yy
, -21
, GETDATE())
 MessageLineColumn
1EX0001 : Identifier [PostTime] is a datetime column of [dbo].[DatabaseLog].30
2EX0001 : Identifier [DatabaseUser] is a sysname column of [dbo].[DatabaseLog].40
3EX0001 : Identifier [Event] is a sysname column of [dbo].[DatabaseLog].50
4EX0001 : Identifier [Schema] is a sysname column of [dbo].[DatabaseLog].60
5EX0001 : Identifier [Object] is a sysname column of [dbo].[DatabaseLog].70
6EX0001 : Identifier [TSQL] is a nvarchar column of [dbo].[DatabaseLog].80
7EX0001 : Identifier [XmlEvent] is a xml column of [dbo].[DatabaseLog].90
8EX0001 : Identifier getdate is a system function.130
9EX0001 : Identifier [ListPrice] is a money column of [Production].[Product].244
10EX0001 : Identifier [ListPrice] is a money column of [Production].[Product].2417
17EX0001 : Identifier dateadd is a system function.7324
18EX0001 : Identifier getdate is a system function.7534

Analysis Rules