我们正在运行 SQL Server 2014。我们希望使用 gMSA 作为 xp_cmdshell 的代理帐户。
我尝试运行以下命令:
EXEC sys.sp_xp_cmdshell_proxy_account 'gmsaNameGoesHere$', ''
Run Code Online (Sandbox Code Playgroud)
但是,它需要密码。
我尝试运行以下命令:
CREATE CREDENTIAL ##xp_cmdshell_proxy_account## WITH IDENTITY = 'gmsaNameGoesHere$'
Run Code Online (Sandbox Code Playgroud)
它运行了!但是,当用户尝试通过代理帐户运行 xp_cmdshell 时,他们会被告知:
消息 15153,级别 16,状态 1,过程 xp_cmdshell,第 3 行 xp_cmdshell 代理帐户信息无法检索或无效。验证“##xp_cmdshell_proxy_account##”凭据是否存在并包含有效信息。
是否可以在 SQL Server 2014 中使用 gMSA 作为 xp_cmdshell 的代理帐户?如果是这样,如何将其设置为代理帐户?
谢谢!
大家,
在运行2012 SP3的SQL Server实例上,以下代码返回"1":
SELECT ISDATE('january,25,1999')
Run Code Online (Sandbox Code Playgroud)
但是,以下操作无法转换:
SELECT CAST('january,25,1999' AS DATE)
Msg 241, Level 16, State 1, Line 1
Conversion failed when converting date and/or time from character string.
Run Code Online (Sandbox Code Playgroud)
我误解ISDATE()应该返回什么?为什么ISDATE()为字符串返回值"1"?我们应该如何从SQL Server确定诸如"january,25,1999"之类的字符串是否可以作为日期输入?
谢谢!