REPLICATION:Error messages: The process could not read file 'D:\Microsoft SQL Server\MSSQL14.TEST\MSSQL\ReplData\unc\PublicationNameHere\20200506040003\functionnamehere.pre' due to OS error 2. (Source: MSSQLServer, Error number: 20216) Get help: http://help/20216 The system cannot find the file specified. (Source: MSSQLServer, Error number: 2) Get help: http://help/2

I got the below error in Distribution Agent job in Snapshot publication after i deleted a file( a file which has drop command on a function) manually from Snapshot folder.


Error messages:
The process could not read file 'D:\Microsoft SQL Server\MSSQL14.TEST\MSSQL\ReplData\unc\PublicationNameHere\20200506040003\functionnamehere.pre' due to OS error 2. (Source: MSSQLServer, Error number: 20216)
Get help: http://help/20216
The system cannot find the file specified.
 (Source: MSSQLServer, Error number: 2)
Get help: http://help/2

Command attempted:
D:\Microsoft SQL Server\MSSQL14.TEST\MSSQL\ReplData\unc\PublicationNameHere\20200506040003\functionnamehere.pre.pre

(Transaction sequence number: 0x0009B59B00605046001600000002, Command ID: 15)

Reason: Though i deleted the file Physically from Snapshot folder it is looking for logically and you can find the same info in the below distribution tables



So delete those command based on 15 and  Now Distribution Agent start running and you can see clean replication monitor



Comments

Popular posts from this blog

System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out

Pre login Handshake or Connection Timeout Period

Transparent Data Encryption(TDE) with Master Key and Certificate in SQL Server