USE mydatabasename
DBCC SHRINKDATABASE (mydatabasename)
DBCC SHRINKFILE(mydatabasename_log, 10)
BACKUP LOG mydatabasename WITH TRUNCATE_ONLY
You can search the web for information about the following functions to learn about usage:
DBCC SHRINKDATABASE
DBCC SHRINKFILE
BACKUP LOG
If you must shrink a production database, you should always rebuild indexes afterwards (DBCC DBREINDEX). You need to keep in mind that DBCC DBREINDEX is an offline process as it can take some time to run and will lock tables.
Another consideration when using DBCC DBREINDEX is what fill factor to use. The fill factor will depend on the read to write ratio for a given table. The more write intensive the table is, the higher the fill factor.
There is a great document called 'Tuning Navision For Better Performance' that explains what fill factors to use. See http://www.mibuso.com/dlinfo.asp?FileID=356.
Alternately, you can use DBCC INDEXDEFRAG to defragment the indexes. This is an online process, but it can cause performance issues while the command is running and it does not work near as well as DBCC DBREINDEX does.
To reduce dimensions
BACKUP LOG DB_Name WITH TRUNCATE_ONLY
and reduced it with
DBCC SHRINKDATABASE (DB_Name , TRUNCATEONLY)