【问题标题】:change from windows authentication to sql server authentication从 windows 身份验证更改为 sql server 身份验证
【发布时间】:2013-07-20 10:01:15
【问题描述】:

谁能告诉我如何从 Windows 身份验证更改为 SQL Server 身份验证。我一直使用它作为我的连接字符串

"server=.;Data Source=.;Initial Catalog=Work;Integrated Security=True"

【问题讨论】:

  • 删除 Integrated Security=True(这就是定义 Windows 身份验证的内容),并将用户 ID 和密码 User id=someUserName;password=password 添加到连接字符串 -就是这样
  • 我上面提到的连接是有效的>
  • 好吧,如果您想使用 SQL Server 身份验证,那么您必须拥有用户 ID 和密码才能登录到该 SQL Server ....

标签: sql-server sql-server-2008 authentication windows-authentication


【解决方案1】:

你一直想知道但又不敢问的关于连接字符串的一切 - www.connectionstrings.com

【讨论】:

    【解决方案2】:

    以下 connectionString 格式应该可以完成这项工作。

    connectionString="user id=yourUsername; password=yourPassword;data source=yourServerName;initial catalog=yourDatabaseName;"
    

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2010-10-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-09-25
    • 1970-01-01
    • 2023-03-19
    相关资源
    最近更新 更多