SQLSERVER 2016新建订阅,连接发布服务器时报错“设置连接字符串后无法更改或读取属性 Password。 (Microsoft.SqlServer.ConnectionInfo)”的解决方案

发布时间 2023-11-15 17:42:50作者: 江左盟

被此问题困扰许久,查遍全网也没有查到合适的解决方案。

特此记录,希望帮到需要的人。

SQLSERVER 2016新建订阅,连接发布服务器时报错“设置连接字符串后无法更改或读取属性 Password。 (Microsoft.SqlServer.ConnectionInfo)”

===================================

设置连接字符串后无法更改或读取属性 Password。 (Microsoft.SqlServer.ConnectionInfo)

------------------------------
程序位置:

在 Microsoft.SqlServer.Management.Common.ConnectionSettings.ThrowIfConnectionStringIsSet(String propertyName)
在 Microsoft.SqlServer.Management.Common.ConnectionSettings.set_SecurePassword(SecureString value)
在 Microsoft.SqlServer.Management.UI.ReplicationSqlConnection.Initialize(UIConnectionInfo conninfo, SqlConnection sqlconn)
在 Microsoft.SqlServer.Management.UI.ReplicationSqlConnection..ctor(UIConnectionInfo conninfo, SqlConnection sqlconn)
在 Microsoft.SqlServer.Management.UI.ReplicationSqlConnection.ShowDialogValidateConnection(UIConnectionInfo& connInfo, Form parent, Boolean fixedServerName)
在 Microsoft.SqlServer.Management.UI.PageChoosePublication.SelectPublisher()
在 Microsoft.SqlServer.Management.UI.PageChoosePublication.comboBoxPublisher_SelectionChangeCommitted(Object sender, EventArgs e)
在 System.Windows.Forms.ComboBox.OnSelectionChangeCommitted(EventArgs e)
在 System.Windows.Forms.ComboBox.OnSelectionChangeCommittedInternal(EventArgs e)
在 System.Windows.Forms.ComboBox.WmReflectCommand(Message& m)
在 System.Windows.Forms.ComboBox.WndProc(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
在 System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
在 System.Windows.Forms.Control.SendMessage(Int32 msg, IntPtr wparam, IntPtr lparam)
在 System.Windows.Forms.Control.ReflectMessageInternal(IntPtr hWnd, Message& m)
在 System.Windows.Forms.Control.WmCommand(Message& m)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.ScrollableControl.WndProc(Message& m)
在 System.Windows.Forms.ContainerControl.WndProc(Message& m)
在 System.Windows.Forms.Application.ParkingWindow.WndProc(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
在 System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
在 System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
在 System.Windows.Forms.Control.DefWndProc(Message& m)
在 System.Windows.Forms.Control.WmCommand(Message& m)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.ComboBox.WndProc(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
在 System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
在 System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
在 System.Windows.Forms.ComboBox.ComboBoxChildNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
在 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
在 System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.RunDialog(Form form)
在 System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
在 System.Windows.Forms.Form.ShowDialog()
在 Microsoft.SqlServer.Management.SqlMgmt.RunningFormsTable.RunningFormsTableImpl.ThreadStarter.StartThread()

 

 

解决方案:

更换SSMS的版本 ,换成 SSMS 19.0.2 版即可。

 原因定位:根据微软官方网站发布的信息,SSMS 的个别版本存在BUG,SSMS 19.0.2版本修复了此BUG。