Query for SQL Server Information

Have you ever wanted to know basic information about your SQL server?  You can use the SERVERPROPERTY command to retrieve that information with a query. Note that SERVERPROPERTY(ComputerNamePhysicalNetBIOS) will return the Physical Name of the active server.  If you...

Change SQL default database location

A default installation of SQL puts your data, logs, and backup directories on the C: drive.  I prefer to have my SQL data and logs on different drives, and not on the same drive the OS is on. Follow these steps to change the default database file locations for your...

SQL Determine if Enterprise features are in use

  You can determine if any SQL Enterprise version features are in use in a database by checking the sku features table. This query lists all edition-specific features that are enabled in the current database SELECT feature_name FROM...

Configure SQL for Remote Access

SQL by default is not configured to allow remote access.  There are three easy steps to configure it: Enable remote access in the properties Enable the protocol Restart Services Detailed steps below: Enable remote access in the properties Launch SQL Management Studio...

Cannot Save Changes to SQL Database Table

SQL Management Studio by default does not let you make changes that require dropping and recreating a database table.  This can be quite annoying if you just made changes you want to save. Here are some column actions that will trigger a drop/recreate:  Change...

Get SQL Records Modified in the Last Hour

Here are two ways to  retrieve SQL records modified in the last hour.  The first method uses a fraction of a julian date to return the last hour.  The second method uses the DateAdd function.  I prefer using the DateAdd method just because it is easier to read. Select...