4个事务日志问题 [英] 4 Transaction Log questions

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

问题描述

1)可以在以下位置找到交易记录的位置:< Hard

磁盘> \Program Files \ Microsoft SQL Server \ MSSQL \ Data \ MyDb_Log.ldf?


2)删除它是否安全,因为SQL会创建一个新的事务日志

是否已经存在?


3)尝试时2)我收到文件正在使用的错误消息,即使

SQL Server已关闭。有什么建议吗?


4)任何人都可以点亮错误信息''写在......<我的路径

这里> ...失败,status = 112. BACKUP LOG异常终止''?当我尝试手动备份事务日志''所有任务 - 备份'时,我得到了



感谢您对我的无知的回复。

解决方案

见内联:

" TZoner" < TZ **** @ hotmail.com>在留言中写道

news:3e *********************** @ news.optusnet.com.a u ... < blockquote class =post_quotes> 1)可以在以下位置找到交易日志的位置:< Hard
Disk> \Program Files \ Microsoft SQL Server \ MSSQL \ Data \ MyDb_Log.ldf?
我不确定你在问什么,但sp_helpfile会给出与当前数据库关联的文件的名称和

位置。
2)删除它是否安全,因为SQL会在
时创建一个新的事务日志,它是否已经存在?
我不建议删除任何日志文件。如果SQLServer正在运行,那么你就不会因为文件被锁定而无法获得
。如果您已分离数据库

或SQL Server未运行,则可能在重新附加

数据库或在SQL Server运行时连接到该数据库时出现问题。 3)尝试时2)我收到文件正在使用的错误消息,即使是SQL Server关闭也是
。有什么建议?
我怀疑你是否已经停止了这项服务,但无论如何你不应该将它删除。

如果你想做的就是移动文件然后查看
http:/ /support.microsoft.com/default...b;EN-US;224071

如果你想缩小它,请查看
http://msdn.microsoft.com /library/de...us/architec/8_

ar_da2_1uzr.asp

4)任何人都可以点亮错误信息''写上。 ..< my path
here> ...失败,状态= 112. BACKUP LOG异常终止''? I
在尝试手动备份事务日志时得到这个''所有任务 -
备份''

我不知道这个错误是什么,猜测那里缺少磁盘空间。

也许SQL Server日志文件或Event

日志中有更多信息。如果备份到映射的网络驱动器,也会出现错误。


John

感谢您对我的无知的回复。


John,感谢宝贵的信息。


''交易日志'位于何处?我无法找到答案sp_helpfile

或在Google上进行无限搜索后。


SQL Server中每个数据库是否存在事务日志?当发生备份时,

这些事务日志会缩小吗?




" John Bell" ; < JB ************ @ hotmail.com>在留言中写道

news:3e *********************** @ reading.news.pipex。 net ...

见内联:
TZoner < TZ **** @ hotmail.com>在消息中写道
新闻:3e *********************** @ news.optusnet.com.a u ...

1)可以在以下位置找到交易日志的位置:< Hard
Disk> \Program Files \ Microsoft SQL Server \ MSSQL \ Data \ MyDb_Log.ldf?我不确定你在问什么,但是sp_helpfile会给出与当前数据库关联的文件的名称和位置。


2)删除它是否安全,因为SQL会创建一个新的事务日志



当它

实现不存在时?我不建议删除任何日志文件。如果SQLServer正在运行,那么



你将无法锁定文件。如果您已分离数据库
或SQL Server未运行,则可能在重新附加数据库或在SQL Server运行时连接到数据库时出现问题。


3)尝试时2)我收到文件正在使用的错误消息,即使

SQL Server已关闭。有什么建议吗?


我怀疑你是否已停止服务,但无论如何你不应该删除它。
如果你想做的就是移动文件然后查看
http:// support.microsoft.com/default...b;EN-US;224071

如果你想缩小它,请查看


http://msdn.microsoft.com/ library / de ... us / architec / 8_ ar_da2_1uzr.asp


4)任何人都可以点亮错误信息''写上.. 。< my path
here> ...失败,状态= 112. BACKUP LOG异常终止''?我


获取

当尝试手动备份事务日志时''所有任务 -


备份''
我不知道我不知道这个错误是什么,猜测是否存在磁盘空间不足。
可能SQL Server日志文件或Event
日志中有更多信息。如果备份到映射的网络驱动器,也会出现错误。

John



感谢您对我的无知的任何回复。




您的转换日志保存在ldf文件中,sp_help会给出例如

对于Northwind你会得到类似的东西:


名称FileId文件名文件组大小Maxsize增长使用

Northwind 1 E:\ MSSQL \DATA \ northwnd。 mdf PRIMARY 3008 KB

无限制10%数据

