MS SQL
# shrink database (test)
USE Database_Name
select name,recovery_model_desc from sys.databases
ALTER DATABASE Database_Name SET RECOVERY simple
DBCC SHRINKFILE (Database_Name_log , 1)
ALTER DATABASE [mydatabase] SET RECOVERY SIMPLE
DBCC SHRINKFILE()
ALTER DATABASE [mydatabase] SET RECOVERY FULL
DBCC SHRINKFILE()
BACKUP LOG WITH TRUNCATE_ONLY
DBCC SHRINKFILE()
ALTER DATABASE mydb1 MODIFY FILE (NAME = mydb1_log, SIZE = 8192);
DBCC SHRINKFILE(mydb1_log, 124400);