Tuesday, August 20, 2019

Delete Update Cache folder in SQL Server

Problem:-
You got a disk space issue in C drive for more than one production server because of the bad configuration you had inherited.
Or
if you got a question from your system admin about that update cache folder if you needed or not seeking Clean up by this question?

Wednesday, August 14, 2019

Test SQL Server listening ports for hundreds of servers Using Powershell

Problem:-
As one of dba's every day manage hundreds of servers including dealing with lots of connectivity issues between application servers and database servers throw specific port, or because security team perform segregation between clients, apps and database servers bypassing only traffic between source IP and destination IP throw specific port, of course for good reasons including security best practice too.

Tuesday, August 13, 2019

Find sqlcmd.exe Path for SQL Server Using Powershell

Problem:-
In somehow we can’t find sqlcmd.exe location easily and that may be stress in a difficult situation like the down of one critical production server and for that, I figure out a solution for that problem by running below script to find where sqlcmd.exe in my server regardless of the location of SQL Server setup files, commonly that used when using Windows Core as an OS with SQL Server.


I want to point out that yes, we can use Powershell instead by using Invoke-sqlcmd cmdlet. I know not all of us know Powershell and most of us do know T-SQL. Until that changes happen and I expect it will 😃 SQLCMD will be around.

Saturday, August 10, 2019

Connect SQL Server When Lost SA Credential

Problem:-
You may inherited MSSQL Database Server from another dba without any documentation for sysadmin user name and password or lost all password even sa password or sa account is disabled or no one knows the password  or get lab machine without taken a password from your trainer or any good intention reasons 😃