SQL Server Database Recovery Archive

Learn about the Adaptive Query Processing Mechanism, and what all it includes.

The Query Optimization feature in SQL Server works pretty well for deciding which execution plan will work best for any given query. It not only selects the cheapest plan, but also takes into account rows in a table. However, using the query optimizer for selecting the best execution plan is not always the best idea. At times it can also misjudge the tables and size of your database, thus selecting a plan that does not work well. And if the initial estimates by the optimizer turn out to be incorrect, the results returned would also most likely be incorrect.Understanding Adaptive Query Processing Mechanism In SQL Server

Therefore, to help users decide the genuinely best execution plan for their query, they have been provided with the Adaptive Query Processing feature. However, to make your SQL Server workload eligible for using this process, you will have to enable compatibility level 140. This is present in SQL Server 2017 edition, and can be activated through T –SQL. Continue reading to understand the complete Mechanism of Adaptive Query Processing in detail.

Batch Mode Memory Grant Feedback

SQL server needs access to a minimum amount of memory to complete execution, and some extra memory grant size to ensure that all rows are accommodated in the memory. The performance will not be optimized if memory grant size is not proper. Incase of excessive grant, memory will be wasted, along with reduced concurrency. Incase of less memory, there would be spills on the disk.

Batch Mode Adaptive Joins

Adaptive Query Processing In SQL Server 2017When using this feature, your choices of hash join, nested loop will be deferred till the time first input has not been scanned. The adaptive join operator here identifies a threshold, which will be responsible for deciding the best time to transition to nested loop plan. Given below is the procedure of adaptive joins.

  • Depending on the row count in the build join input, it will be decided whether loop join is appropriate or hash join. Incase loop join is optimal, you plan would automatically shift to nested loop algorithm.
  • If the input in build join is more than the threshold of a given row count, there would be no shift, and the plan will continue making use of hash join.

Interleaved Execution

This type of execution can make changes to the unidirectional boundary that marks the optimization and execution process for one single query. It also activates plans that can adapt on the basis of cardinality estimates that have been revised. If you come across a query for interleaved execution, which as of now is multi-statement table valued functions (MSTVFs), you should pause the process of optimization in the middle. And resume it after you have executed applicable subtree, and accurately collected the cardinality estimates. In SQL Server 2014 and 2016 editions, the cardinality guess of MSTVFs is fixed to ‘100’. The workload performance issues that arise because of these fixed estimates are handled using interleaved execution.

In case you are using a SQL Server instance in your company for any line of business application, always make sure you have a tool to fix sql and deal with contingencies.

Author Introduction:

Victor Simon is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including accdb repair and sql recovery software products. For more information visit https://www.datanumen.com/

Be the first to comment

The article will stuff your brain with the concepts of Waterfall Charts and Power BI Funnels in SQL Server

Aren’t waterfalls awesome? But you know what beats them! Waterfall charts in SQL Server and Power BI Funnels! What are waterfall charts? Why do we use Power BI Funnels? What all we can do with these tools in SQL? Let’s find out more about these exciting tools of SQL in details. Learn About Waterfall Charts And Power BI Funnels In SQL Server

What are Funnels charts?

Funnels ChartsA waterfall chart simply makes you aware about the variance or changes in a set of categories. A Funnel chart, on other hand, shows you the values as you progress from series one to next, and as you might have guessed, it closely resembles the shape of funnel.

You have to install Power BI Desktop to work on these two charts, and furthermore we’ll use Wide World Importers SQL 2016 database which you can easily download from the Microsoft’s site.

You can load various tables from the above mentioned database, and then you can select Funnel Chart from Visualizations menu and drag it to the design grid. Then, you can add a measure value from the fields in table to the group area. It will generate a basic funnel shaped graph as it will show that the series has changed from largest to smallest value. You may explore other features of funnel chart in format option which can be used to select color pattern, and customize the entire appearance of the funnel chart. Other options like text resize and text color are also there which users are free to experiment.

Furthermore, you can add another category group for better results or analysis. You will see two drill down buttons towards the upper left corner, which helps in drilling down levels as per users’ preference. The results after you select any one of the level will be funnel shaped and would arrange the data as in decreasing order. It will show the natural development of a value over a series. The funnel however won’t be necessarily a uniform funnel because it entirely depends on the value set.

