Welcome to SqlServer-QA.net Sign in | Join | Help

SQL Server Storage Engine & Tools (SSQA.net)

SQL Server Tools includes storage engine that includes a complete set of graphical tools and command prompt utilities that allow users, programmers, and administrators. SSMS, SSRS, SSIS & SSAS are most commonly used tools.
SQL Server 2005 schema integration changes and use of best practices - use of Schema Qualified Tables/Views

You all know that it is a best practice to use the schema qualified tables or views for the better management and performance (sometimes). As the Best Practices Analyzer tool which will be a part of SQL engine from 2008 version onwards confirms that this rule doesn’t check schema qualification on temporary tables.

As usual the BP tool flags the references to temp tables created within stored procedures, but not as qualified and who will be owners for those tables, this is a big question.

Obviously its recommendation to schema-qualify table and view references really apply on SQL Server 2005 version!. Within the changes of user-schema separation has fixed the problem that required this practice on earlier versions of SQL Server and to keepup this rule a  schema-qualification was required to enable query plan reuse by different users who, in SQL Server 2000, had different default schemas.

As per the previous version incapability of checking this rule and by default they could use dbo objects without qualification, but SQL Server had to check the default schemas for the objects first, preventing query plan reuse. Since user-schema separation allows different users to share a default schema and, in the typical case, all database users to access objects in their default schemas, ad-hoc plans with unqualified table and view names will normally be shared and reused across users.

The main reason for not including this temporary tables is it does not have aTSQL parser and it will check for improper configuration and security settings.

 

Posted: Thursday, January 24, 2008 6:19 AM by SQL Master

Comments

Other SQL Server Blogs around the Web said:

You all know that it is a best practice to use the schema qualified tables or views for the better management

# January 24, 2008 6:44 AM

SSQA.net - SqlServer-QA.net said:

You all know that it is a best practice to use the schema qualified tables or views for the better management

# January 24, 2008 6:44 AM
Anonymous comments are disabled