-->
SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

SQL Geek

Dharmendra is a SQL Server/Microsoft Data Platform professional with over eight years of experience. He enjoys helping others in the SQL Server community and does this by contributing on blogs, speaking at several SQL events. His passion and focus is to explore and share more and more on SQL Server.

Powershell Error – Import-Module AzureRm

I was playing with SQL Azure on my brand new Surface pro device.  I open the Windows Powershell ISE as administrator to import AzureRm module by running the below command;

Import-Module AzureRm

It returned this error:

PS C:\windows\system32> C:\Users\User\Desktop\Azure Script.ps1
File C:\Users\User\Desktop\Azure Script.ps1 cannot be loaded because running scripts is…

Read more

0 comments, 144 reads

Posted in SQL Geek on 19 September 2018

Only one Log Reader Agent can connect to a database at a time error – Transaction Replication/CDC

An interesting issue regarding SQL Server Transaction Replication/CDC log reader agent job can’t be started with the following error:

Msg 18752, Level 16, State 1, Procedure sp_replcmds, Line 1 [Batch Start Line 229]
Only one Log Reader Agent or log-related procedure (sp_repldone, sp_replcmds, and sp_replshowcmds) can connect to a database…

Read more

0 comments, 2,015 reads

Posted in SQL Geek on 10 September 2018

AlwaysOn Data Synchronization in Synchronous and Asynchronous Mode

When you are working on the AlwaysOn feature, it is crucial to understand how the AlwaysOn commit process works. This blog will walk you through how a synchronous and Asynchronous commit process works in AlwaysOn.

Data Synchronization in Synchronous mode 

  • Primary replica is generating transaction log blocks. The secondary replica…

Read more

0 comments, 725 reads

Posted in SQL Geek on 15 August 2018

Fastest Way to Find Row Count of All Tables From All Databases in SQL Server

There are many times you as DBA or Developer needs to get all row count from all tables or row count of all tables from all Databases in a SQL Server. You may need a quick way to count the number of rows contained within the tables. The following SQL… Read more

0 comments, 270 reads

Posted in SQL Geek on 13 August 2018

Snapshot Agent Acquires schema modification (SCH-M) lock on all the articles of a publication

As the business requirement, It is very common to see a request for adding a new article or subscription to the existing publication. After adding the new article or subscription to the existing publication, we use snapshot agent to initialize it so that data can flow from Publisher to Distributor… Read more

0 comments, 1,420 reads

Posted in SQL Geek on 6 August 2018

SQL Server Enterprise Edition-Core VS Server+CAL – Demo on differences

In this blog, I am NOT going to discuss the SQL Server licensing model. If you are looking for that information, I would strongly suggest you talk to your Microsoft Technical Account Manager (TAM) or follow the SQL Server 2016 licensing Datasheet.

Here, I am going to discuss –… Read more

0 comments, 297 reads

Posted in SQL Geek on 3 August 2018

How to Change SQL Server License or Product Key?

Yesterday, I was doing SQL Server Database stress and benchmarking testing on the client side. When I started ramping-up more and more workload on the server, I found the SQL Server was using only 20 CPUs. When I checked the box to know how many CPU the box got, it… Read more

0 comments, 591 reads

Posted in SQL Geek on 2 August 2018

Have you ever wonder why Log Send Rate doesn’t show against Primary Replica on the AlwaysOn Dashboard?

Recently, I was working on the AlwaysOn Availability group issue where the log records were not moving from primary to secondary replica because of the wait type “PARALLEL_REDO_TRAN_TURN”.

During the troubleshooting, when I opened the AlwaysOn Dashboard to see the Log Send Rate, I found that the Log Send Rate… Read more

0 comments, 164 reads

Posted in SQL Geek on 1 August 2018

Failed to join local availability replica to Availability Group – SQL Server error 41106 and 41158

When you configure SQL Server AlwaysOn Availability Group from management studio, it may fail with below error while joining secondary replica to the availability group. Today, While I was preparing some demo on AlwaysOn for the community event, I encountered the same issue. So, I thought to blog the solution… Read more

0 comments, 985 reads

Posted in SQL Geek on 31 July 2018

Disable or Turn-off SQL Server Telemetry Service

