SQL Server Replication OS error 3


  • hi,experts:

    i got this from my testing machine:

    Command attempted:
    C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\ReplData\unc\SGDEV161_DEMO_SGDEV161\20110330140602\t_2.pre
    (Transaction sequence number: 0x0000005E000000FD001D00000000, Command ID: 5)
    Error messages:
    The process could not read file 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\ReplData\unc\SGDEV161_DEMO_SGDEV161\20110330140602\t_2.pre' due to OS error 3. (Source: MSSQL_REPL, Error number: MSSQL_REPL20016)
    Get help: http://help/MSSQL_REPL20016
    The system cannot find the path specified.
     (Source: MSSQL_REPL, Error number: MSSQL_REPL3)
    Get help: http://help/MSSQL_REPL3

    i have 2 server,

    Server A: SQL Server 2008

    Server B: SQL Server 2005

    all server running with a same domain user,then i create a Transactional publication from Server A, create the subscriptions from server B,every time the replication monitor show the above error message, help me please.


    Actually the file 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\ReplData\unc\SGDEV161_DEMO_SGDEV161\20110330140602\t_2.pre' there already, why cannot read?


    Best regards


    Wednesday, March 30, 2011 6:18 AM


All replies

  • i solve the problem,

    create a sharing folder, for example:

    \\sgdev161\SQL_server_test and grant the control rights to the login domain user,

    when create the publisher, set the snapshot file folder to:


    seems cannot set the path like c:\SQL_server_test




    Wednesday, March 30, 2011 8:27 AM
  • Yes, you must specify a UNC network share such as \\<computername>\snapshot rather than a local path when using pull subscriptions and/or a remote Distributor.
    Wednesday, March 30, 2011 4:42 PM
  • I have encountered a similar scenario as the original post. I have followed the suggested steps by specifying a UNC-naming file location. The SQLServer Service Agent has the necessary permissions to this folder, and I have restarted both SQL servers (publication and subscription).

    Any other suggestions?

    Below is an extract of the error log: (to follow)

    2012-05-02 15:20:40.704 Copyright (c) 2008 Microsoft Corporation
    2012-05-02 15:20:40.704 Microsoft SQL Server Replication Agent: distrib
    2012-05-02 15:20:40.704
    2012-05-02 15:20:40.704 The timestamps prepended to the output lines are expressed in terms of UTC time.
    2012-05-02 15:20:40.704 User-specified agent parameter values:
                -Publisher MYPUBLISHER
                -PublisherDB MyDBToCopy
                -Publication MYPUBLISHER-MyDBToCopy-Snapshot
                -Distributor MYPUBLISHER
                -SubscriptionType 1
                -Subscriber MYSUBSCRIBER
                -SubscriberSecurityMode 1
                -SubscriberDB MyDBToCopy_subscription
                -XJOBID 0xF7D87C6205057F46B7F1C15067284AA8
                -XJOBNAME TheJobNameOfTheSubscription_subscri-56B35F83-6659-4436-9254-9151FB7E15E2
                -XSTEPID 1
                -XSUBSYSTEM Distribution
                -XCMDLINE 0
                -XCancelEventHandle 0000000000000100
                -XParentProcessHandle 0000000000000684
    2012-05-02 15:20:40.704 Startup Delay: 9109 (msecs)
    2012-05-02 15:20:49.814 Connecting to Subscriber 'MYSUBSCRIBER'
    2012-05-02 15:20:49.969 Connecting to Distributor 'MYPUBLISHER'
    2012-05-02 15:20:50.425 Parameter values obtained from agent profile:
                -bcpbatchsize 2147473647
                -commitbatchsize 100
                -commitbatchthreshold 1000
                -historyverboselevel 1
                -keepalivemessageinterval 300
                -logintimeout 15
                -maxbcpthreads 1
                -maxdeliveredtransactions 0
                -pollinginterval 5000
                -querytimeout 1800
                -transactionsperhistory 100
    2012-05-02 15:20:50.749 Initializing
    2012-05-02 15:20:51.179 Snapshot will be applied from the alternate folder '\\thispc\Backups\unc\generatednameforpublication-SNAPSHOT\20120502170944\'
    2012-05-02 15:20:51.225 Agent message code 20143. The process could not read file '\\thispc\Backups\unc\generatednameforpublication\20120502170944\SomeTable_34.pre' due to OS error 5.
    • Edited by sonja_kruger Wednesday, May 2, 2012 3:31 PM add text
    Wednesday, May 2, 2012 3:30 PM
  • The OP was facing on OS error 3 which is a path problem.  From your agent output you are facing OS error 5.

    OS error 5 is a permissions related issue.  Grant Everyone Full Control to the alternate folder and see if that helps.  Then pare the permissions down from there.

    Brandon Williams (blog | linkedin)

    Wednesday, May 2, 2012 4:51 PM