Northwind_log 2 E:\ MSSQL \DATA \ northwnd.ldf NULL 1024 KB无限

10%仅记录


Northwind_log是事务日志文件的内部逻辑名称

位于E:\ MSSQL \DATA \ northwnd .LDF。仅日志用法显示它是一个日志

文件。


备份时日志文件不会自动收缩,请参阅我发布的链接

在上一篇回复中关于如何缩小它。


John


" TZoner" < TZ **** @ hotmail.com>在留言中写道

news:3e *********************** @ news.optusnet.com.a u ... < blockquote class =post_quotes> John,感谢您提供有价值的信息。

交易记录位于何处?我找不到答案
sp_helpfile或谷歌无休止搜索后。

SQL Server中每个数据库是否存在事务日志?当发生备份
时,这些事务日志会缩小吗?



John Bell < JB ************ @ hotmail.com>在消息中写道
新闻:3e *********************** @ reading.news.pipex。 net ...

见内联:
TZoner < TZ **** @ hotmail.com>在消息中写道
新闻:3e *********************** @ news.optusnet.com.a u ...

1)可以在以下位置找到交易日志的位置:< Hard
Disk> \Program Files \ Microsoft SQL Server \ MSSQL \ Data \ MyDb_Log.ldf?


我不确定你在问什么,但是sp_helpfile会给出名字
和与当前数据库关联的文件的位置。


2删除它是否安全,因为当

>是否已经存在时,SQL会创建一个新的事务日志?


我不会建议删除任何日志文件。如果SQLServer正在运行,那么


将无法锁定文件。如果您已经分析了



数据库或SQL Server未运行,则在重新附加数据库或连接到SQL Server后,可能会出现问题。运行。


3)当试图做2)我得到文件正在使用的错误信息,甚至


虽然

SQL Server已关闭。有什么建议吗?


我怀疑你是否已停止服务,但无论如何你不应该删除它。
如果您只想移动文件然后查看
http:// support.microsoft.com/default...b;EN-US;224071

如果你想缩小它,请查看


< a rel =nofollowhref =http://msdn.microsoft.com/library/default.asp?url=/library/en-us/architec/8_target =_ blank> http:// msdn。 microsoft.com/library/de...us/architec/8_

ar_da2_1uzr.asp


4)任何人都可以点亮错误信息''写在...<我的路径
这里> ...失败,状态= 112. BACKUP LOG异常终止''?


我在尝试手动备份Transac时得到

记录''所有任务 -


备份''
我不知道这个错误是什么,猜测是否缺少磁盘
空间。也许SQL Server日志文件或
事件日志中有更多信息。如果备份到映射的网络驱动器,也会出现错误。

John



感谢您对我的无知的任何回复。





1) Can one find the location of the ''Transaction Log'' at: <Hard
Disk>\Program Files\Microsoft SQL Server\MSSQL\Data\MyDb_Log.ldf?

2) Is it safe to delete it, as SQL will create a new Transaction Log when it
realises none already exist?

3) When trying to do 2) I get error message that file is in use, even though
SQL Server is closed. Any suggestions?

4) Can anyone shed light on the error message ''Write on ... <my path
here>... failed, status = 112. BACKUP LOG is terminating abnormally''? I get
this when trying to manually backup the Transaction Log ''All Tasks - Backup''
Thanks for any replies to my ignorance.

解决方案

See inline:
"TZoner" <tz****@hotmail.com> wrote in message
news:3e***********************@news.optusnet.com.a u...

1) Can one find the location of the ''Transaction Log'' at: <Hard
Disk>\Program Files\Microsoft SQL Server\MSSQL\Data\MyDb_Log.ldf? I am not sure what you are asking but sp_helpfile will give the names and
locations of the files associated with a current database.
2) Is it safe to delete it, as SQL will create a new Transaction Log when it realises none already exist? I would not recommend deleting any logfile. If SQLServer is running then you
won''t be able to as the file is locked. If you have detatched the database
or SQL Server is not running, you may have problems re-attaching the
database or connecting to it once SQL Server is running.

3) When trying to do 2) I get error message that file is in use, even though SQL Server is closed. Any suggestions? I doubt if you have stopped the service, but in any case you should not be
deleting it.
If all you want to do is move the file then check out
http://support.microsoft.com/default...b;EN-US;224071

If you want to shrink it check out
http://msdn.microsoft.com/library/de...us/architec/8_
ar_da2_1uzr.asp

4) Can anyone shed light on the error message ''Write on ... <my path
here>... failed, status = 112. BACKUP LOG is terminating abnormally''? I get this when trying to manually backup the Transaction Log ''All Tasks - Backup''
I don''t know what this error is, at a guess there is a lack of disk space.
Maybe there is more information in the SQL Server log file or in the Event
log. You will also get errors if you backup to a mapped network drive.