What are Waterfall Charts?

They are somewhat similar to funnel charts, as it displays the change over some category or series but it doesn’t show the summated values. The visualization in Waterfall charts is focused towards cumulative effect or mathematical variation between the values. For example sales of an organization for a set of years, Waterfall chart won’t show the total sales but the variance between sales in different years or in different categories.

Waterfall charts can be found in the Visualizations menu, and thus it can be dragged to design grid in similar fashion. Now you can define some measure for the Y axis and then pick a category, say Month. The chart would then illustrate the ups and downs (variance) of the sales according to months. You can even refine the chart by including a Breakdown Value to improve the results. You can set the limit for breakout category from Format Tab and you can even change the appearance of bars and columns with the help of Sentiment Colors pane.

The SQL databases that we have in our businesses are a rich store of valuable information which we will never risk of losing. However database crashes can lead to a scenario where some of the stored data becomes vulnerable despite typical backup measures in place. To completely avoid data loss, invest in a piece of sophisticated mdf recovery software.

Author Introduction:

Victor Simon is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including corrupted mdb and sql recovery software products. For more information visit https://www.datanumen.com/

Be the first to comment

How to Integrate SQL Server Source Control with SSMS

Posted November 13, 2017 By AuthorVS1

This article discusses the ways in which developers can integrate SQL source control with SSMS

If you are working as MSSQL DBA or developer for any organization, you might have come across the challenge of integrating the source code with SQL Server Management Studio (SSMS). This article will discuss the solution to the problem in detail.

Add Source Control Plug in to SSMS

Learn How To Integrate SQL Server Source Code With SSMSYou need a good Source Control system for business; one good example is Microsoft Team Foundation Server 2012, and then you can start by using the source control Admin to create a folder. To integrate the source control function to SSMS, please click Tools and then select Options and choose Source control. It will show ‘None’ in Plug-in Selection which indicates that currently SSMS does not have any Source Control Plug-in installed.

You can download various plug-ins from Microsoft depending upon the type of your source code. To install the plug-in, double click the installation file. Follow the on screen instructions by pressing next button. When the installation is completed, press close.

Now you are required to activate the Plug-in you have installed right away, you can do it by clicking on tools and selecting options. Under the Source Control menu, you can select the installed Plug-in, Team Foundation Server MSSCCI Provider.


You need to open a T-SQL source file now which you can open through SSMS. You can also open it using Visual Studio shell Integrated Tools for checking in and checking out the Code. To use the latter method, you have to map the folder in Source Control system to some local location during the installation of Visual Studio. Also, one must ensure that all the files being mapped are by default read only.

Now, T-SQL source file can be opened from this folder (Source control) using SSMS but it will obviously show that file is opened in read only mode. Since it is write-protected you won’t be able to save it in SSMS, it will show a warning.

You need to modify the script and check out the source file from Source control. You can easily do it by right clicking on the Plug in and selecting ‘Check Out for Edit’. You can now modify the file since it has been checked out.

Check In Pending Changes

Check In Pending ChangesNow you have to use the ‘Check In Pending Changes’ option to complete Check-In procedure using the Source Control graphic user interface. You can right click the .sql file and select the option of Check in pending Changes and then you have to create a comment in the window that appears. These comments are useful in tracking the changes that you make in the script. If you wish to see the changes in the T-SQL source file, you can click the option ‘View History’ from the source control menu. It will show you all the changes made with proper Time and comment.

We can now conclude some genuine advantages of utilizing a Source Control system for SQL Server. It allows the user to share the code development. Users get options of tracking the entire history of revisions made in a systematic order. It also has the abilities to restore code to specific time point and can also auto-create a backup of your source codes with Source control.

Irrespective of the SQL Server edition you are running in your company, it is vital for you to keep a powerful sql fix tool handy to deal with any incidents of data corruption.

Author Introduction:

Victor Simon is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including fix mdb and sql recovery software products. For more information visit https://www.datanumen.com/

Be the first to comment