SQL Server删除登录用户后登录界面仍在存在?

SQL SERVER在删除自己创建的登录名之后,再次登录时总是显示之前删除的登录名,在19.0版本中没有了SqlStudio.bin文件而是将登录信息放在了:

C:\Users\users\AppData\Roaming\Microsoft\SQL Server Management Studio\19.0\UserSettings.xml文件下。

使用记事本打开。

在查找中输入你的登录账户

然后删除这些东西即可:(一般这些东西会在<connection>后面,或者一对<Element>中间)。

 <Element>
                          <Time>
                            <long>-638468806661964764</long>
                          </Time>
                          <Item>
                            <ServerConnectionSettings>
                              <Password />
                              <Instance>.</Instance>
                              <UserName>xiaowang</UserName>
                              <ServerType>8c91a03d-f9b4-46c0-a305-b5dcc79ff907</ServerType>
                              <AuthenticationMethod>1</AuthenticationMethod>
                              <Database />
                              <Advanced>
                                <Element>
                                  <Key>
                                    <string>IniDb</string>
                                  </Key>
                                  <Value />
                                </Element>
                                <Element>
                                  <Key>
                                    <string>CT</string>
                                  </Key>
                                  <Value>
                                    <string>30</string>
                                  </Value>
                                </Element>
                                <Element>
                                  <Key>
                                    <string>ET</string>
                                  </Key>
                                  <Value>
                                    <string>0</string>
                                  </Value>
                                </Element>
                                <Element>
                                  <Key>
                                    <string>PSize</string>
                                  </Key>
                                  <Value>
                                    <string>4096</string>
                                  </Value>
                                </Element>
                                <Element>
                                  <Key>
                                    <string>EC</string>
                                  </Key>
                                  <Value>
                                    <string>False</string>
                                  </Value>
                                </Element>
                                <Element>
                                  <Key>
                                    <string>UCCC</string>
                                  </Key>
                                  <Value>
                                    <string>False</string>
                                  </Value>
                                </Element>
                                <Element>
                                  <Key>
                                    <string>CCC</string>
                                  </Key>
                                  <Value>
                                    <string>-986896</string>
                                  </Value>
                                </Element>
                                <Element>
                                  <Key>
                                    <string>TSC</string>
                                  </Key>
                                  <Value>
                                    <string>False</string>
                                  </Value>
                                </Element>
                                <Element>
                                  <Key>
                                    <string>UCTI</string>
                                  </Key>
                                  <Value>
                                    <string>False</string>
                                  </Value>
                                </Element>
                                <Element>
                                  <Key>
                                    <string>CTI</string>
                                  </Key>
                                  <Value>
                                    <string />
                                  </Value>
                                </Element>
                                <Element>
                                  <Key>
                                    <string>CES</string>
                                  </Key>
                                  <Value />
                                </Element>
                                <Element>
                                  <Key>
                                    <string>CESEnclave</string>
                                  </Key>
                                  <Value />
                                </Element>
                                <Element>
                                  <Key>
                                    <string>CESProtocol</string>
                                  </Key>
                                  <Value />
                                </Element>
                                <Element>
                                  <Key>
                                    <string>CESUrl</string>
                                  </Key>
                                  <Value />
                                </Element>
                                <Element>
                                  <Key>
                                    <string>Prot</string>
                                  </Key>
                                  <Value />
                                </Element>
                              </Advanced>
                              <OtherParams />
                            </ServerConnectionSettings>
                          </Item>
                        </Element>

保存后重启数据库服务即可。

  • 18
    点赞
  • 20
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值