I was having a terrible time trying to find and evaluate the size of our IPAM database running on Microsoft Server 2012. I was seeing my disk space on the server wasting away after two years of being in production logging all the goodness of Microsoft IPAM and i let it get so far out of hand I was left with 0 disk space. After some thinking and Googling I was reminded of my previous post on moving the WSUS WID database so I went about it that direction. Here is what I did.
I have no proof this works in the wrong one and I'm still waiting to see if it breaks anything in my environment. So if you wish to follow these directions do so at your own risk.
- Backup the IPAM database and log file "ipam.mdf" and "ipam_log.ldf". By default they are found in C:\Windows\System32\ipam\Database
- Install SQL Server Management Studio on the IPAM server
- Open SQL Server Management Studio using "Run as administrator"
- In the Microsoft SQL Server Management Studio Connect to Server window, enter in \\.\pipe\Microsoft##WID\tsql\query and authenticate using Windows Authentication. Click Connect.
- Within the Microsoft SQL Server Management Studio Object Explorer, under the \\.\pipe\Microsoft##WID\tsql\query object, expand Databases
- From the Databases listing, select the IPAM database, then right click then hover over Tasks, hover over Shrink, and select Databases, the Shrink Database - IPAM window displays.
- From the Shrink Database - IPAM window modify any options you wish to modify and click OK to execute. When completed the Shrink Database window should close.
- Depending on the size of the IPAM.mdf file this may take several minutes to shrink.
If you are having a problem where the Windows Server IPAM database is configured for Unlimited growth you can modify the max size and configure autoshrink as well.
- To do this perform the following actions:
- Right click on the IPAM database from Microsoft SQL Server Management Studio's Object Explorer and Select Properties. The Database Properties - IPAM window displays.
- From the Database Properties - IPAM window, under Select a page, select Files,
- Find the IPAM database row, and scroll over to view the ellipses under the Autogrowth/Maxsize column. Click the ellipses in this column for the database's row. The Change Autogrowth for IPAM window displays.
- Within the Change Autogrowth for IPAM window, change the Maximum File Size Limited to (MB) to an acceptable size for your environment and click OK. Click OK in the Database Properties - IPAM window to execute the changes.