zl程序教程

您现在的位置是:首页 >  数据库

当前栏目

Cannot generate SSPI context---MS SQL ERROR

SQL Error --- Cannot Context MS generate
2023-09-27 14:28:45 时间
http://www.cnblogs.com/newr2006/archive/2011/08/25/2153253.html Additional error information from SQL Server is included below.

 

http://www.cnblogs.com/newr2006/archive/2011/08/25/2153253.html

Additional error information from SQL Server is included below.  Cannot generate SSPI context.

ConnectionString:Data Source=sqlxxxxx;Initial Catalog=master;Integrated Security=True;Pooling=False;Asynchronous Processing=False;ConnectTimeout=15

Cannot connect to database master at SQL server at sqlxxxxx. The database might not exist, or the current user does not have permission to connect to it.
 which manually add the service principle name for each SQL VM, which resolved the issue:

setspn -a MSSQLSvc/ SQLVMName .cnblogs.com:1433 SQLVMName .
setspn -a MSSQLSvc/ SQLVMName .cnblogs.com SQLVMName .

restart the sql services

~~~~~~~~~~

ADSI相关属性值如下:


SQL Server 2000 函数使用---CAST 和 CONVERT 日期格式样式,借以将 datetime 或 smalldatetime 数据转换为字符数据(nchar、nvarchar、char、varchar、nchar 或 nvarchar 数据类型);或者字符串格式样式,借以将 float、real、money 或 smallmoney 数据转换为字符数据(nchar、nvarchar、char、varchar、nchar 或 nvarchar 数据类型)。