Microsoft SQL Server日志文件 [英] Microsoft SQL Server Log File

查看:160
本文介绍了Microsoft SQL Server日志文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个数据库,放入一些数据,在我的vb.net项目中建立虚拟/测试连接

我的数据库有9个表1用于用户,其他表可以有数百万个数据。当我尝试查看数据库SQL(脚本数据库为 - >创建到 - >新查询编辑器窗口)时,我发现这个



I created a database, putting some data, making dummy/testing connections in my vb.net projects
My database has 9 tables 1 is for users and the other tables can have millions of data. When I try to view the Database SQL(Script Database as -> Create To -> New Query Editor Window) I found this

USE [master]
GO

/****** Object:  Database [QAS]    Script Date: 05/03/2013 19:03:21 ******/
CREATE DATABASE [QAS] ON  PRIMARY 
( NAME = N'QAS', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\DATA\QAS.mdf' , SIZE = 229376KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
 LOG ON 
( NAME = N'QAS_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\DATA\QAS_log.ldf' , SIZE = 916352KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
GO





我关心的是日志大于数据库,MAXSIZE是2048GB。

可以更改MAXSIZE吗?



仍然希望有人发布建议...



My concern is the log is greater than the database, well the MAXSIZE is 2048GB.
Is it OK to change the MAXSIZE?

Still hoping somebody to post suggestions...

推荐答案

日志文件很可能大于数据库 - 它实际上取决于事务的数量而不是记录的数量。改变MAXSIZE是可以的,但是你需要确定你想要(当事务日志填满时你可以得到各种各样的问题),你应该考虑积极管理日志。

阅读事务日志(SQL Server) [ ^ ]特别是有关管理日志大小的部分。



我也觉得这个网站有用管理交易日志 [ ^ ]
It''s quite possible that the log file can be greater than the database - it really depends on the number of transactions rather than the number of records. It''s ok to change MAXSIZE but you need to be really sure that you want to (you can get all sorts of issues when the transaction log fills up) and you should consider actively managing the log.
Have a read through the documentation at The Transaction Log (SQL Server)[^] in particular the section on managing the size of the log.

I also find this website helpful Managing Transaction Logs[^]


这篇关于Microsoft SQL Server日志文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