Shrink MSSQL Database Transaction Logs

Have you ever encounter problem when managing MSSQL databases, the transactions logs is eating up your hard disk if you not initially configured to be limit in growth value. So, when you see this kind of problem, you actually can shrink the transaction log, and then change the limit of growth value using MSSQL Management Studio.

1. Open MSSQL Management Studio

2. Open the SQL command windows and put following lines

USE <DatabaseName>
GO
DBCC SHRINKFILE(<TransactionLogName>, 1)
BACKUP LOG <DatabaseName> WITH TRUNCATE_ONLY
DBCC SHRINKFILE(<TransactionLogName>, 1)
GO
									

Replace the <DatabaseName> and <TransactionLogName> with respective value and execute the SQL. Now your transaction logs will be shrinked and you will save a lot of disk space. Do not forget to do the prevention action afterwards!

Plesk – DNS error (Error code 80)

Error code:

-----------------------------------------------------------------
Set default component failed: defpackagemng failed: Execute dnsmng.exe REMOVE * failed: The file exists. (Error code 80) at GetTempFileName in C:\Program Files\Parallels\Plesk\admin\db
Execute dnsmng.exe UPDATE * failed: The file exists. (Error code 80) at GetTempFileName in C:\Program Files\Parallels\Plesk\admin\db
------------------------------------------------------------------

or

-----------------------------------------------------------------
Set default component failed: defpackagemng failed: Execute dnsmng.exe REMOVE * failed: The file exists. (Error code 80) at GetTempFileName in C:\Windows\Temp
Execute dnsmng.exe UPDATE * failed: The file exists. (Error code 80) at GetTempFileName in C:\Windows\Temp
------------------------------------------------------------------

Consequence:
DNS Server is switched off or unavailable to lookup DNS zone

Solution:
Remove the temporary files by navigate to correct path and run delete the Plesk temporary files. In this case, we will use CMD to solve error no 1:

cd "C:\Program Files\Parallels\Plesk\admin\db"
del /F /S /Q tmp*.tmp

Try adding back the DNS server by login into Plesk > Settings > Server Components > DNS Server, select BIND and click OK.