Scripts

WorkDay Functions

Functions to list the number of work days in period , determine if a given date is a work day, add work days to a given date.
Uses a table of holidays and a tally table.

2019-09-04

29 reads

A DateRange Table Valued function

The function is an inline table-valued function (or sometimes called a parameterised view) so it can be used just like a view or a table but needs parameters. It generates a single-column table of datetime2 with rows differing by any multiple of any of the dateparts that SQL Server provides.

5 (5)

2019-08-29 (first published: )

685 reads

A simple powershell script to look up server hardware and OS information

This is a simple powershell script to query and display hardware and OS information from a remote computer.

It uses CIM (Common Information Model) that is available since Powershell version 3 so as long as you have version 3 and up, you should be able to run this script against any server that you have access to.

2019-08-14 (first published: )

686 reads

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: )

840 reads

Blogs

Check Query Progress with Live Query Stats

By

This is something I touched on back in 2017 a little after the Live...

SQL Server 2019 on Docker no longer runs as root by default

By

In my home lab I have an Ubuntu virtual machine that runs both SQL...

SQL Server 2019 – Compatibility Level in Azure

By

I am not sure when this became available but for Azure SQL Database 150...

Read the latest Blogs

Forums

Is Data the Future of the Vibrant Web?

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Is Data the Future of...

SQL Licencing and a move to Opensource RDBMS'

By Stewart "Arturius" Campbell

Good day Quite a number of our larger clients are contracting us to assist...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers