To optimize the performance of your database, you need to monitor and tune. You determine the performance baseline, how SQL Server is currently performing, through monitoring. Your optimization process includes making changes and then monitoring their effect. This means adjusting two overlapping performance areas, that is, database server performance and query performance.
SQL Server databases are the backbone of many enterprise applications, and good Transact-SQL (T-SQL) code is the best way to maximize SQL Server performance. Therefore, it is important for SQL developers to follow T-SQL best practices and guidelines when writing code. This article highlights some common T-SQL best practices to help ensure reliable, robust and efficient SQL code.
Microsoft Windows Azure SQL Database, commonly known as SQL Azure, is a relational database in the cloud that is part of the Windows Azure platform. Although Windows Azure SQL Database is built on the SQL Server platform, there are differences you should consider when performing an Azure SQL Database migration.
A critical part of database design and management is index design. Index design involves balancing space requirements and the resource overhead required to keep indexes up-to-date compared to the performance improvements resulting from the indexes. You can either use dynamic management functions (DMFs) and views (DMVs) or Database Engine Tuning Advisor to identify index needs based representative server activity.
An execution plan is the sequence of operations SQL Server query optimizer performs to run the statements. The SQL Server query optimizer creates an execution plan before it actually runs a query. As per Microsoft Book Online, “Execution plans graphically display the data retrieval methods chosen by the SQL Server query optimizer. Execution plans represent the execution costs for specific statements and queries in SQL Server using icons rather than the tabular representation produced by the SET SHOWPLAN_ALL or SET SHOWPLAN_TEXT statements”. This graphical approach is very useful that for understanding the performance characteristics of a query, and help you to determine whether the query is written as efficiently as possible. You can use the execution plan information to quickly troubleshoot poorly performing queries.
Many database servers store confidential data, which must be protected from unauthorized access when it’s transmitted across the network and stored on the server. SQL Server provides support for encrypted connections, encrypting data, encrypting database and for encrypted storage.
Bulk transfers are a common way of importing large amounts of data into, or exporting large amounts of data out of, SQL Server databases. SQL Server supports bulk transfers run from an operating system command line or the SQL Server command processor. When performing bulk transfers, you must consider the implications regarding the impact on server performance, file sizes (especially for transaction log file), and data access.
A trigger is a specialized stored procedure that activates (executes) in response to an event. There are two basic trigger types, ie data manipulation language (DML) trigger and data definition language (DDL) trigger, based on the type of event that causes them to fire. For example, a data manipulation language (DML) trigger fires in response to INSERT, UPDATE, or DELETE events on a specific table whereas a data definition language (DDL) trigger fires in response to a data definition event, such as creating or dropping an object.
DDL triggers can have a scope of a database or the server. DDL triggers were introduced as a new feature with SQL Server 2005. The scope of a DML trigger is a table. Earlier versions of SQL Server support only DML triggers.
SQL Server Integration Services (SSIS) security is based around several layers that provide a rich and flexible security environment. These layers of security include the use of digital signature, package properties, SQL Server database roles and operating system permissions.
Checkout my article here, in which I gave an overview of SQL Server Integration Services security, and explained these layers that enable us to assure our SSIS packages security.
This article is published on SSWUG.org.
In the first of this three-part series, you will learned how to use scripts and batches, and basics of T-SQL variables.
Checkout the part-2 of this article series here, you will learn about Transact-SQL control-of-flow language, including BEGIN…END, IF…ELSE, CATCH, WHILE, BREAK, CONTINUE, RETURN, and WAITFOR.
This article is published on SSWUG.org.