Hello.
In Windows Server 2012 R2 and Windows Server 2019, ports 139 (used for session services for NetBIOS over TCP/IP) and 445 (used for Microsoft-DS over direct TCP/IP (i.e., SMB/CIFS)) are reserved for the SMB protocol.
SQL Server Log Shipping relies on backup and restore operations between SQL Server database engines and does not normally use the SMB port directly for communication. It can transfer data in a variety of ways, including through network shares or through other transport mechanisms such as FTP, SCP, and so on. Therefore, if you are referring to the log sending feature of SQL Server, then changing the SMB port will not directly affect this feature, and you can choose a different method for transferring transaction log backup files.
However, for network file transfers, the SMB protocol is used by default and its ports are fixed and cannot be easily changed. Microsoft does not officially support changing these ports because many system components and services rely on these default settings. Attempting to modify them may lead to unforeseen problems or compatibility issues.
Best Regards,
Hania Lian
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.