SQL Server 2008的防爆preSS无法使用合并复制?Server、SQL、preSS

由网友(睡姿决定我的发型i)分享简介:据微软称,SQL Server 2008的防爆preSS应该能够参与合并复制,作为拉动用户。至少与RMO对象According to Microsoft, SQL Server 2008 Express should be able to participate in merge replication, as a...

据微软称,SQL Server 2008的防爆preSS应该能够参与合并复制,作为拉动用户。至少与RMO对象

According to Microsoft, SQL Server 2008 Express should be able to participate in merge replication, as a pull subscriber. At least with the RMO-objects.

http://msdn.microsoft.com/en-us/library/ ms147890.aspx http://msdn.microsoft.com/en-us/library/ ms151819.aspx http://msdn.microsoft.com/en-us/library/ms147890.aspx http://msdn.microsoft.com/en-us/library/ms151819.aspx

但是,其他变体也应该尽可能地使用。

But other variants should also be possible to use.

不过,我们不能够启动SQL Server代理在客户端(运行SQL Server 2008前preSS)。这似乎是一个常见的​​问题,据我可以发现,解决。

However, we are not able to start the SQL Server Agent on the clients (running SQL Server 2008 Express). This seems to be a common problem, and as far as I can find, unsolved.

我是正确的,合并时(拉)在现实中订阅不支持SQL Server 2008的防爆preSS思维?有没有人成功地使用这种技术?我认为这是pretty的严重,微软声称这工作得很好,虽然它不是在所有。

Am I right in thinking that merge (pull) subscriptions in reality is not supported with SQL Server 2008 Express? Has anyone successfully used this technology? I think it's pretty serious that Microsoft are claiming this to work fine, although it's not at all.

我希望有人有任何这方面的经验!

I'm hoping that someone has any experience with this!

推荐答案

我能够同步合并请求订阅SQL Server 2008 R2的防爆preSS上 - 与以下位通过RMO - 没有SQL Server代理C#:

I was able to synchronize a Merge pull subscription on SQL Server 2008 R2 Express - without the SQL Server Agent - via RMO with the following bit of C#:

static void SynchronizeMergePullSubscriptionViaRMO()
{
        // Define the server, publication, and database names.
        string subscriberName = "WIN8CPSQLEXPRESS";
        string publisherName = "WS2008R2_1";
        string distributorName = "WS2008R2_1";
        string publicationName = "TestMergePub2";
        string subscriptionDbName = "TestSubDB1";
        string publicationDbName = "AdventureWorksLT";

        // Create a connection to the Subscriber.
        ServerConnection conn = new ServerConnection(subscriberName);

        MergePullSubscription subscription;
        MergeSynchronizationAgent agent;

        try
        {
            // Connect to the Subscriber.
            conn.Connect();

            // Define the pull subscription.
            subscription = new MergePullSubscription();
            subscription.ConnectionContext = conn;
            subscription.DatabaseName = subscriptionDbName;
            subscription.PublisherName = publisherName;
            subscription.PublicationDBName = publicationDbName;
            subscription.PublicationName = publicationName;

            // If the pull subscription exists, then start the synchronization.
            if (subscription.LoadProperties())
            {
                // Get the agent for the subscription.
                agent = subscription.SynchronizationAgent;

                // Set the required properties that could not be returned
                // from the MSsubscription_properties table.
                agent.PublisherSecurityMode = SecurityMode.Integrated;
                agent.DistributorSecurityMode = SecurityMode.Integrated;
                agent.Distributor = publisherName;

                // Enable agent output to the console.
                agent.OutputVerboseLevel = 4;
                agent.Output = "C:TEMPmergeagent.log";

                // Synchronously start the Merge Agent for the subscription.
                agent.Synchronize();
            }
            else
            {
                // Do something here if the pull subscription does not exist.
                throw new ApplicationException(String.Format(
                    "A subscription to '{0}' does not exist on {1}",
                    publicationName, subscriberName));
            }
        }
        catch (Exception ex)
        {
            // Implement appropriate error handling here.
            throw new ApplicationException("The subscription could not be " +
                "synchronized. Verify that the subscription has " +
                "been defined correctly.", ex);
        }
        finally
        {
            conn.Disconnect();
        }
}

://$c$c.msdn.microsoft.com/SQL-Server-Ex$p$pss-05c73322 HTTP相对=nofollow

A code样品可以从的 MSDN code库。

A code sample can be downloaded from the MSDN Code Gallery.

阅读全文

相关推荐

最新文章