I have been using SSMS for a long time now, and over the period of time I have realized that it’s a very powerful IDE – however, there are lots of hidden features which are less known to lots of developers. In this article, I will be sharing some beneficial Tips and Tricks which will give you an extra edge in your day to day work, and in the process take your productivity to the next level.Read more »
Native JSON Support in SQL Server 2016January 6, 2017
With the introduction of SQL Server 2016, Microsoft introduced many new features which had taken SQL Server another step forward and they made sure that it stands in front among many major Relational Database Systems.
One such feature which has been lacking but desperately required was the native support towards JSON.Read more »
Report Subscription Changes in SQL Server Reporting Services 2016December 30, 2016
What makes SQL Server 2016 one of my favorite SQL Server release since the release of SQL Server 2012 is the increased number of exciting new features that have been introduced. Whilst my article Top 5 New SQL Server 2016 DMVs for DBAs reviewed some of these new features albeit from a DBA point of view, in this article I continue to review SQL Server 2016 but from the perspective of an SSRS administrator in relation to the changes in report subscriptions.Read more »
Different Ways to set the Max Degree of Parallelism in SQL ServerDecember 29, 2016
In this article, we will go through the different ways to set the Max Degree of Parallelism option. Before doing that, it is helpful to understand the concept of parallelism, how it works and what the MSXDOP is.Read more »
SQL Server Index vs Statistics a consultants woes…or rantsDecember 29, 2016
As a DBA, I am often asked why is something performing slow, what and why statistics need to be updated or what will cause them to be “off”. My initial question to clients when they pose these questions to me is what changed on your end? Did the data change significantly and did the rebuild or reorganize index job run? Before I get into the answers to these questions from my clients, let me give you some background. So, just to clarify, for most of my clients, I work as a remote part-time DBA, that being said, I manage their database from every aspect including setting up servers, backups/restore, troubleshooting, managing their index’s, etc. and again remotely. So normally, I have setup jobs that will manage their index’s ranging from a weekly rebuild or even sometimes I use one that I’ve designed that makes a choice to either rebuild or reorganize an index based on fragmentation level. The “general rule of thumb” is reorganizing the index for fragmentation from 5% to 29% and rebuild when 30% plus. Those are pretty standard numbers I did not make them up.Read more »
Introduction of Visual Studio Code for DBAsDecember 29, 2016
Visual Studio Code (Code), have you heard of this product yet? This is an open-source, cross-platform and extremely light weight code editor from Microsoft. You may see some folks explain this editor as the little brother to Visual Studio Community Edition (VS Community), but it is more compared to editors like Atom, Sublime Text or even Notepad++. It is not something you can use to compile program code, so it is for the less complex coding projects. I utilize Code as my editor of choice now with PowerShell, and even T-SQL at times. In this article, I wanted to walk you through using Code and note some specific extensions I use for PowerShell and SQL Server.Read more »
SQL Server Estimated Vs Actual Execution PlansDecember 29, 2016
A SQL Server execution plan is the most efficient and least cost road map that is generated by the Query Optimizer’s algorithms calculations to execute the submitted T-SQL query. Execution plans are used by the database administrators to troubleshoot the performance of poorly performing queries to isolate the part of the query that is at the root of the performance issue.Read more »
Script Task Debugging in SQL Server Integration Services (SSIS)December 29, 2016
In SQL Server Integration services (SSIS), it may not be possible to meet all the business requirements using built-in tasks. In these cases, we can achieve the functionality using C# or VB.net code in script task. The script task is an ideal alternative solution to built-in tasks.Read more »
How to Split a Comma Separated Value (CSV) file into SQL Server ColumnsDecember 29, 2016
Receiving a comma delimited file is not new technology nor is it difficult to deal with in SQL Server. As a matter of fact, it is extremely easy. There are many cases as to why you would want to do this. For example, you have an external data source that needs to be imported into your database/table. There a couple ways to do this, however the quickest and easiest way is to use the native “import” feature within SQL Server Management Studio and you can even save it to an SSIS Package at the end of the process. The end result of using this method is that the external CSV file is loaded into a SQL Server table where columns are created and rows are populated.Read more »
Java HashCode in TSQLDecember 28, 2016
The Java HashCode method is used to determine uniqueness or similarity of strings. While implemented in Java, there can be many benefits of creating a similar or customized version of this method.Read more »
SQL Server database migration best practices for low risk and downtimeDecember 27, 2016
The main goal of many organizations, today, is reducing costs while maintaining the highest degree of stability and efficiency. To this end, we should think out of the box about how we can help to achieve this as DBAs. The approaches include:Read more »
What is a SQL Server Data Dictionary and why would I want to create one?December 26, 2016
A SQL Server database can be thought of, in and of itself, as a data dictionary. It is self-describing, in that objects can be scripted into Data Definition Language aka DDL scripts to view all attributes, quickly and easily.Read more »
Increase your Coding Speed in SQL Server Management StudioDecember 23, 2016
Every developer wants to be productive and get more things accomplished during their day to day work. Given a choice between working harder and working smarter, you will most likely choose the latter. But the big question is – How do you boost your productivity? How do you reduce your development time? How do you increase your coding speed?Read more »
FAQ about Dates in SQL ServerDecember 22, 2016
In this article, I compiled a list of FAQs and Answers about dates.
- Which function should I use to get the current date in SQL Server?
- How can I get the current time in the format hh:mm:ss?
- How can I calculate my age in SQL Server with a birth date?
- How can I insert the current time by default in a SQL Server table?
- How can I check the total time that the employees of my company worked per day?
- How can I get the time of a specific region?
- How can I get the time of a specified Standard time?
Why is my CTE so slow?December 22, 2016
Have you ever written up a complex query using Common Table Expressions (CTEs) only to be disappointed by the performance? Have you been blaming the CTE? This article looks at that problem to show that it is a little deeper than a particular syntax choice and offers some tips on how to improve performance.Read more »
Using SSMA v7.1 for Oracle to migrate into SQL ServerDecember 21, 2016
This is a second article that is a continuation of the Microsoft SQL Server Migration Assistant (SSMA) v7.1 for Oracle. In my first article, I wrote an overview of the tool and how to install it. In this second article I will write about how to use it to migrate data and objects from an Oracle database to a SQL Server database.Read more »
Handy features of the dbatools Read-DbaBackupHeader commandDecember 21, 2016
If you haven’t heard of dbatools, it’s an open source project out on GitHub dedicated to making life easier for Data Professionals. If you have an idea that you don’t see a command for, you can build it and contribute it to the project. Or you can ask if someone has time to write if for you.Read more »
SQL Server performance myth bustersDecember 21, 2016
In this article, we will verify if the following statements are true or they are just myths:
- Truncate is faster than a delete and it consumes less space in the logs
- Do not use cursors to Create or drop multiple objects because it is very slow
- Do not use cursors to convert or process row values because it is very slow
New features and enhancements in SQL Server 2016 SP1December 20, 2016
SQL Server 2016 SP1 is released as announced by Microsoft. It comes with a bunch of new features and enhancements as a result of customer and community feedback. In this article, I will introduce you to these new features and enhancements.Read more »
Top 5 New SQL Server 2016 DMVs for DBAsDecember 20, 2016
Since its initial release that was part of SQL Server 2005, Dynamic Management Views (DMV) changed – mostly for the better – the role of database administration (DBA) within SQL Server-based environments. They improved the efficiency of DBAs regarding database server monitoring, issue diagnoses, and subsequent performance optimisation. As a result of this positive reception, it has become customary that some of the highly anticipated items in every release of SQL Server includes discovering what new DMVs will be added. In this article I take you through my favourite top 5 DMVs to come out of SQL Server 2016.Read more »
Reporting in SQL Server – Using calculated Expressions within reportsDecember 19, 2016
Late in October, I received an unusual request from the head of sales within one of my client sites. Sales sells three articles: bread, perfume, and Jaguar motor cars. Now the reader will note that one of these items is a staple and the other two are for those folks with considerable disposable income. Management within the firm had increased the salesmen’s bonuses for those folks that managed to sell perfume and/or Jaguars along with the standard loaves of bread. The summary report may be seen below showing the final bonus rate for each sales order booked during the month.Read more »
How to configure Transparent Data Encryption (TDE) in SQL ServerDecember 19, 2016
Introduction and Overview
Transparent Data Encryption (TDE) was introduced in SQL Server 2008. Its main purpose was to protect data by encrypting the physical files, both the data (mdf) and log (ldf) files (as opposed to the actual data stored within the database). Transparent Data Encryption Encrypts SQL Server, Azure SQL Databases, and Azure SQL Data Warehouse data files.Read more »
Point in Time Recovery with SQL ServerDecember 19, 2016
How often are you working with multiple environments? For example, if you are a database administrator who is responsible for a production environment as well as another environment, it most likely that you will be working with both environments simultaneously. What is the probability that you will execute a script on production, which actually needs to be executed on the other environment? I would say it is high. To prove this point let me present you an example.Read more »
Introduction to SQL Server Analysis Services (SSAS) monitoringDecember 15, 2016
When it comes to monitoring of SQL Server Analysis Services (SSAS) performance, as it relates to the database engine, there are several categories that should be mentioned and compared.Read more »
Microsoft SQL Server database deployment processDecember 14, 2016
Database deployments are critical tasks that can affect negative in on performance in production. In this article we’ll describe some performance related best practices for database deployments.Read more »