Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 834079 - Last Review: March 24, 2004 - Revision: 1.5
How to use TRUNCATE commands to reduce the size of the Application Center MSDE database
On This Page
INTRODUCTION
This step-by-step article describes how
to use
truncate commands to reduce the size of the Microsoft Data Engine (MSDE) database that is installed by Microsoft Application Center 2000
if the database becomes too large.
MORE INFORMATION
If Query Analyzer is installed
If you can access a SQL Server installation that both includes Query Analyzer and can connect to the database, follow these steps to
reduce the size of the database:
- Click Start, click All
Programs, click Microsoft SQL Server, and then click
Query Analyzer.
- In the SQL Server drop-down list, click
Machinename\MSAC.
If the correct Machinename\MSAC instance is not listed,
click the ellipsis button (...) to see a list of all servers that are running SQL Server and that are currently active on your network. Click the correct instance in the list.
- Verify that Windows authentication is selected, and then click
OK.
- Select ACLog database from the drop-down list.
- Type the following command in the Query Analyzer window:
sp_spaceused
- To execute the command, click Execute
on the Query menu.
- To clear the query window, click Clear Window on the Edit menu.
- Make a note of the current database size.
- Type the following command:
truncate table
perfhistory
Repeat steps 6 and 7 to execute the command and to clear the window for the next command. - Type the following command:
truncate table
perfhistory2
Repeat steps 6 and 7. - Type the following command:
truncate table
perfhistory3
Repeat steps 6 and 7. - Type the following command:
truncate table
perfhistory4
Repeat steps 6 and 7. - Type the following command:
truncate table
perfhistory5
Repeat steps 6 and 7. - To verify that you have reduced the size of the
database, repeat steps 5 through 7.
If Query Analyzer is not installed
If you do not have Query Analyzer, you can reduce the size of the
database by using the Osql.exe command-line tool that is included in your MSDE installation.
- Store the following commands in a file that is named Input.txt:
truncate table PerfHistory2
truncate table PerfHistory3
truncate table PerfHistory4
truncate table PerfHistory5
truncate table Config
truncate table Events
truncate table EventHelpMessages
truncate table PerfHistory
dbcc shrinkdatabase (AClog,truncateonly)
dbcc shrinkfile (ACLog_log, 10, truncateonly)
- Save the file in the folder where MSDE is installed. The default location is the following folder:
C:\Program Files\Microsoft SQL
Server\MSSQL$MSAC\Data
- Open a command prompt window.
To do so, click Start, click Run ,
type cmd, and then click OK. - Type the following command, and then click OK:
cd c:\Program
Files\Microsoft SQL Server\MSSQL$MSAC\Data
Substitute the correct folder if your installation
folder is in another location. - Type the following command, and then click OK:
osql -E -S
machinename\msac -d aclog -i input.txt -o output.txt
Substitute the correct server name for machinename in
the command. - Review the Output.txt file that was created in the same location as
the Input.txt file.
This output file indicates whether the command
succeeded. The Aclog.mdf file indicates the size of the database.
How to slow the growth of the database
To prevent the database from
growing too large in the future, you can edit the properties of events for the cluster. To use the following methods in Application Center 2000
Microsoft Management Console (MMC), right-click events for the cluster, and
then click
Properties:
- Keep logged events for fewer days
Change the
default value of the Keep logged events for (days) option to less than 15. - Turn off performance counter logging
Clear the Enable performance counter logging
check box.
REFERENCES
For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
300563Â
(http://kbalertz.com/Feedback.aspx?kbNumber=300563/
)
INFO: Effects of stopping MSDE in Application Center 2000
APPLIES TO
- Microsoft Application Center 2000 Standard Edition
- Microsoft Application Center 2000 Service Pack 2
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate
Be the first to leave feedback, to help others about this knowledge base
article.
(Optional) Name
(Optional)
Public URL Or Email
Comments
No
HTML -- Text Only Please