如何查看数据文件或者Log文件是否增长过?

在论坛看到一个帖子,说数据库变慢了一段时间,发现这段时间数据库文件的最后修改时间跟变慢的世界一致,想知道这段时间是否文件确实增长了。

 

其实SQL Server提供了数据增长的Event,而且Default Trace里面就记录了。

 

下面我们做个测试,我创建了一个新的数据库,创建表然后插入数据:

 

create table test(test varchar(100))

go

insert into test values (replicate('a',100))

go 100000

 

现在查询Default Trace:

declare @TraceFile as varchar(max)

select @TraceFile =  path from sys.traces

 

select DatabaseName,FileName,StartTime

 from ::fn_trace_gettable(@TraceFile,default)--替换你自己的Trace文件地址

where EventClass = 92 or EventClass = 93 and StartTime > '2013-06-2813:09:49.767'

 

关于Event 92和93的解释:

 

select * from sys.trace_events where trace_event_id = 92  or trace_event_id = 93

 

结果如下:

 

可以看到数据库增长的记录。

转载于:https://www.cnblogs.com/snake-hand/p/3161406.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/274174.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

软件项目开发 学校自行开发_自行开发游戏

软件项目开发 学校自行开发Making a game is not easy. Quite the contrary; it’s an incredibly difficult and daunting task. Game development typically takes teams of people, thousands of hours worth of labor, and hundreds of thousands — if not millions — of…

jquery Fancybox使用教程

jquery Fancybox使用教程 Fancybox是一款基于jquery的对图片展示播放的插件,当然,它html文本、flash动画、iframe以及ajax也予以支持。还可以通过css自定义外观,阴影效果超级赞! 演示效果:http://www.phpddt.com/demo/…

优衣库不雅_Uniqlo主页-用户体验案例研究

优衣库不雅I am a big fan of Uniqlo because they sell innovative clothing that is great quality at great prices. So when all their stores closed during the “Covid-19 Circuit Breaker” in Singapore, I turned to their website and was surprised how difficult …

PHP生成缩略图函数

function img_create_small($big_img, $width, $height, $small_img) { // 大图文件地址,缩略宽,缩略高,小图地址$imgage getimagesize($big_img); //获取大图信息switch ($imgage[2]) { // 判断图像类型case 1:$im imagecreatefromgif($bi…

shields 徽标_到处都有平面徽标

shields 徽标重点 (Top highlight)Companies invest a lot of time, money and energy trying to make audiences remember their logos and associate higher value with it. The end goal is to make customers pick their brand over another brand. 公司投入了大量的时间&a…

jquery锚点连接划动滚动条,再也不用a标签name 了

$("html,body").animate({ scrollTop: $(".reviews_list").children("ul").children("li").children("b:last").offset().top }, 1000); 转载于:https://www.cnblogs.com/gxmaspx/p/3169931.html

登录,注册,登录,登录..?

Last year I found myself in an interesting conversation about which copy to use for a website’s sign up journey. And it wasn’t the first time. Often this devolves into an opinion-based discussion among stakeholders of the ‘what-I-like-based-on-no-eviden…

未完成的控件

using System; using System.ComponentModel; using System.Drawing; using System.Drawing.Drawing2D; using System.Windows.Forms;namespace ImageControls {/// <summary>/// 控件/// </summary> public class ShapeEx : Control{#region 字段private Color _B…

ux设计_UX设计101:

ux设计这是什么&#xff1f; (What is this?) This session is part of a learning curriculum that I designed to incrementally skill up and empower a team of Designers and Researchers whose skillset and ways of working needed to evolve to keep up with changes …

ASP.NET 文件上传于下载

本文主要介绍一下&#xff0c;在APS.NET中文件的简单上传于下载&#xff0c;上传是将文件上传到服务器的指定目录下&#xff0c;下载是从存入数据库中的路径&#xff0c;从服务器上下载。 1.上传文件 (1)页面代码 <table align"center" cellpadding"0" …

idea重要插件代码颜色_颜色在您的网站上的重要性和品牌形象

idea重要插件代码颜色Choosing the right colors for a website or a logo can be a perplexing and time-consuming task, unless you have the right knowledge of colors. Colors play a pivotal role in the success of some businesses and can make a huge impact on the…

【自己给自己题目做】之一:椭圆可点击区域

【题一】请实现以下需求&#xff0c;要做一个活动页面&#xff0c;页面上有一张图片&#xff08;假设是800x600&#xff09;&#xff0c;图片正中心有一个椭圆形的可点击区域&#xff0c;假设椭圆长轴为200px&#xff08;横向&#xff09;&#xff0c;短轴160px&#xff08;纵向…

软件设计师中级 百度知道_设计师应该知道什么

软件设计师中级 百度知道… and no, it doesn’t have to be how to code.……而且&#xff0c;不必一定要编码。 Here are a few points that have helped me assess what technical knowledge is necessary for designers to be successful.以下几点帮助我评估了设计师成功所…

看看清华的同学在四年的大学中干什么吧,非常值得学习

&#xff08;一&#xff09; 永远不要说你已经尽力了 我在高中时体育特别差&#xff0c;跑1000米都很要命&#xff0c;从来都是不及格。到了清华之后&#xff0c;第一节体育课&#xff0c;老师告诉我们每年要测3000米长跑&#xff0c;跑不过不许毕业&#xff0c;取消推研资格。…

信息保真度准则_设计保真度的新的非科学公式

信息保真度准则As designers, our audience is more than just our users. We keep our user’s needs top of mind while designing for their jobs-to-be-done, but sometimes we need to illustrate the problem and articulate solutions to a broader audience: our cross…

zend studio配置调试(Xdebug方式)

1.下载xdebug http://xdebug.org/download.php 我下的是PHP 5.4 VC9 (32 bit) 【当前系统php是php5.4.14(win32)版本】 2.配置php.ini 在文件最后配置 [Xdebug]zend_extension "C:/php5.4.14/ext/php_xdebug-2.2.3-5.4-vc9.dll" xdebug.auto_trace1xdebug.collect_p…

人物肖像速写_肖像学的基础

人物肖像速写More in the iconography series:• 7 Principles of Icon Design• 5 Ways to Create a Settings Icon• Icon Grids & Keylines Demystified• Pixel-Snapping in Icon Design• 3 Classic Icon FamiliesAn icon is a compact symbol that represents a disc…

python处理网络文字流,设置为utf8编码

import sysreload(sys)sys.setdefaultencoding(utf8)在python编程时&#xff0c;如果数据来自客户端传过来&#xff0c;在使用"%s" % str和json.loads(str)时&#xff0c;会遇到问题。问题的原因是字符集和编码的问题。以上代码可以解决这个问题。 转载于:https://ww…

产品设计的Kawaiization

重点 (Top highlight)在过去的一两年中&#xff0c;我注意到品牌和产品设计中出现了某种风格。 (Over the last year or two, I’ve noticed a certain style emerge in brand and product design.) (this article originally appeared on DESK magazine)(本文最初出现在DESK杂…

写了两个简单的小工具,文件夹文件操作的

一&#xff0c;文件夹A下的文件夹下的文件&#xff0c;移到文件夹A下。 二&#xff0c;经常上贴吧什么的&#xff0c;有些图贴&#xff0c;会直接网页全部保存为&#xff0c;结果是一个html文件&#xff0c;和引用资源的文件夹&#xff0c;文件夹下有很多无用的文件&#xff0c…