Powershell script to find new servers in an AD domain
This is actually part of a process I am creating to automatically discover SQL Server instances in an Active Directory domain. So there...
2019-06-19 (first published: 2019-06-06)
1,405 reads
This is actually part of a process I am creating to automatically discover SQL Server instances in an Active Directory domain. So there...
2019-06-19 (first published: 2019-06-06)
1,405 reads
We know that indexes are necessary for query performance but comes with overhead during DML operations. Usually, the overhead is worth the performance gain we get out of them....
2019-06-10 (first published: 2019-05-21)
877 reads
If you are running a DATABASE BACKUP or RESTORE command manually, SQL Server will show you the progress at a specified % completion interval. For the BACKUP, the default is...
2019-06-03 (first published: 2019-05-16)
1,017 reads
I realized yesterday I posted this quickly after testing only against SQL 2016 version. So I decided to also test against SQL 2014 and 2012 versions to make sure...
2019-05-16
80 reads
The purpose of this query is to find identical duplicate non-clustered indexes i.e. indexes on same table with same columns in same order. If you have a need to...
2019-05-30 (first published: 2019-05-15)
895 reads
Deadlocks are usually detected and resolved automatically by SQL Server by killing one of the SPIDs involved in it. You may have an alert setup to notify you and/or users...
2019-05-14 (first published: 2019-05-01)
568 reads
As you may all know, having up to date index statistics is the key to make sure the query optimizer can choose the most optimal execution plan for any...
2019-05-01
187 reads
For me, this particular code to generate a script to recreate indexes has more practical use in a replication environment.
For example, the default replication setting is to exclude the...
2019-04-25
484 reads
select
s.session_id,
db_name(s.database_id) DB,
s.login_time,
s.host_name,
s.program_name,
s.login_name,
s.cpu_time,
s.memory_usage,
s.total_scheduled_time,
s.total_elapsed_time,
s.endpoint_id,
s.last_request_start_time,
s.last_request_end_time,
s.reads,
s.writes,
s.logical_reads,
s.is_user_process,
s.row_count,
s.open_transaction_count,
t.text as [command]
from sys.dm_exec_sessions s
inner join sys.dm_exec_connections c...
2019-04-25
67 reads
Suppose you want to or need to know anytime your SQL Server is experiencing blocking where queries are being blocked and it may or may not escalate to a...
2019-04-30 (first published: 2019-04-17)
1,732 reads
By Brian Kelley
During COVID, I attended training on software/enterprise architecture given by Mark Richards. One of...
For me, the objective is straightforward: have a backup strategy that is reliable, understandable,...
By DesertDBA
Note: This post is the invitation for T-SQL Tuesday #204 on November 3rd, 2026....
Jl. Ir. H. Juanda No.28, RT.03/RW.02, Paledang, Kecamatan Bogor Tengah, Kota Bogor, Jawa Barat...
Jl. Yos Sudarso No.155, Taba Jemekeh, Kec. Lubuk Linggau Tim. I, Kota Lubuklinggau, Sumatera...
Wa:083849450961 Jl. Sulawesi No.34, Pattunuang, Kec. Wajo, Kota Makassar, Sulawesi Selatan 90174
On SQL Server 2025, I run this code as a sysadmin:
CREATE LOGIN Demo WITH PASSWORD = 'Demo1234567' GO ALTER SERVER ROLE ##MS_DatabaseConnector## ADD MEMBER Demo GOI then login as Demo and run this:
USE sandbox go SELECT CURRENT_USERWhat is returned? See possible answers