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.

1 (1)

2019-10-15 (first published: )

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

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

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

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

801 reads

Blogs

GotoWebinar (and Teams) won’t screen share after macOS update to Catalina (10.15)

By

This blog post is about the situation where after upgrading to the latest macOS...

Improving TweetDeck with Better TweetDeck

By

If you are at involved with the #sqlfamily, you are bound to hear about...

Interview with Bob Ward

By

This is the eight interview we have done. This time our guest is the...

Read the latest Blogs

Forums

water pipes recycler premium components

By asdcfrt

  this lookah glass[/url] underside can be an inverted tapering cone with a small...

Remove the middle of a string between wildcards

By ncraigg

I have a field called 'jsonpayload' in a table called 'auditlog' that is populated...

Is SSIS really that bad?

By Rod at work

Today we had our weekly team meeting. Part of my team is working on...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers