Database Sequence

You can either use the sequence in the table definition or insert it later when you insert the row. Sequence vs. Identity columns Sequences, different from the identity columns, are not associated with a table. The relationship between the sequence and the table is controlled by applications. In addition, a sequence can be shared across multiple... » read more

Database Log File Full

Log records that are not managed correctly will eventually fill up the disk causing no more modifications to the database. Transaction log growth can occur for a few different reasons. Long running transactions, incorrect recovery model configuration and lack of log backups can grow the log. Log truncation frees up space in the log file... » read more

##Table Global Table

#temp tables are available ONLY to the session that created it and are dropped when the session is closed. ##temp tables (global) are available to ALL sessions, but are still dropped when the session that created it is closed and all other references to them are closed.

# vs ## Table

#temp tables are available ONLY to the session that created it and are dropped when the session is closed. ##temp tables (global) are available to ALL sessions, but are still dropped when the session that created it is closed and all other references to them are closed. Local temporary tables are visible only in the... » read more

sp_helptext

The sp_helptext is a system stored procedure that is used to view the text definition of any SQL Server objects that contain code. It can be used for unencrypted user-defined stored procedures, functions, views, triggers, even system objects such as system stored procedures. sp_helptext uspMyProcedureName

Extend Timeout for SQL Server AlwaysOn High Availability

Microsoft SQL Server Management Studio (SSMS) -> Server -> Always On Hight Availability -> Properties Session Timeout (seconds) field Note: Default to 20 seconds. The timeout setting in Windows Failover Cluster will override setting in the AlwaysOn Availability Group setting.

SQL Server Collation

A collation is a configuration setting that determines how the database engine should treat character data at the server, database, or column level. … In SQL Server, you can configure a character column with a Unicode data type (nchar, nvarchar, or ntext) or non-Unicode data type (char, varchar, or text). Collation is a set of rules dictating how... » read more