March 10, 2020 at 9:47 pm
Comments posted to this topic are about the item Graph multiple databases growth using SSMS only
March 17, 2020 at 10:03 am
Is this related to a specific version of SQL Server?
I've just run it on SQL 2016 and the STRING_AGG method is unknown.
March 17, 2020 at 10:28 am
Nevermind, I've just googled STRING_AGG and it's only available from SQL2017+
March 17, 2020 at 11:39 am
Did you leave out a step? What do you do w/the results?
March 17, 2020 at 1:27 pm
Hi dplaut 49149, after plotting the data I tell my customer which databases are growing fast and the space requirement for next month, with a graph. I can also tell them which databases never grow so there's no need to provision space for them. And they prefer a graphic over a number, that's why I generate it that way. I also tell them which server is needing the most space when I run it as a multi-server query.
March 17, 2020 at 1:33 pm
Hi matthew.cartwright, you can use "FOR XML" and "STUFF" to generate a string out of multiple rows, you can find an example in this tip where I did the same: https://www.mssqltips.com/sqlservertip/5169/sql-server-parallelism-overview/. The GEOMETRY datatype exists since SQL Server 2008 and SSMS plots it.
March 17, 2020 at 1:55 pm
Sorry, I'm being dense.
I see results like the below and I don't know what to do w/ it.
0x000000000114000000000000000025AE635C713103400000000000805640138255F5F2BB0740
March 17, 2020 at 1:57 pm
Hi dplaut 49149, just ignore them, these are GUID for the graphics generated in another tab, just switch to the plotted graphics.
March 17, 2020 at 2:17 pm
Thanks, got it. I did not notice the tab and didn't even know about that feature. Thanks, I've learned a lot.
May 25, 2021 at 6:58 am
Hi Pablo, can you please the script that helps plot the graphs, I am not so strong in this stuff, thanks
May 25, 2021 at 1:13 pm
Hi eliassal, can you please clarify your request?
May 25, 2021 at 2:09 pm
You indicate in one of your links "the storage needs for the next 45 days using the instructions "Forecasting, Identifying Trends with Linear Regression · Advanced SQL · SILOTA", how this will be done in SSMS, not in R?
May 25, 2021 at 2:26 pm
Hi eliassal, this is calculated in the CTEs named [slope] (calculates m) and [lr] (linear regression), then you can see in the next statement it is grouped by [m] and to complete the form y=mx+b. Please let me know if it clarifies your question.
May 25, 2021 at 3:10 pm
So many thanks, but how we can get data to used in excel and not spatial?
May 25, 2021 at 3:56 pm
Not totally sure I understand your question, but if you're wondering how to get the data from your stored procedure into Excel, it's pretty easy.
Go to Data tab, Get Data, from SQL Server.
Then you get Server, Database, and there's an "Advanced Options" part - click the down arrow thing. A textbox will appear... Copy & Paste the T-SQL statement there. Could be EXEC storedProc param1... or a query. Run and it will pull the data returned into Excel for you, and then you can graph it.
Viewing 15 posts - 1 through 15 (of 20 total)
You must be logged in to reply to this topic. Login to reply