综合技术

Default Schemas in SQL Server

微信扫一扫,分享到朋友圈

Default Schemas in SQL Server
0

Max Vernon takes us through the order in which SQL Server searches for tables given a single-part name
:

Default schemas in SQL Server can be a blessing, since they reduce the need to specify the schema when creating DDL statements in T-SQL. However, relying on the default schema when creating DML statements can be problematic. A recent question
on dba.stackexchange.com asked “Does T-SQL have a Schema search path?”, similar to PostgreSQL implements the  search_path
parameter. This post shows how  schemas
are implemented in SQL Server. We’ll also see why it’s important to always specify the schema when using SQL Server.

A lot of this behavior goes back to the pre-2005 era. 2005 introduced schemas as logical separators, whereas pre-2005 they were more of a security measure (and dbo
was the database owner’s schema). I completely agree that you should specify two-part names in-database. It’s a tiny bit faster (which adds up when you’re doing thousands of transactions per second) and reduces ambiguity.

展开阅读全文

微信扫一扫,分享到朋友圈

Default Schemas in SQL Server
0

AESDDoS Botnet Malware Infiltrates Containers via Exposed Docker APIs

上一篇

The Need of the Hour: Increasing Website speed! – All the industry Tips and Tricks

下一篇

你也可能喜欢

评论已经被关闭。

插入图片