Executing SQL Queries Based on Time

Executing SQL Queries Based on Time

Sometimes things should only happen at certain times. Not long ago I was asked to create a script that is triggered by an event, however, would only execute certain commands if the event occurred during a single specific time range.  Creating an alert to handle...
Adding Users in SQL Server after Moving a Database

Adding Users in SQL Server after Moving a Database

When a database is moved to a new server, existing database users will not have access to the database on the new server. Attempting to add the users to the database on the new server results in an error message saying the user already exists in the database. To fix...