With SQL Server 2016, Microsoft is installing SQL Server Telemetry or CEIP (Customer Experience Improvement Program) Services by default. It sends feature usage info back to Microsoft. You cannot skip the installation of these services. I find most of the DBAs even don’t aware that they have installed the… Read more

1 comments, 2,199 reads

Posted in SQL Geek on 30 July 2018

Adding File to Database in AlwaysOn Availability Group

When a database is part of AlwaysOn Availability Group, it means whatever commands we are executing on Primary replica database, those commons will also be sent to all the Secondary replicas database via log records.

So, If you are adding a database file – data or log to the Primary… Read more

0 comments, 255 reads

Posted in SQL Geek on 27 July 2018

Save the Connection String Parameters in SSMS – AlwaysOn

In the SQL Server AlwaysOn setup, whenever you are using a listener to connect to a secondary node, you have to provide additional connection parameters like ApplicationIntent=ReadOnly so that you can connect the secondary node.

If you have to connect many times in a day to the secondary node, keying… Read more

0 comments, 2,042 reads

Posted in SQL Geek on 26 July 2018

AlwaysOn_health Extended Event Session

The AlwaysOn_health XEvent session is installed by SQL Server by default, and started by the Create Availability Group wizard when a new availability group is created.

AlwaysOn_health Extended Event Session

The xEvent session collects events triggered by events directly affecting AlwaysOn availability group like;

  • AlwaysOn errors
  • AlwaysOn state transitions
  • AlwaysOn…

Read more

0 comments, 790 reads

Posted in SQL Geek on 25 July 2018

AlwaysOn Dashboard uses System Policies

The AlwaysOn Dashboard is an excellent tool in SQL Server Management Studio that allows you to monitor Replica status, Availability Group status, and Database status.

But, if you are wondering what the Dashboard uses internally to monitor the AlwaysOn health, so here is the answer – It utilizes system policies… Read more

0 comments, 165 reads

Posted in SQL Geek on 24 July 2018

Why Availability Databases Are Not Synchronizing?

If you are working on SQL Server Availability Group Databases, you may have seen that Availability Group is online but at-least one availability database at the primary or the secondary is not synchronizing.

In the blog, we are going to explore how to find what has interrupted synchronization between availability… Read more

0 comments, 731 reads

Posted in SQL Geek on 23 July 2018

Schedule an Extended Event to run at a Specific Time

When you are using the extended event to capture some data for troubleshooting purpose, you may want to start or stop it at a specific time. Unfortunately, the Extended Event feature doesn’t provide you the option to schedule it. But, it can easily be accomplished by using “ALTER EVENT SESSION”… Read more

0 comments, 1,972 reads

Posted in SQL Geek on 18 July 2018

Another MVP Award – 2018-2019

Gladly sharing that I got the news of my MVP award on 1st July. I am happy, honored, and humbled to receive the Microsoft MVP award 2nd time in a row.

Thank you !!

My gratitude to my family who has been always there to support, guide and making me… Read more

0 comments, 143 reads

Posted in SQL Geek on 16 July 2018

Enable SQLCMD Mode in SQL Server Management Studio

SQLCMD mode in SSMS allows you to use the command line tool within SSMS. Using this feature of the SSMS, you don’t have to connect SQLCMD using the command prompt. It is really very helpful and less distracting when you want to connect with multiple SQL Server instances. You can… Read more

0 comments, 209 reads

Posted in SQL Geek on 7 June 2018

SQL Server Stress Testing Using OStress – RML Utilities

As a DBA, implementing a new database consists of a variety of aspects like correct table structure, tuning the stored procedures, creating right indexes, and many more. But all of these items, the stress testing and performance benchmarking play one of the most crucial roles. There are many tools available… Read more

0 comments, 3,347 reads

Posted in SQL Geek on 21 May 2018

Find Query with Implicit Conversion in the Plan Cache

In my previous blog, I discussed about Which are the queries using a particular index or table?. Today’s post, I am going to show how you can find all queries with Implicit Conversion in SQL Server.

What is an implicit conversion?

Implicit conversions occur whenever data with… Read more

0 comments, 828 reads

Posted in SQL Geek on 13 May 2018

Older posts