Empty Space
  • Home
  • Resume
  • Posts
  • Personal
  • Code
Sign in Subscribe
code

Force clean database log files MS SQL

  • Robin Michael

Robin Michael

05 Apr 2017
Share

The interactive tools are not working, but this script will clear a stubborn log file that won't release.

Link here

http://stackoverflow.com/questions/56628/how-do-you-clear-the-sql-server-transaction-log

Assumption: You are in simple mode

USE TheDatabase;
GO

CHECKPOINT;
GO

CHECKPOINT; -- run twice to ensure file wrap-around
GO

DBCC SHRINKFILE(TheDatabase_Logical_Name, 5); -- unit is set in MBs
GO;

Sign up for more like this.

Enter your email
Subscribe

SQLite - bulk insert compare

In progress, will expand the details out. Create table with generated uniqueness row hash DROP TABLE IF EXISTS agreements; CREATE TABLE IF NOT EXISTS agreements ( file_id TEXT NOT NULL, dag TEXT NOT NULL, file_code TEXT NOT NULL, org_name TEXT, uploaded datetime NOT NULL, expired datetime, version int
26 Jul 2026 1 min read

Strong Opinions, weakly held

Translation 💡Irrational confidence and glaze your opponents I want to dig into this trite phrase that isn't insightful unless your insight is manipulation delivered with a smile. This phrase popularized by large software companies management idiots i.e. Amazon, Microsoft, Google is not of value and is in
20 Jun 2026 2 min read

Thoughts on programming with an LLM

Where do I begin. The topic is fraught with issues and already decided by thought leaders as a completed achievement. You speak or write out a set of instructions to an LLM and it will implement them by generating the most probabilistic matches with some randomness sprinkled in. Further point
14 Apr 2026 5 min read
Empty Space © 2026
Powered by Ghost