Mehedi Amin

SQL Database Admin | AWS Cloud | PowerShell Automation | Performance Tuning | Disaster Recovery

About

Hello and welcome!

I’m Mehedi Amin, a Lead SQL Database Administrator with over nine years of expertise in optimizing data systems, cloud migrations, and performance tuning. I specialize in building secure, scalable, and efficient database solutions, leveraging AWS, Azure, and advanced automation tools.

My services are tailored to meet the SQL community’s needs, and you can find them here, on Fiverr, and on Upwork. Let’s work together to streamline your data processes!

Services

Let me help make better use of your data. I offer consulting, training, and speaking engagements.

Talking

Hire me to talk about programming or data visualization. I ❤️ it!

Consulting

Need a custom interactive graph? Some R or React work? Creating beautiful reports with Quarto?

Recent Post

abcdefghij

  select COUNT(name) AS from sys.sysdatabases where dbid>4 ;with logs as ( select d.name , case when lssd.secondary_database = d.name then 1 else 0 end as IsSecondary from sys.databases d left...

Server Inventory

SELECT name AS , physical_name AS current_file_location ,type_desc ,size*8/1024/1024 FROM sys.master_files order by name go...

Make DB read-only and read-write from Dynamic query

-- Variables to be used in the script DECLARE @name VARCHAR(50) -- the name of the database DECLARE @strSQL nvarchar(150) -- the SQL that will be executed against each database USE Master -- Declare a...

Get All the Information of Database using sys.databases

SELECT database_id, CONVERT(VARCHAR(25), DB.name) AS dbName, CONVERT(VARCHAR(10), DATABASEPROPERTYEX(name, 'status')) AS , state_desc, (SELECT COUNT(1) FROM sys.master_files WHERE DB_NAME(database_id)...

Change – OwnerCompatibilityRecovery

-------------------DB Owner SA IF (SELECT COUNT(*) FROM sys.databases WHERE owner_sid <> 0x01) <> 0 BEGIN EXEC sp_MSForEachDB ' USE IF DB_ID() > 4 BEGIN ALTER AUTHORIZATION ON...

Auto generate SQL Server database attach and detach scripts

------------------------------------- List all ONLINE databases attached to the drives, except for system databases: SELECT DISTINCT DB_NAME(dbid) ,name as ,filename as FROM master.dbo.sysaltfiles...