Skip to content

Instantly share code, notes, and snippets.

View alivarzeshi's full-sized avatar

Ali varzeshi alivarzeshi

View GitHub Profile
Date/Time: 2023-03-03 09:00:00
Log Level: Information
Source: SQL Server
Message: Login succeeded for user 'username'. Connection: Non-Trusted.
Date/Time: 2023-03-03 09:05:00
Log Level: Error
Source: SQL Server
Message: Login failed for user 'username'. Reason: Password did not match that for the login provided. [CLIENT: <local machine>]
Date/Time: 2023-06-22 10:23:54.32
Log Level: Information
Source: Always On
Message: The state of the availability group 'AG1' has changed from 'RESOLVING' to 'PRIMARY'.
Date/Time: 2023-06-22 10:25:03.78
Log Level: Warning
Source: Always On
Message: An automatic failover occurred in availability group 'AG1'. The primary replica is now 'Replica
Date/Time: 2023-06-22 08:00:00
Log Level: Information
Source: Replication
Message: Publication 'SalesDataPublication' was created successfully.
Date/Time: 2023-06-22 09:00:00
Log Level: Information
Source: Replication
Message: Subscription to publication 'SalesDataPublication' was initialized successfully for subscriber 'SubscriberServer'.
Date/Time: 2023-06-22 14:00:00
Log Level: Warning
Source: SQL Server
Message: High CPU usage detected. SQL Server is utilizing 90% of the available CPU resources.
Date/Time: 2023-06-22 14:30:00
Log Level: Warning
Source: SQL Server
Message: SQL Server has detected memory pressure. The buffer cache hit ratio is below the recommended threshold.
@alivarzeshi
alivarzeshi / Main Folder Security.sql
Last active October 12, 2024 16:36
Main Folder Security
DECLARE @IsPrimary INT;
DECLARE @JobName NVARCHAR(128);
-- Check if the current node is the primary replica
SELECT @IsPrimary = CASE
WHEN role_desc = 'PRIMARY' THEN 1
ELSE 0
END
FROM sys.dm_hadr_availability_replica_states AS ars
JOIN sys.availability_replicas AS ar
Date/Time: 2023-06-22 09:00:00
Log Level: Information
Source: SQL Server
Message: Database 'MyNewDatabase' was created by user 'admin'.
Date/Time: 2023-06-22 10:00:00
Log Level: Information
Source: SQL Server
Message: Database 'OldDatabase' was deleted by user 'admin'.
@alivarzeshi
alivarzeshi / prevent split-brain scenarios.txt
Last active July 5, 2024 08:56
What strategies does WSFC use to prevent split-brain scenarios?
What strategies does WSFC use to prevent split-brain scenarios?
@alivarzeshi
alivarzeshi / Alivarzeshi
Last active June 3, 2025 08:15
Optimizing WordPress performance
‎‎​
@alivarzeshi
alivarzeshi / Top Critical Components of Data Engineering
Last active October 4, 2024 10:39
Top Critical Components of Data Engineering
Top Critical Components of Data Engineering