TechNet
Products
IT Resources
Downloads
Training
Support
Products
Windows
Windows Server
System Center
Microsoft Edge
Office
Office 365
Exchange Server
SQL Server
SharePoint Products
Skype for Business
See all products »
Resources
Channel 9 Video
Evaluation Center
Learning Resources
Microsoft Tech Companion App
Microsoft Technical Communities
Microsoft Virtual Academy
Script Center
Server and Tools Blogs
TechNet Blogs
TechNet Flash Newsletter
TechNet Gallery
TechNet Library
TechNet Magazine
TechNet Wiki
Windows Sysinternals
Virtual Labs
Solutions
Networking
Cloud and Datacenter
Security
Virtualization
Updates
Service Packs
Security Bulletins
Windows Update
Trials
Windows Server 2016
System Center 2016
Windows 10 Enterprise
SQL Server 2016
See all trials »
Related Sites
Microsoft Download Center
Microsoft Evaluation Center
Drivers
Windows Sysinternals
TechNet Gallery
Training
Expert-led, virtual classes
Training Catalog
Class Locator
Microsoft Virtual Academy
Free Windows Server 2012 courses
Free Windows 8 courses
SQL Server training
Microsoft Official Courses On-Demand
Certifications
Certification overview
Special offers
MCSE Cloud Platform and Infrastructure
MCSE: Mobility
MCSE: Data Management and Analytics
MCSE Productivity
Other resources
Microsoft Events
Exam Replay
Born To Learn blog
Find technical communities in your area
Azure training
Official Practice Tests
Support options
For business
For developers
For IT professionals
For technical support
Support offerings
More support
Microsoft Premier Online
TechNet Forums
MSDN Forums
Security Bulletins & Advisories
Not an IT pro?
Microsoft Customer Support
Microsoft Community Forums
Sign in
Home
Library
Wiki
Learn
Gallery
Downloads
Support
Forums
Blogs
Resources For IT Professionals
United States (English)
Россия (Pусский)
中国(简体中文)
Brasil (Português)
Skip to locale bar
Post an article
Translate this page
Powered by
Microsoft® Translator
Wikis - Page Details
First published by
Leandro E. Carvalho
(aMVP, Microsoft Partne)
When:
6 Apr 2011 8:10 PM
Last revision by
Maheshkumar S Tiwari
When:
5 Sep 2013 3:04 AM
Revisions:
2
Comments:
1
Options
Subscribe to Article (RSS)
Share this
Can You Improve This Article?
Positively!
Click Sign In to add the tip, solution, correction or comment that will help other users.
Report inappropriate content using
these instructions
.
Wiki
>
TechNet Articles
>
How to shrink your SCVMM database (Transactional Log)
How to shrink your SCVMM database (Transactional Log)
Article
History
How to shrink your SCVMM database (Transactional Log)
(Generally speaking, this is not a ‘SCVMM-problem’. It`s linked to SQL, and the way the SQL server act when it comes to I/O, Memory, Data, - and log files.)
Ok, you have had your SCVMM server running for a while now, all roles and services installed on a single server. Remember that the SCVMM 2008 R2 server installs a SQL 2005 Express if you don’t specify another instance for this purpose.
The storage limit for a database in SQL 2005 Express is 4GB, so what do you do when the VirtualManagerDB_log starts to grow out of control ?
First, we have to locate our databases.
SCVMM
à
Administration
à
General
à
Database Connection
Here we`ll find the information we need
We`ll see the Database Server Name, Instance, and the name of our database.
We should also locate the file location for the databases.
Start
à
cmd
SQLCMD –S .\Microsoft$VMM$ (Log on to your SQL instance with trusted connection)
1.
Select * from sysdatabases where name = ‘VirtualManagerDB’
2.
Go
Now we`ve located the database, and we can see that the log file is growing (the reason for this, is that the VirtualManagerDB has the ‘Recovery Model’ set to full, which allows the log file to grow since you are able to run log-backups, and can restore the database to any point in time).
We can actually shrink this log file in two ways.
1)
In a heavy way (Fullbackup->log backup->shrink log file (log backup and shrink log file x2)
2)
In a awesome way (sp_detach_db, rename log file, sp_attach_single_file_db)
I`ll go for number 2.
(Be careful if you are planning to do this in production, and off course have a solid backup and make a copy of the log file before editing).
This procedure will cause the SCVMM server to be offline, since we are detaching the database from our SQL server.
Log on to your SQL server instance with SQLCMD –S .\Microsoft$VMM$
1.
Sp_detach_db virtualmanagerdb
2.
Go
3.
Rename the VirtualManagerDB_log to OLDVirtualManagerDB_log
4.
Sp_attach_single_file_db virtualmanagerdb, ‘C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Data\virtualmanagerdb.mdf’
5.
Go
6.
In the data folder for your SQL server, you will now have a newly created log file for VirtualManagerDB at the size of 512KB.
7.
Alter database VirtualManagerDB set recovery simple with no_wait
8.
Go
The database is now in simple recovery, meaning that the log file will not grow out of control again but on a regularly basis create a checkpoint to the data file. (The way SQL uses its log files does not changes, whether you run full, bulk, or simple)
en-US
,
has Images
,
Hyper-V
,
Kristian Nese
,
SCVMM
,
SQL Server
,
System Center Virtual Machine Manager
,
Tips and Tricks
,
Transactional Log
,
VMM
[Edit tags]
Leave a Comment
Please add 5 and 5 and type the answer here:
Post
Wiki - Revision Comment List(Revision Comment)
Wikis - Comment List
Sort by:
Published Date
|
Most Recent
|
Most Useful
Posting comments is temporarily disabled until 10:00am PST on Saturday, December 14th. Thank you for your patience.
Comments
Posted by
Maheshkumar S Tiwari
on
5 Sep 2013 2:57 AM
Maheshkumar S Tiwari edited Original. Comment: Added tags
Edit
Page 1 of 1 (1 items)