SQL Server 2005 和 SQL Server 2005 Windows 事件日志

发布于 2024-07-30 06:55:17 字数 472 浏览 2 评论 0原文

我正在运行 SQL Server 2005 Standard。 我收到了几个需要做出反应的警报。 因此,我创建了这些警报,但它们从未出现,因此依赖于它们的作业永远不会运行。

我发现对于警报,SQL Server 必须写入 Windows 事件日志,但这根本没有发生。 每个消息来源都告诉我,通常 SQL Server 会自动记录日志,所以我不知道为什么我的实例不会自动记录日志。 有谁知道用于(取消)激活 Windows 事件日志记录的选项?

更新:

我发现我的描述缺少一些基本信息,所以我将在此处添加它。

我有一个与见证人的镜像场景。 我正在寻找的是 ID 为 1440 和 1441 的事件,这些事件表明一台服务器将其角色 vom 主体更改为镜像。 这些应该自动写入 Windows 事件日志,但这种情况并没有发生。 总之,事件日志中写入的不仅仅是一条来自 SQL Server 的消息。

I'm running a SQL Server 2005 Standard. I got several alerts I need to react on. So I created these alerts, but they never appear so that the jobs depending on them are never run.

I found out that for alerts it is necessary that the SQL Server writes to the Windows Event Log, but this is not happening at all. Every source tells me that normally SQL Server is logging automatically, so I've got no clue why my instance does not. Does anyone know an option for (de-)activating the logging to Windows Event Log?

UPDATE:

I see my description is missing some basic information, so I will add this here.

I've got a Mirroring scenario with a Witness. What I'm looking for are the events with IDs 1440 and 1441 which indicate that one server changed it's role vom Principal to Mirror. These should automatically been written to the Windows Event Log, but that does not happen. At all, not only one single message from SQL Server is written to the Event Log.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

傲性难收 2024-08-06 06:55:17

我终于找到了答案。 有一个启动参数用于告诉 SQL Server 它不应将任何内容记录到 Windows 事件日志中:-n

要设置它,您必须打开 SQL Server 配置管理器,打开 SQL Server 实例的属性并转到高级。 在那里您将找到一个名为“启动参数”的字段。 这里只需输入(或者在我的情况下删除)参数-n,您的 SQL Server 将停止写入 Windows 事件日志。

I finally found the answer. There is a startup parameter for telling the SQL Server that it should not log anything to the Windows Event Log: -n.

To set it you got to open SQL Server Configuration Manager, open the Properties of your SQL Server instance and go to Advanced. There you'll find a field named Startup Parameters. Here just enter (or in my case remove) the parameter -n and your SQL Server will stop writing to the Windows Event Log.

最好是你 2024-08-06 06:55:17

sp_altermessage 更改系统消息,以便它们已记录(取决于版本/SP)

sp_addmessage对于用户定义的警报

RAISERROR..WITH LOG 在您的代码中(须经许可)

否则,您正在寻找什么警报?

sp_altermessage to change system messages so they are logged (version/SP dependant)

sp_addmessage for user defined alerts

RAISERROR.. WITH LOG in your code (subject to permission)

Otherwise, what alerts are you looking for?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文