We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ErikEJ/SqlServer.Rules'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
SRN0006.md•1.05 KiB
# SQL Server Rule: SRN0006
| | |
|----|----|
| Assembly | SqlServer.Rules |
| Namespace | SqlServer.Rules.Naming |
| Class | UseTwoPartNames |
## Rule Information
| | |
|----|----|
| Id | SRN0006 |
| Friendly Name | Use of default schema |
| Category | Naming |
| Ignorable | false |
| Applicable Types | Default |
| | Dml Trigger |
| | Procedure |
| | Scalar Function |
| | Sequence |
| | Table |
| | Table Type |
| | Table Valued Function |
| | User Defined Type |
| | View |
## Description
Two part naming on objects is required.
## Summary
Using two part naming on objects [Schema].[Name] is recommended
### Examples
```sql
CREATE PROCEDURE CreateProcedureNoSchema
AS
SET NOCOUNT ON;
select Col1 from [dbo].TestTableSSDT
RETURN 1
-- SML024, SRN0006
```
### Remarks
Without specifying the schema in the CREATE script will cause SQL Server to try to assign
the correct schema which will default to the current users default schema and may or may
not be dbo.
<sub><sup>Generated by a tool</sup></sub>