Scripts

Generic trigger for maintaining the Audit Log

This trigger will work even if you don't have the primary key on any table. Mechanism to configure the primary key in config table has been provided. This can be very helpful to solve the system audit requirements without much efforts.

Disclaimer : Audit Log trigger has performance overhead. It’s meant for table which is not frequently updated, deleted or inserted. Please take precaution when creating the trigger on the table having too many columns.

2.33 (3)

2019-10-15 (first published: )

584 reads

List Extended Database properties for all databases

I am using database properties to add some useful information for each database. Tired of exploring each database from the menu in SSMS to look for specific information, I decided to make a script listing the extended properties for all my databases. I am pleased to offer this to the community 🙂

2019-10-01 (first published: )

502 reads

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-24 (first published: )

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

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

892 reads

Blogs

SQLSaturday Orlando Notes – Large Printed Schedules

By

One of the things we’ve done most years in Orlando is to print poster...

Upgrading Windows 10 Home to Pro

By

I use Hyper-V and a few other things that require Windows 10 Pro. When...

Power Platform Quick Tips – Episode 03: Documenting Power Automate Flow Logic

By

Welcome back to my series on Power Platform quick tips! In this episode you...

Read the latest Blogs

Forums

Impact value about missing indexes

By msimone

is there relation between Impact from sys.dm_db_missing_index_group_stats and Impact from cache plan? Thanks for...

Migrating DB encrypted by master key

By CharlieRL

I'm migrating DBs from a 2008 R2 instance onto a 2017 instance.  I have...

SQL Monitoring

By SQLEYES

Hi All, I have SQL 2012 instance on a vm server  which I am...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers