Some Notes, Some Scripts

These are the noted taken for searching solutions and some scripts to identify the problem

Categories:

SELECT NAME,NAME ‘password’FROM sys.sql_loginsWHERE Pwdcompare(NAME, password_hash) = 1UNIONSELECT NAME,‘Blank’ AS ‘password’FROM sys.sql_loginsWHERE Pwdcompare(‘ ‘, password_hash) = 1UNIONSELECT NAME,‘password123’ AS ‘password’FROM sys.sql_loginsWHERE Pwdcompare(‘password123’, password_hash) = 1

Categories:

This query helps you identify your tables and calculate size/rowcount ratio easily: USE [DatabaseName] -- replace your GO SELECT s.Name AS SchemaName,t.Name AS TableName,p.rows AS RowCounts, CAST(ROUND((SUM(a.used_pages) / 128.00), 2) AS NUMERIC(36, 2)) AS Used_MB, CAST(ROUND((SUM(a.total_pages) – SUM(a.used_pages)) […]

Categories:

Assume that all we know why we are using IDENTITY column in a table. It you are inserting any row and getting error: “Server: Msg 8101, Level 16, State 1, Line 2An explicit value for the identity column […]

Categories:

SQL Server için tanımlanan memory alanı ne kadar yeterli sorusuna en iyi cevabı verecek olan sorgudur. PLE özetle, cache üzerinde bir verinin ne kadar süre kaldığını gösterir. Eğer bu süre uzun ise sorun yok. Ama kısa ise bu […]

Categories:

When any connection starts the value of the SET LOCK_TIMEOUT is -1, which means that the query has to wait for infinite time for the lock to be released on another query. If you want to simulate the scenario […]