July 6, 2015 at 11:42 pm
Hello, I wondered if someone could help me out.
I wanted to remove an extra transaction log file that was no longer required, and ran the following against the database...
DBCC Shrinkfile (DB_Name_log2, Emptyfile);
go
alter database [Db_Name]
remove file DB_Name_log2;
go
I got a successful removal message. But if I go into the properties of the database, and click on files, it still shows up. Why is this and how can I get rid of it?
It shows up in sys.master_files as offline.
Thank you.
Regards,
D
July 7, 2015 at 12:41 am
Hi,
Please check on a test system, but I think it will be removed on the next SQL Server service restart.
July 7, 2015 at 6:01 am
is the database in full recovery mode?
run a transaction log backup
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
July 10, 2015 at 12:55 am
Nice one, Perry, Thanks!
July 10, 2015 at 4:19 am
you're welcome
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply