How to determine the size of the transaction log, Manually controlling transaction log growth, How to – Grass Valley NewsBrowse Desktop Browsing System Installation v.2.0 User Manual
Page 119

25 May 2004
NewsBrowse Installation and Configuration Guide
119
Database Maintenance
5. To free unused resources to the operating system execute the following command:
DBCC SHRINKFILE(ThomsonAM_log, 2)
How to determine the size of the transaction log
When SQL is installed the space that it is allotted on the operating system is divided
into two parts: 50% is given to store transaction logs and 50% is reserved for data. To
identify the amount of space the transaction logs is taking up, open SQL Query
Analyzer and execute the following command.
DBCC sqlperf(logspace)
This command will return the amount of space each database’s transaction log is
taking up and the percentage of space the transaction log is using. The column that
lists the percent of space the transaction log is taking up is misleading. NewsBrowse
databases set the transaction log growth limit to 500MB. If one of the databases
transaction logs is larger than 350MB, then follow the steps in the next procedure
“Manually controlling transaction log growth”
.
Manually controlling transaction log growth
Use this procedure when the transaction log is approaching its size limit. First back
up the database and the transaction log to keep a record of its current state. Then flush
and shrink the transaction log file to reduce its size. To do this open SQL Enterprise
Manager and manually backup the database and transaction log of the database in
question. The steps to do this are as follows:
1. From the Enterprise Manager right mouse click the database in question; select
All
Tasks\ Backup Database…
2. Make sure that the
Database Complete
radio button is selected.
3. In the
Destination
section under
Backup to:
, check the file path and make sure the
file has a .bak extension. If it does not have a .bak extension or the path is not where
you would like the backup file to reside, click the
Remove
button to remove the file
and the associated path. Click the
Add…
button and browse to the directory to
which you would like to store the file. Make sure you give it a file name with the
.bak file extension. (For example: D:\DB\ThomsonAM.bak) Click the
OK
button
and verify that the path entered is listed in the Backup to: list.
4. In the
Overwrite
section make sure that
overwrite existing media
radio button is
selected.
5. Click the
OK
button to backup the database.
6. To backup the transaction log the steps are very similar. Open the Enterprise
Manager right mouse click the database in question, select
All Tasks\ Backup
Database…
7. Make sure that the
Transaction log
radio button is selected.
8. In the
Destination
section under
Backup to:
, check the file path and make sure the
file has a .trn extension. If it does not have a .trn extension or the path is not where
you would like the backup file to reside, click the
Remove
button to remove the file
and the associated path. Click the
Add…
button and browse to the directory to
which you would like to store the file. Make sure you give it a file name with the
.trn file extension. (For example: D:\DB\ThomsonAM.trn) Click the
OK
button and