John

Thanks for any replies to my ignorance.



John, thanks for the valuable information.

Where is the ''Transaction Log'' located? I can''t find the answer sp_helpfile
or after endless searches on google.

Does a Transaction Log exist per database in SQL Server? When backup occurs,
does these Transaction Log shrink?





"John Bell" <jb************@hotmail.com> wrote in message
news:3e***********************@reading.news.pipex. net...

See inline:
"TZoner" <tz****@hotmail.com> wrote in message
news:3e***********************@news.optusnet.com.a u...

1) Can one find the location of the ''Transaction Log'' at: <Hard
Disk>\Program Files\Microsoft SQL Server\MSSQL\Data\MyDb_Log.ldf? I am not sure what you are asking but sp_helpfile will give the names and
locations of the files associated with a current database.


2) Is it safe to delete it, as SQL will create a new Transaction Log


when it

realises none already exist? I would not recommend deleting any logfile. If SQLServer is running then


you won''t be able to as the file is locked. If you have detatched the database
or SQL Server is not running, you may have problems re-attaching the
database or connecting to it once SQL Server is running.


3) When trying to do 2) I get error message that file is in use, even though

SQL Server is closed. Any suggestions?


I doubt if you have stopped the service, but in any case you should not be
deleting it.
If all you want to do is move the file then check out
http://support.microsoft.com/default...b;EN-US;224071

If you want to shrink it check out


http://msdn.microsoft.com/library/de...us/architec/8_ ar_da2_1uzr.asp


4) Can anyone shed light on the error message ''Write on ... <my path
here>... failed, status = 112. BACKUP LOG is terminating abnormally''? I


get

this when trying to manually backup the Transaction Log ''All Tasks -


Backup''
I don''t know what this error is, at a guess there is a lack of disk space.
Maybe there is more information in the SQL Server log file or in the Event
log. You will also get errors if you backup to a mapped network drive.

John



Thanks for any replies to my ignorance.




Your transction logs are held in the ldf file which sp_help would give e.g
for Northwind you would get something like:

Name FileId filename filegroup Size Maxsize Growth Usage
Northwind 1 E:\MSSQL\DATA\northwnd.mdf PRIMARY 3008 KB
Unlimited 10% data only
Northwind_log 2 E:\MSSQL\DATA\northwnd.ldf NULL 1024 KB Unlimited
10% log only

Northwind_log is the internal logical name for the Transaction Log file
located at E:\MSSQL\DATA\northwnd.ldf. The log only usage shows it is a log
file.

The log file will not automatically shrink on backup, see the link I posted
in the last reply regarding how to shrink it.

John

"TZoner" <tz****@hotmail.com> wrote in message
news:3e***********************@news.optusnet.com.a u...

John, thanks for the valuable information.

Where is the ''Transaction Log'' located? I can''t find the answer sp_helpfile or after endless searches on google.

Does a Transaction Log exist per database in SQL Server? When backup occurs, does these Transaction Log shrink?





"John Bell" <jb************@hotmail.com> wrote in message
news:3e***********************@reading.news.pipex. net...

See inline:
"TZoner" <tz****@hotmail.com> wrote in message
news:3e***********************@news.optusnet.com.a u...

1) Can one find the location of the ''Transaction Log'' at: <Hard
Disk>\Program Files\Microsoft SQL Server\MSSQL\Data\MyDb_Log.ldf?


I am not sure what you are asking but sp_helpfile will give the names and locations of the files associated with a current database.


2) Is it safe to delete it, as SQL will create a new Transaction Log when

it

realises none already exist?


I would not recommend deleting any logfile. If SQLServer is running then


you

won''t be able to as the file is locked. If you have detatched the


database or SQL Server is not running, you may have problems re-attaching the
database or connecting to it once SQL Server is running.


3) When trying to do 2) I get error message that file is in use, even


though

SQL Server is closed. Any suggestions?


I doubt if you have stopped the service, but in any case you should not be deleting it.
If all you want to do is move the file then check out
http://support.microsoft.com/default...b;EN-US;224071

If you want to shrink it check out


http://msdn.microsoft.com/library/de...us/architec/8_

ar_da2_1uzr.asp


4) Can anyone shed light on the error message ''Write on ... <my path
here>... failed, status = 112. BACKUP LOG is terminating abnormally''?

I get

this when trying to manually backup the Transaction Log ''All Tasks -


Backup''
I don''t know what this error is, at a guess there is a lack of disk space. Maybe there is more information in the SQL Server log file or in the Event log. You will also get errors if you backup to a mapped network drive.

John



Thanks for any replies to my ignorance.





这篇关于4个事务日志问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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