Solved

SQL Database Capacity Planning

Posted on 2014-02-20
9
343 Views
Last Modified: 2014-02-24
Capacity Planning

I have been tasked with the following for my department.

(1)      Determining data grow over the past two or three years – for example using our contracts table as bench marking, dependencies and database to forecast capacity planning for the next five years.
(2)      Capacity planning database wise to determine disk space sizes

Can somebody lead me in the right direction?
0
Comment
Question by:Favorable
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
9 Comments
 
LVL 34

Expert Comment

by:Brian Crowe
ID: 39874047
You can determine the number of contracts in the system at any given time.  You know the current size of your database and based on the rate of increase you can extrapolate the number of contracts at any given time in the future.  From this you can calculate the estimated size of your database at any given point.  You are making a few assumptions in this process but it's workable.
0
 
LVL 75

Assisted Solution

by:Aneesh Retnakaran
Aneesh Retnakaran earned 150 total points
ID: 39874052
Use the previous backups if any , check how the backup sizes are increasing, that should give you fair idea. also, you should check year end activities, some applications purges the data, some will have a sudden growth (year end tax filing, shopping etc )
0
 

Author Comment

by:Favorable
ID: 39874095
BriCrowe and Aneesh,

Do any of you have a script I can you to achieve your response?
0
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
LVL 34

Expert Comment

by:Brian Crowe
ID: 39874117
You would need to provide some schema information on your contracts table.
0
 
LVL 34

Accepted Solution

by:
Brian Crowe earned 350 total points
ID: 39874304
I decided to play with it a bit and used an Orders table  and came up with the following:

Obviously you will need to adjust the size value, target dates, and the target schema but the process should hold.  Just copy the results into Excel and create a chart.  You can add a trendline to the chart to show future values based on the results.

DECLARE @DBSize	FLOAT;

SET @DBSize = 25.4;	--GB

IF OBJECT_ID('tempdb..#OrderHistory') IS NOT NULL
	DROP TABLE tempdb..#OrderHistory;

WITH cte
AS
(
	SELECT DATEADD(MONTH, DATEDIFF(MONTH, 0, OrderDate), 0) AS [Date], COUNT(OrderID) AS OrderCount
	FROM esf_Order
	WHERE StoreNumber = 1
		AND OrderDate > '1/1/2013'
		AND OrderDate < '2/1/2014'
	GROUP BY DATEADD(MONTH, DATEDIFF(MONTH, 0, OrderDate), 0)
)
SELECT cte1.[Date], CAST(SUM(cte2.OrderCount) AS FLOAT) AS Value
INTO #OrderHistory
FROM cte AS cte1
INNER JOIN cte AS cte2
	ON cte1.[Date] >= cte2.[Date]
GROUP BY cte1.[Date]
ORDER BY cte1.[Date]

--Normalize the data

DECLARE @NormalizeQuotient	FLOAT;

SELECT TOP 1 @NormalizeQuotient = Value
FROM #OrderHistory
ORDER BY [Date] DESC

UPDATE #OrderHistory
SET Value = Value / @NormalizeQuotient

--Multiply by current Size

UPDATE #OrderHistory
SET Value = Value * @DBSize

SELECT * FROM #OrderHistory

Open in new window

EE-DB-Size-Prediction.xlsx
0
 

Author Comment

by:Favorable
ID: 39874332
The db has been growing since the past five years.
Current size plus log  83285.00 MB is the largest one I want to use as baseline to forecast capacity planning for the next five years.

See the attached
This-Database-size.docx
0
 
LVL 34

Expert Comment

by:Brian Crowe
ID: 39874354
I wouldn't include the log file in your calculations.  The log file shouldn't change much regardless of your data file size.  The log file size is determined by your transaction rate and how often you are doing transaction log backups.  Hopefully the example I provided above will give you what you need.
0
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 39874394
Another option is to implement Datacollector to monitor database size, you need to monitor for at least a month to get an idea of the database growth
0
 

Author Closing Comment

by:Favorable
ID: 39882195
Thank you
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question