SQL Pull replication stops on unintialized subscription For a new project we want to test pull replication in mssql to replicate database (transactional replication) to multiple db server. I setup the pull replication by wizard in MSSMS and but the replication stucks on uninitialized subscription in the replication monitor.
Steps I have done:

Created a publication on publisher by wizard (Local Publications &gt; New Publication...).
Created a subscription by wizard (Local Subscriptions &gt; New Subscriptions...)

Publisher and distributor are on the same host. Subscriber uses SQLExpress. Authentication is done by sql authentication. SQL user used for authentication is dbo on Distributor DB.
What else is needed to initialize the subscription?
If  you want to Pull from a SQL Agent, you'll have to schedule and execute the replication job with a custom program or script.  Here's an old sample of doing it in PowerShell:
$asm = [Reflection.Assembly]::LoadWithPartialName(&quot;Microsoft.SqlServer.ConnectionInfo&quot;)
$asm = [Reflection.Assembly]::LoadWithPartialName(&quot;Microsoft.SqlServer.Replication&quot;)
$asm = [Reflection.Assembly]::LoadWithPartialName(&quot;Microsoft.SqlServer.RMO&quot;)

function Do-Replication
{

&lt;# .SYNOPSIS Initiate Merge Replication Sync 
   .DESCRIPTION This Function kicks of a Transactional Replication Synchronization 
   .EXAMPLE Do-Replication -subscriber &quot;DBROWNE0&quot; &quot;DBROWNE0&quot; &quot;inventory&quot; &quot;subscriberTest&quot; &quot;replTest&quot; $false 1 4;
   .PARAMETER subscriber The SQL Instance Name name of the Publication, EG localhost 
   .PARAMETER spublisher The SQL Instance Name name of the Publisher, eg MyPublisher 
   .PARAMETER publication The name of the publication 
   .PARAMETER subscriptionDatabase The name of the Subscriber Database 
   .PARAMETER publicationDatabase The name of the publisher database 
   .PARAMETER forceReInit $true to force a ReInitialization of the subscription, $false otherwise 
   .PARAMETER verboseLevel Logging verbosity level 
   .PARAMETER retries Number of times to retry the sync in case of a failure #&gt;

  param([string][Parameter(Mandatory = $true,position = 0)] $subscriber,
    [string][Parameter(Mandatory = $true,position = 1)] $publisher,
    [string][Parameter(Mandatory = $true,position = 2)] $publication,
    [string][Parameter(Mandatory = $true,position = 3)] $subscriptionDatabase,
    [string][Parameter(Mandatory = $true,position = 4)] $publicationDatabase,
    [Boolean][Parameter(Mandatory = $true,position = 5)] $forceReInit,
    [int32][Parameter(Mandatory = $true,position = 6)] $verboseLevel,
    [int32][Parameter(Mandatory = $true,position = 7)] $retries
  )

  &quot;Subscriber: $subscriber&quot;;
  &quot;Publisher: $publisher&quot;;
  &quot;Publication: $publication&quot;;
  &quot;Publication Database: $publicationDatabase&quot;;
  &quot;Subscription Database: $subscriptionDatabase&quot;;
  &quot;ForceReInit: $forceReinit&quot;;
  &quot;VerboseLevel: $verboseLevel&quot;;
  &quot;Retries: $retries&quot;;

  for ($counter = 1; $counter -le $retries; $counter++)
  {
    &quot;Subscriber $subscriber&quot;;
    $serverConnection = New-Object Microsoft.SqlServer.Management.Common.ServerConnection $subscriber;
    try
    {
      $serverConnection.Connect();
      $transPullSubscription = New-Object Microsoft.SqlServer.Replication.TransPullSubscription;
      $transPullSubscription.ConnectionContext = $serverConnection;
      $transPullSubscription.DatabaseName = $subscriptionDatabase;
      $transPullSubscription.PublisherName = $publisher;
      $transPullSubscription.PublicationDBName = $publicationDatabase;
      $transPullSubscription.PublicationName = $publication;
      if ($true -ne $transPullSubscription.LoadProperties())
      {
        throw New-Object System.ApplicationException &quot;A subscription to [$publication] does not exist on [$subscriber]&quot;
      }
      if ($null -eq $transPullSubscription.PublisherSecurity)
      {
        throw New-Object System.ApplicationException &quot;There is insufficent metadata to synchronize the subscription. Recreate the subscription with the agent job or supply the required agent properties at run time.&quot;;
      }
      $transPullSubscription.SynchronizationAgent.Output = &quot;c:\temp\ReplicationLog.txt&quot;;
      $transPullSubscription.SynchronizationAgent.OutputVerboseLevel = $verboseLevel;

      if ($forceReInit -eq $true)
      {
        $transPullSubscription.Reinitialize();
      }

      $transPullSubscription.SynchronizationAgent.Synchronize();
      &quot;Sync Complete&quot;;
      return;
    }
    catch [Exception]
    {
      if ($counter -lt $retries)
      {
        $_.Exception.Message + &quot;: &quot; + $_.Exception.InnerException;
        &quot;Retry $counter&quot;;
        continue;
      }
      else
      {
        return $_.Exception.Message + &quot;: &quot; + $_.Exception.InnerException }
    }
  }
}