sp_notify_operator:指定的@operator_name不存在(但它确实存在!)
好吧,所以我想我要疯了!这就是我所在的地方。
SQL Server 2008:我已经设置了数据库邮件,并且给自己发送了一封测试电子邮件。简单,效果很好。
我创建了一个名为“Tom”的操作员。我已经给了它一个电子邮件地址(但没有其他任何信息)。
但是,当我运行此命令时:
执行 msdb.dbo.sp_notify_operator @name=N'Tom',@subject=N'测试数据库消息',@body=N'Testy Test Test'
...我得到这个:
消息 14262,级别 16,状态 1,过程 sp_verify_operator_identifiers,第 51 行 指定的@operator_name('Tom')不存在。
该错误消息是否掩盖了我应该查看的其他内容? SSMS 中肯定会显示一个运算符,但如果有一个列出运算符的存储过程,我会很乐意运行它以查看它是否确实存在。
我只是有点不知道下一步该去哪里。 SQL Server 似乎确信我不存在!
OK, so I think I'm going mad here! Here's where I am.
SQL Server 2008: I've set up Database Mail, and I've sent myself a test email. Simple, works fine.
I've created an operator, called 'Tom'. I've given it an email address (but nothing else).
However, when I run this command:
EXECUTE msdb.dbo.sp_notify_operator @name=N'Tom',@subject=N'Test Database Message',@body=N'Testy Test Test'
...I get this:
Msg 14262, Level 16, State 1, Procedure sp_verify_operator_identifiers, Line 51
The specified @operator_name ('Tom') does not exist.
Is that error message masking something else which I should be looking at? There's definately an operator shown in SSMS, but if there's a sproc which lists operators I'll happily run that to see if it's actually there.
I'm just kinda stuck as to where to go next. SQL Server seems convinced I don't exist!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
忽略这个!有一种可能是我试图在连接到错误的服务器时执行 sp_notify_operator...没有任何运算符的服务器...
抱歉!
Ignore this! There's a possibility that I was trying to execute sp_notify_operator whilst connected to the wrong server...the one without any operators....
Apologies!