Scripts

Look up AD user properties using powershell

I realize that this is a bit of a lengthy script for something that you can use a one liner in the power shell:

Example:

Get-ADUser

But I needed to highlight certain properties of given user and take certain actions based on the values. And the result is this power shell script.

2019-07-15 (first published: )

614 reads

Generate views to correct the column collation on a target DB's tables automatically

You find you are querying a vendor supported database where you're not allowed to make any collation changes, and which has a weird collation setup: default DB collation that matches your server and other databases all character related columns are explicitly a different collation that does not match your DB or server collation Rather than […]

2019-07-05 (first published: )

337 reads

Audit Users logging in using "sa" or service accounts

Security is probably one of a production DBA's most important tasks and if developers use application or service accounts to run queries in your production environment you need to identify then and prohibit it. I notice some unwanted activity after staring a new job and decided to create a script that notifies me via email when […]

2019-07-04 (first published: )

556 reads

Blogs

Collecting Server Performance Metrics: Performance Monitor

By

Whether you’re a DBA/administrator looking to tune a server, planning for hardware updates, or...

Introduction to SQL Server Execution Plans

By

Watch this week’s episode on YouTube! I nearly always use execution plans as the...

Kubernetes Pipelines

By

This post continues looking at some of the Kubernetes concepts I’ve been learning with...

Read the latest Blogs

Forums

Left join not pulling all from left table

By jeffshelix

T has 57,000 distinct rows Z has over a million.  I did row over...

ForEach Loop shows Success before Completing all loops

By krys

I have an SSIS package I set up years ago and it always ran...

Group and total by column Name

By craig.jenkins

Guys, How do i group the below by type and date so i have...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers