Steve Endow explains Get GPConnNet to connect to SQL Server instance with a TCP port number using SQL Alias.
Dynamics GP Land: Get GPConnNet to connect to SQL Server instance with a TCP port number using SQL Alias
SQL & DataInstall, Upgrade & Admin
Archived post from 2015. Dynamics GP and the links it points to have changed since; check current documentation before relying on version-specific steps.