Azure – Troubleshooting AKS Recommended KeepAlive Settings sudo bash -c “echo 120 > /proc/sys/net/ipv4/tcp_keepalive_time” sudo bash -c “echo 30 > /proc/sys/net/ipv4/tcp_keepalive_intvl” sudo bash -c “echo 8 > /proc/sys/net/ipv4/tcp_keepalive_probes”
Change Database Recover Model
Change Database Recover Model USE master DECLARE @isql VARCHAR(2000), @dbname VARCHAR(64), @logfile VARCHAR(128) DECLARE c1 CURSOR FOR SELECT d.name, mf.name AS logfile –, physical_name AS current_file_location, size FROM sys.master_files mf INNER JOIN sys.databases d ON mf.database_id = d.database_id WHERE recovery_model_desc <> ‘SIMPLE’ AND d.name NOT …
Azure Useful Queries
Log Analytics // Percentiles Calculation search * | where Category == ‘SQLSecurityAuditEvents’ | order by event_time_t , server_principal_name_s ,duration_milliseconds_d | where database_name_s == “UserDB” | where server_principal_name_s == “databaselogin” | summarize percentiles(duration_milliseconds_d, 25, 50, 75, 90,95,99) by substring(statement_s, 0, 40) , server_principal_name_s ,application_name_s | where …
Deadlocks in Azure SQL Database
Deadlocks in Azure SQL Database : Recently we were working with Azure Logic Apps to invoke Azure Functions. By Default, Logic App runs parallel threads and we didn’t explicitly control the concurrency and left the default values. So Logic App invoked several concurrent threads which …
Azure SQL Database Connectivity Architecture
Azure SQL Database Connectivity Architecture Connection policy Azure SQL Database supports the following three options for the connection policy setting of a SQL Database server: Redirect (recommended): Clients establish connections directly to the node hosting the database. To enable connectivity, the clients must allow outbound firewall …
Azure Database Firewall Queries
— Server Level Firewall Rules SELECT * FROM sys.firewall_rules — Database Level Firewall Rules SELECT * FROM sys.database_firewall_rules — — Remove server level firewall setting EXECUTE sp_delete_firewall_rule N’AllowAllWindowsAzureIps’; — Remove database-level firewall setting EXECUTE sp_delete_database_firewall_rule N’Allow Azure’; — Add database-level firewall setting EXECUTE sp_set_database_firewall_rule N’Allow …
Videos Watched
Videos Watched October 201 October 20 Meet My Next Guest, Richard M Stallman https://www.youtube.com/watch?v=VMM6D9vuHkY October 21 Monitor your infrastructure and analyze operational logs at scale with Azure Monitor – BRK3354 https://www.youtube.com/watch?v=_0ccWoScTyE Uncle” Bob Martin – “The Future of Programming https://www.youtube.com/watch?v=ecIWPzGEbFc October 29 The Principles …
Stored Procedure Error Logging
Stored Procedure Error Logging Create table to capture Errors Create Stored Procedure to Log Error Invoke Stored Procedure in TRY/CATCH Block USE TEMPDB; GO IF OBJECT_ID(‘APM.ErrorLog’) IS NOT NULL DROP TABLE APM.ErrorLog; GO CREATE TABLE APM.ErrorLog ( ErrorLogID INT IDENTITY(1, 1) PRIMARY KEY, DatabaseID INT, …
Install and Run SQL Server Docker Container on Mac
Install and Run SQL Server Docker Container on Mac Like most people, I use Mac , Windows as well Linux OS for development and testing purposes. Primarily I use Mac for Development purpose. I have few projects which uses SQL Server as Data Storage Layer. Setting up …
Bulk Load Data Files in S3 Bucket into Aurora RDS
Bulk Load Data Files in S3 Bucket into Aurora RDS We typically get data feeds from our clients ( usually about ~ 5 – 20 GB) worth of data. We download these data files to our lab environment and use shell scripts to load the data …