18452: Login failed. The login is from an untrusted domain and cannot be used with Windows authentication(登录失败。该登录名来自不受信任的域,不能用于 Windows 身份验证)
SQL Server含义
Windows 身份验证登录尝试被拒绝,因为它来自不受信任的域(或在需要 SQL 身份验证的地方使用了 Windows 身份验证)。服务器不信任此身份。
原因
客户端使用 SQL Server 不信任的域/工作组中的 Windows 身份进行连接;计算机位于不同/不受信任的域中;Kerberos/SPN 配置错误;或在应使用 SQL 身份验证时,连接字符串使用了 Integrated Security。在禁用混合模式时尝试 SQL 登录也会出现类似症状。
解决方法
如果需要 SQL 身份验证,将服务器切换为混合模式,并在连接字符串中使用用户名/密码(Integrated Security=false)。如果需要 Windows 身份验证,检查域信任以及 DNS/Kerberos SPN 配置。确保客户端和服务器位于同一个域或受信任的域中。借助错误日志中的 'state' 值缩小原因范围。
同一数据库的其他条目
- 1204The instance of the SQL Server Database Engine cannot obtain a LOCK resource(SQL Server 数据库引擎实例无法获取 LOCK 资源)
- 3906Failed to update database because the database is read-only(无法更新数据库,因为数据库为只读)
- 15023User already exists in the current database(用户在当前数据库中已存在)
- 605Attempt to fetch logical page belongs to a different allocation unit(尝试获取的逻辑页属于另一个分配单元)
- 4922ALTER TABLE ALTER COLUMN failed because one or more objects access this column(ALTER TABLE ALTER COLUMN 失败,因为有一个或多个对象访问此列)
- 7202Could not find server 'name' in sys.servers(在 sys.servers 中找不到服务器 'name')
- 40501The service is currently busy. Retry the request after 10 seconds(服务当前繁忙。请在 10 秒后重试请求)