SA0244 : Database object created,altered or dropped without specifiying schema name |
![]() |
The topic describes the SA0244 analysis rule.

Database object created,altered or dropped without specifiying schema name

The rule checks T-SQL code for CREATE,ALTER and DROP statements of schema bound objects, which miss the schema name of the object.
It is recommended to fully qualify the target object name in CREATE,ALTER and DROP statements.
When not schema name is specified, the default schema of the current user is assumed.

Use fully qualified name for the target object in CREATE,ALTER and DROP statements.

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

Rule has no parameters.

The rule does not need Analysis Context or SQL Connection.


Design Rules, Code Smells

There is no additional info for this rule.

SQL
1CREATE TABLE Test.Greeting 2( 3GreetingId INT IDENTITY (1,1) PRIMARY KEY, 4Message nvarchar(255) NOT NULL, 5) 6 7CREATE TABLE Greeting 8( 9GreetingId INT IDENTITY (1,1) PRIMARY KEY, 10Message nvarchar(255) NOT NULL, 11) 12DROP TABLE greeting; 13 14DROP TABLE #tempTable1; |

Message | Line | Column | |
---|---|---|---|
1 | SA0244 : The table is created without specifiying schema name. | 7 | 13 |
2 | SA0244 : The table is dropped without specifiying schema name. | 12 | 11 |
