USE mydbname GO ALTER DATABASE mydbname Set Recovery Simple GO ALTER DATABASE mydbname Set Recovery Full GO DBCC SHRINKFILE ('mydbname_log', 1) GO
Computer, Technology, Databases, Google, Internet, Mobile, Linux, Microsoft, Open Source, Security, Social Media, Web Development, Business, Finance
Tuesday, May 17, 2011
Database Shrink MsSQL database log file
Many questions have been raised on the Internet on how to shrink the file size of a database log file. The following code snippet will do what is needed (replace mydbname with your database name).
Subscribe to:
Post Comments (Atom)
-
Installed FortiClient recently but the challenge in disabling the application/service from running automatically on every start-up annoyed m...
-
If you have been reading the mainstream media or the social media, it is likely that you would have heard of SimplyGo - an initiative by the...
-
Cecilia Cheung (张柏芝) is planning to sue famous artist and principal of an Arts and Sciences College in Nanjing, Yang Linchuan (杨林川), for hav...
-
The Belt and Road Initiative is envisioned to enhance connectivity across continents through infrastructure investment, cultural exchange a...
No comments:
Post a Comment
Do provide your constructive comment. I appreciate that.