Reference Microsoft.SqlServer.Smo.dll

前端 未结 11 1232
轮回少年
轮回少年 2020-12-04 11:59

I need to use Server class which is stored in Microsoft.SqlServer.Smo.dll I don\'t see this assembly in usual References dialog. I have found it at C:/Program Files/Microsof

相关标签:
11条回答
  • 2020-12-04 12:50

    I know this is an old question, but I just ran into the same issue. @Mitch_Wheat is correct that as a minimum you need references to the 4 SMO assemblies. Trying to add all 4 at once, however, gave me the error you listed.

    Adding the assemblies one at a time bypassed the error.

    0 讨论(0)
  • 2020-12-04 12:51

    For those who need the sql server 2014 version (version 120) you need to download and install the following packages from Microsoft:

    • SQLSysClrTypes (x64): https://download.microsoft.com/download/1/3/0/13089488-91FC-4E22-AD68-5BE58BD5C014/ENU/x64/SQLSysClrTypes.msi
    • SharedManagementObjects(x64): https://download.microsoft.com/download/1/3/0/13089488-91FC-4E22-AD68-5BE58BD5C014/ENU/x64/SharedManagementObjects.msi

    You can find all relevant info on Microsoft website on this page (as suggested correctly by @mitch-wheat ): https://www.microsoft.com/en-gb/download/details.aspx?id=42295

    0 讨论(0)
  • 2020-12-04 12:53

    To synchronize a pull subscription on demand in Management Studio Connect to the Subscriber in Management Studio, and then expand the server node.

    Expand the Replication folder, and then expand the Local Subscriptions folder.

    Right-click the subscription you want to synchronize, and then click View Synchronization Status.

    In the View Synchronization Status - : dialog box, click Start. When synchronization is complete, the message Synchronization completed is displayed.

    Click Close.

    0 讨论(0)
  • 2020-12-04 12:57

    An easy way to get all 7 ddls that related on this issue is

    Microsoft.SqlServer.ConnectionInfo.dll,
    Microsoft.SqlServer.ConnectionInfoExtended.dll,
    Microsoft.SqlServer.Management.Sdk.Sfc.dll,
    Microsoft.SqlServer.Smo.dll,
    Microsoft.SqlServer.SmoExtended.dll,
    Microsoft.SqlServer.SqlClrProvider.dll,
    Microsoft.SqlServer.SqlEnum.dll

    Create a separate console application

    download those using nuget

    PM> Install-Package Microsoft.SQLServer.SMO -Version 12.0.2000.8

    build the application and all dlls will be in the bin folder ... you can copy from there and add reference to your existing application

    https://www.nuget.org/packages/Microsoft.SQLServer.SMO/12.0.2000.8

    0 讨论(0)
  • 2020-12-04 12:59

    In the case that you want use Backup class add Microsoft.SqlServer.Management.SmoExtended to your project.

    0 讨论(0)
提交回复
热议问题