Knowledge Base

Giriş

Welcome to my personal knowledge base. Here you will find notes, snippets, and experiences I have gathered over time.

LINUX

remote desktop sorunu - docker ayakta iken

vpn ile baglanirken remote desktop Ubuntuya bağlanıyordu, birden bağlanma srunu yaşamaya başladım. sorun dockerın kafasına göre IP dağıtması imiş.

Çözüm

/etc/docker altına daemon.json oluşturdum ve alttaki ayarı ekledim Docker Desktop ayarlarına girip Docker Engine (JSON) sekmesini açın.

Ayarların içine şu bloğu ekleyin:

"default-address-pools": [ { "base": "10.250.0.0/16", "size": 24 } ]

Docker'ı restart edin, ardından proje klasörünüzde docker compose down ve docker compose up -d yapın.

Bu sayede Docker 172.20.x.x bloklarını tamamen serbest bırakacak, GlobalProtect tünel rotaları temizlenecek ve Ubuntu makinenize RDP ile sorunsuz erişebileceksiniz.

cunaySep 6, 2026
SQL

rarely used indexes

DECLARE @dbid INT SELECT @dbid = db_id() SELECT objectname = object_name(s.object_id) ,s.object_id ,indexname = i.NAME ,i.index_id ,user_seeks ,user_scans ,user_lookups ,user_updates FROM sys.dm_db_index_usage_stats s INNER JOIN sys.indexes i ON i.object_id = s.object_id AND i.index_id = s.index_id WHERE database_id = @dbid AND objectproperty(s.object_id, 'IsUserTable') = 1 ORDER BY (user_seeks + user_scans + user_lookups + user_updates) ASC
cunaySep 6, 2026
SQL

REPLICATION_BUG_FIX

REPLIKASYONA TABI OLAN BIR DATABASE,BASKA BIR SERVER UZERINDE RESTORE EDILDIKTEN SONRA RESTORE EDILEN SERVER UZERINDE, REPLICATION OLMAMASINA RAĞMEN SQL MANAGEMENT TOOL REPLICATION SEKMESINDE, AYNI REPLIKASYON BILGILERI SANAL OLARAK VARMIS GIBI GÖRÜLMEKTEDİR. BU PROBLEMI AŞAĞIDAKİ SCRIPT DÜZELTIR.

USE master GO -- Remove replication objects from the subscription database on MYSUB. DECLARE @subscriptionDB AS SYSNAME SET @subscriptionDB = N'ANKA_20091210' -- Remove replication objects from a subscription database (if necessary). USE master EXEC sp_removedbreplication @subscriptionDB GO USE distribution GO EXEC sp_removedistpublisherdbreplication @publisher = 'dtsqlstage' ,@publisher_db = 'ANKA_20091210'
cunaySep 6, 2026