SQL Server Performance Tuning — Top 10 sessions caused blocking SELECT TOP 10 r.session_id, r.plan_handle, r.sql_handle, r.request_id, r.start_time, r.status, r.command, r.database_id, r.user_id, r.wait_type, r.wait_time, r.last_wait_type, r.wait_resource, r.total_elapsed_time, r.cpu_time, r.transaction_isolation_level, r.row_count, st.text FROM sys.dm_exec_requests r CROSS APPLY sys.dm_exec_sql_text(r.sql_handle) AS st WHERE r.blocking_session_id = 0 AND …
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 …
Memory-Optimized Tables
Monitor Memory Optimized Table Space Usage : ; WITH system_allocated_memory ( system_allocated_memory_in_mb ) AS ( SELECT ISNULL(( SELECT CONVERT(DECIMAL(18, 2), ( SUM(TMS.memory_allocated_for_table_kb) + SUM(TMS.memory_allocated_for_indexes_kb) ) / 1024.00) FROM [sys].[dm_db_xtp_table_memory_stats] TMS WHERE TMS.object_id <= 0 ), 0.00) ), table_index_memory ( table_used_memory_in_mb, table_unused_memory_in_mb, index_used_memory_in_mb, index_unused_memory_in_mb ) AS …
Brute force attack on SQL Server
Brute force attack on SQL Server If your business needs the SQL Server to be accessible on public network, you may be very vulnerable for brute force attacks. Following query will help you identify the failed login attempts and you can further understand where the …
SQL Injection attack on Website hosted on EC2 Machine
SQL Injection attack on Website hosted on EC2 Machine: I setup a website http://h1bsalary.online with publicly available dataset. As soon as I launched website, numerous trolls and automated bots sending traffic to identify the vulnerabilities. Safe-Guards I have taken so far : Provisioned Least privileged accounts to …
Install SQL Server Docker Container on Linux
Install SQL Server Docker Container on Linux and Connect through Client Tools I was surprised by ability to run setup and run SQL Server Docker container. It only takes about 2 commands and 2 Minutes. $docker pull microsoft/mssql-server-linux $docker run -e ‘ACCEPT_EULA=Y’ -e ‘SA_PASSWORD=Password’ -p 1433:1433 …
AWS Data Pipeline & Load S3 File Into MySQL
Getting started with AWS Data Pipeline AWS Data Pipeline is a web service that you can use to automate the movement and transformation of data. With AWS Data Pipeline, you can define data-driven workflows, so that tasks can be dependent on the successful completion of previous …
AWS Regions and Availability Zones
AWS Regions and Availability Zones C:\Users\Raju>AWS ec2 describe-regions C:\Users\Raju> aws ec2 describe-availability-zones EC2 Regions and US-WEST-2 Availability Zones References: http://docs.aws.amazon.com/general/latest/gr/rande.html http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#using-regions-availability-zones-describe
Restrict S3 bucket Access to VPC
Allow access to S3 bucket only from VPC Currently I am evaluating options to lockdown permissions to my S3 Buckets as part of Security Enhancements. These are the steps I followed to lock down S3 Bucket access only to my VPC. Create VPC End Points …