mansonitefirefox
mansonitefirefox

Reputation: 177

Create a backup without a transaction log

I have been given a backup of a SQL Server 2008 database in the form of a 150mb .bak file.

When I attempt to restore it to another server it attempts to secure 170gb+ of data, I am assuming this is due to a completely unreasonable transaction log size.

Unfortunately I do not have that much space on my VM to just restore it, so I have restored it on my local machine and after 3 or so hours of "100% complete, loading" it has finally restored.

So... the question is, how do I make another backup of this DB WITHOUT THE TRANSACTION LOG on SQL Server Management Studio Express 2014?

Upvotes: 1

Views: 24740

Answers (2)

Ephie
Ephie

Reputation: 247

First set your database Recovery model Parameter to Simple as @mansonitefirefox suggested in the above screenshot.

Than, if you have the possibility of Detaching the database for just a moment, using Microsoft SQL Management Studio you could Detach the database from the Microsoft SQL Serveur instance, go the folder that contains your sql MyDataBase.mdf file (something like D:\Program Files\Microsoft SQL Server\MSSQL13.SQLEXPRESS\MSSQL\DATA) and erase the MyDataBase_log.ldf file that's just beside the MyDataBase.mdf file. Than Attach the database back again (During the Attach process, you will see a little table with the first line being your MyDataBase.mdf file and the second line being your MyDataBase_log.ldf. Erase the MyDataBase_log.ldf before finishing the attach process. The Server will than re-create a new and very small MyDataBase_log.ldf and log file).

Upvotes: 0

mansonitefirefox
mansonitefirefox

Reputation: 177

Change db recovery mode to simple

Fixed by changing the Recovery Mode to simple, dropped the 170gb transaction log to 1.5mb. Thanks @Ennor

Upvotes: 8

Related Questions