We’re rewarding the question askers & reputations are being recalculated! Read more.

Hot answers tagged

13

Microsoft says that DMV (ring buffers) doesn't work on SQL Server 2017, only 2019: Sys.dm_os_ring_buffers DMV has been a key DMV used for monitoring SQL Server by built-in tools as well as third party monitoring utilities. When SQL Server 2017 was released on Linux, unfortunately this DMV did not return correct CPU usage information by SQL Server ...


1

If you are open to using Powershell... Assume the following table definition: --Demo setup DROP TABLE IF EXISTS BillingData; go CREATE TABLE BillingData (BillingId int, Feature varchar(13), Usage int, Measurement varchar(9), Cost int) ; INSERT INTO BillingData (BillingId, Feature, Usage, Measurement, Cost) VALUES (1, 'Walks', 25, 'walks', 200....


1

So the features here I do not want in a CSV are quite obvious. The --- lines and the output data at the bottom. To remove the output at the bottom, omit the -p parameter. sqlcmd -S databaseserver -U "sa" -d database -p -W -Q "set nocount on; SELECT x as data, count(*) as datacount FROM location WHERE x IS NOT NULL GROUP BY x" -s "," -o output.csv -r0 ...


Only top voted, non community-wiki answers of a minimum length are eligible