Always On Database Stuck in Restoring State

Issue: Always On database stuck in “Restoring” state after setting up Always On Fix: Go to Always On High Availability -> Database -> “Join to Availability Group” Sources: https://www.mssqltips.com/sqlservertip/5460/sql-server-database-stuck-in-restoring-state/

TEXTIMAGE_ON

Indicates that the text, ntext, image, xml, varchar(max), nvarchar(max), varbinary(max), and CLR user-defined type columns (including geometry and geography) are stored on the specified filegroup. TEXTIMAGE_ON is not allowed if there are no large value columns in the table. TEXTIMAGE_ON cannot be specified if <partition_scheme> is specified. If “default” is specified, or if TEXTIMAGE_ON is not specified... » read more

SSPI handshake failed

Error SSPI handshake failed with error code 0x8009030c, state 14 while establishing a connection with integrated security; the connection has been closed. Reason: AcceptSecurityContext failed. The Windows error code indicates the cause of failure. The logon attempt failed Alert SQL Server Log

SQL Server Import and Export Wizard Tool

To import/export between Staging and Production server, use the SQL Server Import and Export Wizard Tool. Use “SQL Server Native client 11.0” Use query to import data to a temporary table and then insert into the destination table from the temporary table. 30 million records = 10 minutes to import data from source table to... » read more

An error occurred while executing batch. Error message is: Exception of type ‘System.OutOfMemoryException’ was thrown.

Symptoms When you use SSMS to run an SQL query that returns a large amount of data, you receive an error message that resembles the following: An error occurred while executing batch. Error message is: Exception of type ‘System.OutOfMemoryException’ was thrown Cause This issue occurs because SSMS has insufficient memory to allocate for large results.... » read more

Convert Foreign Key to Check Constraint

Reason for converting a foreign key to a check constraint After partitional a table where the primary key was modified. If an additional column was added to the primary key, all the foreign key reference will now error out. You can either drop the foreign key or create a CHECK constraint insteac. If the table... » read more