Script : Who all have access to SQL Server via AD Groups?
Dear Reader, Few days ago, I was looking for a script to find out who all have access to SQL Server via AD Groups. There are a couple of good scripts available for this task. However I thought of...
View ArticleScript : How to find SQL Server orphan Logins?
Dear Readers, An attempt has been made to write a short script to find out SQL Server Orphan Logins. By the way, I am not sure if Microsoft has any term like “Orphan Login” within their documentation....
View ArticleSQL DBA Cheatcode Part 4 : Few Important Queries for any DBA
Dear Readers, I am back with part 4 of Cheatcode series after gap of almost one month. In First three Parts of this series I covered, Few Generic Scripts, Replication Specific Scripts & Database...
View ArticleKeeping your Server Secure Part 1 : Login Password Policy
Dear readers, Now we are going to cover very important activity from a DBA perspective. Database\Server Security is the one of the most important thing on which any organisation relies solely on...
View ArticleProactive Monitor of System Database Files
Dear Readers, Today I am writing about a very common problem of Outages that are caused by system database data/log files growth. Problem: generally, we face this issue when system database file is...
View ArticleSQL DBA Cheatcode Part 5 : Playing with indexes
Hello Readers, Today, I am trying to put down few but very useful index related scripts. I have used these scripts many times with different versions of SQL Server. 1. Missing Index : Missing indexes...
View ArticleSQL DBA Cheatcode Part 6 : Know your SQL Server
Hello Readers, I am here adding few more feathers to our SQL DBA Cheatcode series hat. If you have not read our others blogs of this series, you may do it by clicking the links below or you may visit...
View ArticleScript : Who deletes the databases?
Hello Readers, Before starting, let me give you some background about this problem. I used to support few servers which had more than 1000 small databases. Worst part was that many users had access to...
View ArticlePowerShell : Copy a table from one server to another
In general, a DBA like us gets requests to copy a table data from one SQL Server instance to another. In that case, a DBA first sees the amount of data present in the table and then he decides a method...
View ArticleBackup of OLAP Database using Powershell
In this article I would like to explain another method to take the backup of OLAP databases via PowerShell. It will help out to take the backup of multiple OLAP databases with a specified retention...
View ArticleSQL DBA Cheatcode : SQL Server properties
In this article I am trying to outline about some important server properties which can help you out at the time of auditing and trace history of SQL Server. It has been checked in various SQL versions...
View ArticleSQL DBA Cheatcode : 15 Things about SQL Server Error logs
Today I am writing about some good facts about SQL Server Error logs. SQL Server maintains its own error logs that contain messages describing informational and error events. “Error logs” is just the...
View ArticleExperiment With Nth Highest Or Lowest Salary Or Record in Sql
I was reading about it so i searched it on so many blogs & websites. Each blog has described this for employees having unique salaries, but what if few employees have same salary. I am asking this...
View ArticleInteresting Query
Hi Guys! Today one of trainee in my team asked me one strange question, he shows a table and data – Then he asked me to get first 7th id row then 15th id row then 10th id row after this other rows- I...
View ArticleScript : Disable all non sysadmin logins
Hello Reader, I am sharing a quick script to disable all non sysadmin logins for SQL Server. You can not disable windows groups so I tweaked this script to add Deny Connect for Windows Groups. This...
View Article