none
Importing registered serves fails in MSSM 2012

    Question

  • I exported servers two days ago, and did a clean install of Win7, now when I try to import that sqlservers.regsrvr I face this error:

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

    Key not valid for use in specified state.
     (System.Security)

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

       at System.Security.Cryptography.ProtectedData.Unprotect(Byte[] encryptedData, Byte[] optionalEntropy, DataProtectionScope scope)
       at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServer.ProtectData(String input, Boolean encrypt)
       at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServer.get_SecureConnectionString()
       at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServer.get_ConnectionString()
       at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServer.get_ServerName()
       at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServerTree.AddRegisteredServerNode(RegisteredServer regSrv, TreeNodeCollection nodes)
       at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServerTree.DoOnRegisteredServerCreated(RegisteredServer server)
       at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServerTree.OnRegisteredServerCreated(RegisteredServer server)
       at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServerControl.Events_SfcObjectCreated(Object sender, SfcObjectCreatedEventArgs e)
       at Microsoft.SqlServer.Management.Sdk.Sfc.SfcApplication.SfcObjectCreatedEventHandler.Invoke(Object sender, SfcObjectCreatedEventArgs e)
       at Microsoft.SqlServer.Management.Sdk.Sfc.SfcApplicationEvents.OnObjectCreated(SfcInstance obj, SfcObjectCreatedEventArgs e)
       at Microsoft.SqlServer.Management.RegisteredServers.ServerGroup.RaiseSfcAppObjectCreatedEvent(SfcInstance obj)
       at Microsoft.SqlServer.Management.RegisteredServers.ServerGroup.Import(String file)

    The operation 'Import' failed. (Microsoft.SqlServer.Management.RegisteredServers)

    ------------------------------
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=11.0.2100.60+((SQL11_RTM).120210-1846+)&LinkId=20476

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

       at Microsoft.SqlServer.Management.RegisteredServers.ServerGroup.Import(String file)
       at Microsoft.SqlServer.Management.RegisteredServers.Utils.Import(ServerGroup parentGroup, String filename)
       at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServersContextMenuManager.ContextImport(Object sender, EventArgs e)

    All exported were remote, and I checked save username and passwords in export window. 


    Sunday, March 23, 2014 3:18 PM

All replies

  • Hi MaysamSh,

    According to your description, you want to import and export registered servers between computers by using SSMS. The error may occur due to some encryption enabled in your existing registered server list, you can try to delete or rename the files below and then give a try to import the registered servers again.

    C:\Users\[USERNAME]\AppData\Local\Microsoft\Microsoft SQL Server\100\Tools\Shell\RegSrvr.xml

    OR

    C:\Users\[USERNAME]\AppData\Roaming\Microsoft\Microsoft SQL Server\100\Tools\Shell\RegSrvr.xml

    For more information, you can refer to the following article.
    http://chocosmith.wordpress.com/2011/02/02/ssms-r2-key-not-valid-for-use-in-specified-state/

    Regards,
    Sofiya Li


    Sofiya Li
    TechNet Community Support

    Tuesday, March 25, 2014 4:11 AM
  • I did it but I got the same error.
    Tuesday, March 25, 2014 5:17 AM