Howto: Shrink MS SQL Database Transaction Log

As some hosting provider do limited the size of MS SQL database to be hosted, you might found out your database is not really used up the allocated size.

For many cases, it is because your database transaction log used up those spaces and you might not need to have this transaction log for any purpose. To get this resolve, you may shrink the database transaction log.

1. Open the MS SQL Management Studio and connect to the console.
2. Run the following command from SQL Query.

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

** Replace the DatabaseName and TransactionLogName with your database information.

In most of the cases, you may schedule this task to be run automatically if needed.

cPanel: Assigned dedicated IP to subdomain

You might want to assign dedicated IP to your subdomain for some reason such as apply SSL to your subdomain.

If you are using cPanel and wish to set dedicated IP to your subdomain, you will find no else where to do that.

However, this could still be able to fix as this article.

Scenario,
– You have domain domain.com and subdomain blog.domain.com.
– You wish to set dedicated IP for blog.domain.com which originally 100.100.100.100 and result as blog.domain.com resolve to 10.0.0.1.

Continue reading cPanel: Assigned dedicated IP to subdomain