Error creating a new SQL Server 2017 maintenance plan

0

I'm getting error CO_E_CLASSSTRING ("Invalid class string") while trying to create a new maintenance plan in Microsoft Sql Server Management 18.0

I already tried to reinstall all the components of SQL Server 17 but it didn't help.

Sql server management 18

This is the error details :

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

Exception has been thrown by the target of an invocation. (mscorlib)

------------------------------ Program Location:

at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.SqlServer.Management.DatabaseMaintenance.MaintDesignerMenuHandler.GetExistingPackageNames(ServerConnection serverConnection) at Microsoft.SqlServer.Management.DatabaseMaintenance.MaintDesignerMenuHandler.GetNewPackageName(ServerConnection serverConnection) at Microsoft.SqlServer.Management.DatabaseMaintenance.MaintDesignerMenuHandler.Invoke()

=================================== Incorrect Class String (Exception from HRESULT: 0x800401F3 (CO_E_CLASSSTRING)) (Microsoft.SqlServer.DTSRuntimeWrap)

------------------------------ Program Location:

at Microsoft.SqlServer.Dts.Runtime.Application.GetPackageInfos(String strFolder, String serverName, String serverUserName, String serverPassword)

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

Incorrect Class String (Exception from HRESULT: 0x800401F3 (CO_E_CLASSSTRING)) (Microsoft.SqlServer.DTSRuntimeWrap)

------------------------------ Program Location:

at Microsoft.SqlServer.Dts.Runtime.Wrapper.ApplicationClass.GetPackageInfos(String bstrPackageFolder, String bstrServerName, String bstrServerUserName, String bstrServerPassword) at Microsoft.SqlServer.Dts.Runtime.Application.GetPackageInfos(String strFolder, String serverName, String serverUserName, String serverPassword)

sql-server
tsql
asked on Stack Overflow Jun 12, 2019 by Oox Hamza • edited Jun 12, 2019 by Oox Hamza

1 Answer

0

I had this exact same error & fixed it by just connecting to the server from my laptop instead of locally through SSMS and creating the maintenance plan there. I haven't tested the long term fix yet but it might be to uninstall & reinstall SSMS on the SQL server itself.

Possible root cause is that this was a new installation of SQL server 2017 on an old server that had several other versions previously installed. I deleted all the old versions but left the existing SSMS installation on the server and that's when I started having this error.

answered on Stack Overflow Aug 19, 2019 by user11948709

User contributions licensed under CC BY-SA 3.0