SQL server 2012 Standard report Disk usage – stale data
I have strange problem, where standard report is giving me old data, from several months, but no new data. I can not see any errors.
If I generate standard report fro disk usage, I get old data
from two monts. No new data. If I open trace file, I can see current data.
If I run query, I can see current data :
SELECT
TE.name
AS [EventName]
T.DatabaseName
t.DatabaseID
t.NTDomainName
t.ApplicationName
t.LoginName
t.SPID
t.Duration
t.StartTime
t.EndTime
FROM
sys.fn_trace_gettable(CONVERT(VARCHAR(150),
( SELECT
TOP 1
f.[value]
FROM sys.fn_trace_getinfo(NULL)
f
WHERE f.property
= 2
)), DEFAULT)
T
JOIN sys.trace_events
TE ON
T.EventClass
= TE.trace_event_id
WHERE
te.name
= 'Data File Auto Grow'
OR te.name
= 'Data File Auto Shrink'
ORDER
BY t.StartTime
SELECT
REVERSE(SUBSTRING(REVERSE(path),
CHARINDEX('\',
REVERSE(path)), 256))
AS DefaultTraceLocation
FROM
sys.traces
WHERE
is_default = 1
But these query gives me, data that I see in the report.
SELECT
TE.name
AS [EventName]
T.DatabaseName
t.DatabaseID
t.NTDomainName
t.ApplicationName
t.LoginName
t.SPID
t.Duration
t.StartTime
t.EndTime
FROM
sys.fn_trace_gettable(CONVERT(VARCHAR(150),
( SELECT
TOP 1
f.[value]
FROM sys.fn_trace_getinfo(NULL)
f
WHERE f.property
= 2
DEFAULT)
T
JOIN sys.trace_events
TE ON
T.EventClass
= TE.trace_event_id
WHERE
te.name
= 'Data File Auto Grow'
OR te.name
= 'Data File Auto Shrink'
ORDER
BY t.StartTime
SELECT
REVERSE(SUBSTRING(REVERSE(path),
CHARINDEX('\',
REVERSE(path)), 256))
AS DefaultTraceLocation
FROM
sys.traces
WHERE
is_default = 1
Hi,
SQL Server Management Studio Standard report-Disk Usage works normally in my test machine. My Microsoft SQL Server Management Studio version is 11.0.3128.0.
Before going further, I would verify if only Data/Log File Autogrow/Autoshrink Events shows the old information.
“Transaction Log Space Usage (%)” uses DBCC SQLPERF (LOGSPACE) and shows how much empty space we have in the physical transaction log file. Disk space used by Data Files uses DBCC SHOWFILESTATS to get information.
Data/Log File Autogrow/Autoshrink Events uses the data from Default Trace.
You can use SQL Profiler to capture the activities. The following entries was recorded when I ran Disk Usage report.
exec sp_executesql @stmt=N'
begin try
if (select convert(int,value_in_use) from sys.configurations where name = ''default trace enabled'' ) = 1
begin
declare @curr_tracefilename varchar(500) ;
declare @base_tracefilename varchar(500) ;
declare @indx int ;
select @curr_tracefilename = path from sys.traces where is_default = 1 ;
set @curr_tracefilename = reverse(@curr_tracefilename);
select @indx = patindex(''%\%'', @curr_tracefilename) ;
set @curr_tracefilename = reverse(@curr_tracefilename) ;
set @base_tracefilename = left( @curr_tracefilename,len(@curr_tracefilename) - @indx) + ''\log.trc'' ;
select (dense_rank() over (order by StartTime desc))%2 as l1
, convert(int, EventClass) as EventClass
, DatabaseName
, Filename
, (Duration/1000) as Duration
, StartTime
, EndTime
, (IntegerData*8.0/1024) as ChangeInSize
from ::fn_trace_gettable( @base_tracefilename, default )
left outer join sys.databases as d on (d.name = DB_NAME())
where EventClass >= 92 and EventClass <= 95 and ServerName = @@servername and DatabaseName = db_name() and (d.create_date < EndTime)
order by StartTime desc ;
end else
select -1 as l1, 0 as EventClass, 0 DatabaseName, 0 as Filename, 0 as Duration, 0 as StartTime, 0 as EndTime,0 as ChangeInSize
end try
begin catch
select -100 as l1
, ERROR_NUMBER() as EventClass
, ERROR_SEVERITY() DatabaseName
, ERROR_STATE() as Filename
, ERROR_MESSAGE() as Duration
, 1 as StartTime, 1 as EndTime,1 as ChangeInSize
end catch
',@params=N''
Both queries use the default trace file. Disk Usage report use sys.traces to get the trace file path. I suggest check default trace file in sys.traces is correct. You can modify the query like below and check if the output returns the same result.
SELECT TE.name AS [EventName] ,
T.DatabaseName ,
t.DatabaseID ,
t.NTDomainName ,
t.ApplicationName ,
t.LoginName ,
t.SPID ,
t.Duration ,
t.StartTime ,
t.EndTime
FROM sys.fn_trace_gettable('<default trc file path>', DEFAULT) T
JOIN sys.trace_events TE ON T.EventClass = TE.trace_event_id
WHERE T.EventClass >= 92 and T.EventClass <= 95
Best Regards,
Tracy
Tracy Cai
TechNet Community Support
Similar Messages
-
Unable to install SQL Server 2012 Standard: Error code 0x851A0019
Hi All,
I am trying to install sql server 2012 standard edition on windows server 2008R2 but at the end of the installation it is giving me the following error message:
"The following error has occurred:
Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes."
And in the log file I got the following error message:
Feature: Database Engine Services
Status: Failed: see logs for details
Reason for failure: An error occurred during the setup process of the feature.
Next Step: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Component name: SQL Server Database Engine Services Instance Features
Component error code: 0x851A0019
Error description: Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.
Error help link: http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.2100.60&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4025&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4025
(I have posted part of the log file)
Need your help to resolve this issue.
Thanks,
MKNayeemHi,
Thanks for your reply.
I have already followed that article. I have changed the user to local account user, but it did not work.
Like you said the sql server is installed, but it is not starting the services. Following is the error log file message:
2015-03-16 10:12:15.27 Server Microsoft SQL Server 2012 - 11.0.2100.60 (X64)
Feb 10 2012 19:39:15
Copyright (c) Microsoft Corporation
Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor)
2015-03-16 10:12:15.27 Server (c) Microsoft Corporation.
2015-03-16 10:12:15.27 Server All rights reserved.
2015-03-16 10:12:15.29 Server Server process ID is 5724.
2015-03-16 10:12:15.29 Server System Manufacturer: 'VMware, Inc.', System Model: 'VMware Virtual Platform'.
2015-03-16 10:12:15.29 Server Authentication mode is MIXED.
2015-03-16 10:12:15.29 Server Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL11.BNG1SECISO\MSSQL\Log\ERRORLOG'.
2015-03-16 10:12:15.29 Server The service account is 'NT Service\MSSQL$BNG1SECISO'. This is an informational message; no user action is required.
2015-03-16 10:12:15.29 Server Registry startup parameters:
-d C:\Program Files\Microsoft SQL Server\MSSQL11.BNG1SECISO\MSSQL\DATA\master.mdf
-e C:\Program Files\Microsoft SQL Server\MSSQL11.BNG1SECISO\MSSQL\Log\ERRORLOG
-l C:\Program Files\Microsoft SQL Server\MSSQL11.BNG1SECISO\MSSQL\DATA\mastlog.ldf
2015-03-16 10:12:15.29 Server Command Line Startup Parameters:
-s "BNG1SECISO"
2015-03-16 10:12:15.57 Server SQL Server detected 2 sockets with 1 cores per socket and 1 logical processors per socket, 2 total logical processors; using 2 logical processors based on SQL Server licensing. This is an informational message;
no user action is required.
2015-03-16 10:12:15.57 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2015-03-16 10:12:15.57 Server Detected 16383 MB of RAM. This is an informational message; no user action is required.
2015-03-16 10:12:15.57 Server Using conventional memory in the memory manager.
2015-03-16 10:12:15.67 Server This instance of SQL Server last reported using a process ID of 2452 at 16-03-2015 07:03:13 (local) 16-03-2015 01:33:13 (UTC). This is an informational message only; no user action is required.
2015-03-16 10:12:15.67 Server Node configuration: node 0: CPU mask: 0x0000000000000003:0 Active CPU mask: 0x0000000000000003:0. This message provides a description of the NUMA configuration for this computer. This is an informational
message only. No user action is required.
2015-03-16 10:12:15.69 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required.
2015-03-16 10:12:15.69 Server Software Usage Metrics is disabled.
2015-03-16 10:12:15.70 spid6s Starting up database 'master'.
2015-03-16 10:12:15.78 Server CLR version v4.0.30319 loaded.
2015-03-16 10:12:15.82 Server Common language runtime (CLR) functionality initialized using CLR version v4.0.30319 from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\.
2015-03-16 10:12:17.36 spid6s Error: 824, Severity: 24, State: 2.
2015-03-16 10:12:17.36 spid6s SQL Server detected a logical consistency-based I/O error: incorrect pageid (expected 1:377; actual 261:2228225). It occurred during a read of page (1:377) in database ID 1 at offset 0x000000002f2000 in
file 'C:\Program Files\Microsoft SQL Server\MSSQL11.BNG1SECISO\MSSQL\DATA\master.mdf'. Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe error condition that threatens database integrity and
must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.
Thanks
MKNayeem -
I can't seem to find any clear answers to the implications of installing SQL Server 2012 standard edition vs. enterprise in regards to SharePoint 2013.
I understand that to get many of the features you need Enterprise edition of SQL 2012; but, what I can't figure out is if the backend SharePoint SQL 2012 is standard; but, the PowerPivot/SSRS server is Enterprise will we still get the features?
If we have 3 tier SharePoint farm, one of those tiers is for the SQL Server database backend. If that SQL instance is 2012 standard and we add another server to the farm w/ SQL 2012 Enterprise to handle the tabular models, PowerPivot, and SSRS in integrated
mode will we still get the features?
Or, can we (should we) install Enterprise 2012 as the SharePoint database backend and let that instance triple down as also the PowerPivot and SSRS instance?
The Degenerate DimensionHi MMilligan,
SQL Server 2012 Standard is not supported PowePivot for SharePoint . In addition, SQL Server 2012 Standard is also not support some Reporting Services Features.
For more information, please refer to Features Supported by the Editions of SQL Server 2012:
http://msdn.microsoft.com/en-us/library/cc645993.aspx.
Install SQL Server BI Features with SharePoint 2013 (SQL Server 2012 SP1):
http://msdn.microsoft.com/en-us/library/jj218795.aspx.
If you have any problem, please feel free to let me know.
Thanks.
If you have any feedback on our support, please click
here.
Maggie Luo
TechNet Community Support -
Data Retrieval from SSRS 2008 R2 to SQL Server 2012 standard
Hello,
We have a virtual machine running SSRS 2008 R2 and a physical server running SQL server 2012 standard. We are having an issue with a report that is taking almost 10 minutes for the data to be retrieved from the sql 2012 database. We used the
execution logging query to debug and analyze. We see that it renders and processes very fast, but the data retrieval time is very slow. When the same query is run using sql studio mgr. from the SSRS server it runs just fine...it
takes seconds for the results to come up.
I don't believe there is a compatibilty issue because other reports run fine. We're just having problems with one report.A long shot, but I've seen where the data type of a report parameter is mismatched against the data type of the table it is being compared against. SQL profiler would show this clearly.
This would explain why the query returns quickly in ssms but not with the report. -
Hi
I have recently bought a Virtual Machine from a data center and installed a Windows Server 2012 Standard Edition on it. As I tried to install the SQL Server 2012 Standard Edition, the data center administrator denied me to do this telling me it is not possible
to install any licensed Microsoft software on a Windows installed on virtual machine created by Hyper-V. It was really strange for me! I wanna know if this is true.
Thanks EverybodyHi Farid,
For SQL server running on virtual server please refer to following article :
http://blogs.technet.com/b/peeyusht/archive/2010/03/19/sql-licensing-under-virtualization.aspx
In addition , for license issue we still recommend you to contact MS Activation Center:
http://www.microsoft.com/licensing/existing-customers/activation-centers.aspx
Best Regards,
Elton Ji
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected] . -
Link to download Sql Server 2012 "Standard Edition"
We have purchased Sql Server 2012 “Standard” edition license. Looking for the link to download of installation software for 2012 “Standard” edition. Have tried
a lot but could only found - the “enterprise” evaluation copy.
Looking for urgent help on this. Thanks.Thanks for the update.
1. Would like to check if it is possible to download Sql Server 2012 “Standard" Edition straight away rather than doing a two step install?
2. Assuming we do a two step install - during upgrade once we specify the license key, would it ask whether we need to change edition to standard/ enterprise or it automatically determines the edition based on the value of the license key?
Hi,
1.Do you have MSDN subscription ? You can download from MS link directly if you have one. Please ask the vendor who provided you with License he would be best person to call.
2. On license page you just have to enter license key that's it , after that SQL Server just knows what it has to do. It does not asks you anything about license it just proceeds
Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
My Technet Wiki Article
MVP -
Hi all,
I’m new to this new idea /task/work.
My Idea: To push data to server (Sql Server 2012 Standard or Enterprise Edition).
What I’m having? :
1.A server pc (Windows Server 2012 + Sql Server 2012 Standard or Enterprise Edition installed).
2.Two or three Client pc in number (lets us say Windows Server 2012 + Sql Server 2012 with Express Edition installed).
3.These 3 machines (1 server + 2 client pc) are in communication with one and another(LAN).
4.Assume that, I'm having one database let us say “Company_DB” with single table “Tbl_Employee”(as of now) in server and similarly in both reaming client PC too.
i.e.
Server is having Company_DB (Database), is having table Tbl_Employee
Client A is having Company_DB (Database) , is having table
Tbl_Employee
Client B is having Company_DB (Database) , is having table
Tbl_Employee
What I did ?:
Step 1: Suppose that, today I entered/created 10 employee details in Client A (say 1 to 10).
Step 2: On the next day, I created some more employees (say 5 employees i.e 1 to 5)
in Client B.
What I need?
I need to push/send/store these records (i.e. total 15 employees details) should be present in my SERVER PC.
I googled for the same, found some suggestions like SSIS or
Import/Export wizard etc…
How can I achieve this?, and this should happen for some regular intervals like 3/5 hours without any duplicate data.sounds like Merge replication to me
http://www.databasejournal.com/features/mssql/article.php/1438231/Setting-Up-Merge-Replication-A-Step-by-step-Guide.htm
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
SQL Server 2012 Standard Support for Lync 2013
Hi,
Does SQL 2012 Standard version support Lycn 2013 , I am planning to have following features.
1- SQL 2012 Mirroring
2- Monitoring Role on FE Servers
Regards
Usman Ghani
Usman Ghani - MCITP Exchange 2010Agree with Anthony, SQL 2012 Standard support Lync 2013.
For Standard or Edition Edition of SQL that according to High availability node of Database that you want.
Two-node failover clustering for the following:
Microsoft SQL Server 2012 Standard (64-bit edition). Additionally running the latest service pack is recommended.
Microsoft SQL Server 2008 R2 Standard (64-bit edition). Additionally running the latest service pack is recommended.
Up to sixteen-node failover clustering for the following:
Microsoft SQL Server 2012 Enterprise (64-bit edition). Additionally running the latest service pack is recommended.
Microsoft SQL Server 2008 R2 Enterprise database software (64-bit edition). Additionally running the latest service pack is recommended.
Also for more detail details, you can refer below link
http://technet.microsoft.com/en-us/library/gg412952.aspx
Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question, please click "Mark As Answer"
Mai Ali | My blog: Technical | Twitter:
Mai Ali -
Where can i download SQL Server 2012 Standard Edition?
Hello everyone!
I have bought 2 open licenses for SQL Server 2012 Standard Edition for my application.
I want to download from microsoft site the SQL Server 2012 Standard Edition software in order to install it to my servers but as i searched in microsoft's site, i can't find
Stanard edition for downloading. I only find Express and Evaluation.
Can you please help me?
- Thanks -Hello,
Please try to download the Evaluation Edition from the following link and provide the Standard Edition key on the Product
Key page of SQL Server setup.
http://www.microsoft.com/en-us/download/details.aspx?id=29066
Hope this helps.
Regards,
Alberto Morillo
SQLCoffee.com -
SQL Server 2012 Standard and hyperthreading core count
I have 2 Intel E5-2640 v2 processors for my SQL Server 2012 Standard server. Each processor has 8 cores and has hyper threading so it has 16 logical cores. Will SQL standard be able to use hyper threading? Since it has a 16 core limit, does it see hyper
threading as an extra core or will it only look at the 8 cores each processor has?Ignoring licencing, Standard version can only use up to 16 cores. In my case I have 16 cores but 32 logical cores. Will the Standard edition only use the first 16 logical processors or will it use all logical cores since I have 16 physical cores
that just happens to have hyper threading?
As per my understanding whatever is less than 16, Physical core or logical core will use that .But I am not sure best answer would be from Microsoft.
Reading there below statement .
'When hyper-threading is enabled, the Basic Input Output System (BIOS) uses a logical to physical CPU ratio. Current implementations are using 2:1 ratios. This means that there are two (2) logical CPUs for each physical CPU. These ratios may change in the
future; however, Microsoft SQL Server 2000 Service Pack 3 (SP3) and later versions have additional licensing code that adjusts the licensing restrictions to handle the ratio. For example,
if the SQL Server product code that you have installed permits a 4 CPU license at a 2:1 ratio, the SQL Server 2000 SP3 build and later builds adjust and let you use 8 CPUs.
So it says if you have license for 4 CPU but if it is hyperthreaded it can use 8.But again if number goes over 16 for standard edition I guess it would not use above 16.So in your case Enabling hyperthreading would have no use.
NOTE: This is complex discussion and correct answer would be what Microsoft says :)
PS: Please read link I have posted it is applicable to 2012 as well
Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers -
SQL Server 2012 Standard compatibility with Windows Server 2012 R2 Standard
Hi,
Is SQL Server 2012 Standard compatibility with Windows Server 2012 R2 Standard.
In volume licensing portal Windows Server 2012 R2 Standard is not provided in the list of OS supported for SQL server 2012.Hi Ajit,
Besides other post, please also note that
Service Pack 1 or
a later update is needed for the support of SQL 2012 on Windows Server 2012 R2.
For more details about how to use SQL Server in Windows Server 2012 R2, please review the following KB article.
http://support.microsoft.com/en-us/kb/2681562
Thanks,
Lydia Zhang
Lydia Zhang
TechNet Community Support -
Is Cross Subnet Failover supported in SQL Server 2012 Standard edition?
Hi,
I'm trying to find out if Cross Subnet Failover is support in SQL Server 2012 Standard edition? From the documentation I can find it appears that AlwaysOn Failover Cluster Instances is supported for two nodes but there is no definitive answer regarding Cross
Subnet failover. Just trying to figure out if it is possible or if I need enterprise or move my replication nodes on the same subnet.
Thanks DavidSorry chaps, found the answer :-(
Licensing SQL Server for High Availability
SQL Server software can be configured so that if one server fails, its processing will be picked up, recovered
and continued by another server. All editions of SQL Server 2012 provide basic high availability features
including backup log shipping, database mirroring and two-node failover clustering. Advanced (AlwaysOn)
high availability features in SQL Server 2012 Enterprise Edition include enhanced support for multiple, active
(readable) secondary servers and support for multi-site failover clustering. -
How to provide the license key after having evaluation copy expired for SQL Server 2012 Standard?
I couldn’t figure out how to provide the license key after having
evaluation copy expired for SQL Server 2012 Standard
Thank you
Best
JamalThe following blog is on the topic: Upgrading from SQL Server 2012 Evaluation Edition
Kalman Toth Database & OLAP Architect
Free T-SQL Scripts
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012 -
What licenses and how many should be taken for SQL Server 2012 Standard Edition
Hi,
Could you help me please with my problem: what licenses (per core or Server + CAL) should I take for SQL Server 2012 Standard Edition for the following environment:
SQl Server will be installed on VM with 1 core.
Physical processor is Intel Xeon CPU E7-4830, 2.13 GHz, 2131 Mhz.
Few people will have an access to the VM but SQL server is used for a web-application for about 200 users from Active Directory.
Great thanks in advance,
LenaHello,
Since the question is a license issue, you can call 1-800-426-9400, Monday through Friday, 6:00 A.M. to 6:00 P.M. (Pacific Time) to speak directly
to a Microsoft licensing specialist. You can also visit the following site for more information and support on licensing issues:
http://www.microsoft.com/licensing/mla/default.aspx
Hope this helps.
Regards,
Alberto Morillo
SQLCoffee.com -
Hi,
I've a VMware VM with 6 processors and it's installed with SQL Server 2012 Standard. As standard version only uses up to 4 cpu. Does that mean the remaining 2 cpu are useless ? Or are they dedicated to the OS ?
Please advise. TIA !Hi,
I've a VMware VM with 6 processors and it's installed with SQL Server 2012 Standard. As standard version only uses up to 4 cpu. Does that mean the remaining 2 cpu are useless ? Or are they dedicated to the OS ?
Please advise. TIA !
Hi,
Standard edition can use upto lesser of 4 Sockets or 16 cores. Which ever is less. VM wares would have logical CPU so I guess it can use upto 16.
Please read below to get this clarified
https://msdn.microsoft.com/en-us/library/ms143760(v=sql.110).aspx
Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
My Technet Wiki Article
MVP
Maybe you are looking for
-
Creating new instruments from soundfonts:
Hi all, I'm still pretty much a newbie with GarageBand and have been working with it recently by using midi files imported into the program and selecting different instruments to get a more pleasing arrangement, with the aim of making my own custom b
-
After multi-mailbox search deleted the results are not cleared out of discovery mailbox?
So my legal team has finally given me the OK to remove the results of a multi-mailbox search that the results of were sent to a discovery mailbox. I've deleted the search, OK'd the warning indicating that the results of the search would be deleted
-
BB keeps restarting on its own
Hi.. I brought blackberry torch last year in Nov and is still in warranty period. Few days back, my bb started rebooting on its own. The reboot would start, halt in between and again restart. This means that fone is unable to restart completely. I tr
-
IPhoto won't start (Missed theme font)
This is my first Apple experience at all and I'm enjoying it, but I have encountered a problem. iphoto won't start, it just says: "The font required to run this application is missing" I'm in Mavericks 10.9.3, fresh installation with few programs, I
-
Software to turn iMovie HD on and off "remotely".
Is anyone aware of any software or an Applescript that will start and stop iMovie HD at given times like programming a VCR? I have a program called PopTart that will do this using Toast 6 and only Toast 6 (the author told me he has no plans to update