Error: “The database login failed. Failed to open the connection. Details: [Database Vendor Code: 17]”
Description
Cause
  • The Database Server field in Sage 100 Settings Utility contain the wrong server name.
  • Firewall blocking SQL Server port
  • SQL Server Instance does not have TCP\IP Enabled
  • Database Server field in Sage 100 SQL Settings Utilities on Server contains (Local)
Resolution
[BCB:1:Backup warning:ECB]
[BCB:5:Third-party support:ECB]

For Sage 100 2013 and higher

  1. In Windows, select Start, All Programs, Sage, Sage 100 ERP 2013 , Sage 100 Premium ERP 2013 SQL Settings Utility.
  2. Select EDIT.
  3. Select the Database Server field
  4. Enter the SQL Server name
    • Note: it may be necessary to enter \ if SQL is installed on a Separate server. Make sure the system is not using (Local)\
  5. Select Apply
  6. Enter SQL Database Login Credentials
  7. Select OK
  8. Select OK on Test Connection Results screen
  9. Select Close
  10. Open Windows Services
  11. Look for SQL Server Browser
  12. If working over multiple machines SQL Server Browser must be running all the time
  13. Right click and select Start if needed.

For Sage 100 (formerly Sage MAS 200 SQL) version 4.50:

  1. In Windows, select Start, All Programs, Sage, Sage ERP MAS 200 SQL, Sage ERP MAS 200 SQL Settings Utility.
  2. Select EDIT.
  3. Select the Database Server field.
  4. Enter the SQL Server Name.
    • Note: it may be necessary to enter \ if SQL is installed on a Separate server. Make sure the system is not using (Local)\
  5. Select Apply.
  6. Enter SQL Database Login Credentials.
  7. Select OK
  8. Select OK on Test Connection Results screen.
  9. Select Close

If error continues add a Firewall Inbound Rule for the SQL Server service:

Open port in Windows firewall for TCP Access

  1. Open Administrative Tools, Windows Firewall with Advanced Security console
  2. In the left pane of the console, select Inbound Rules
  3. Right-click select New Rule
  4. Select Port and click Next
  5. In the Protocol and Ports dialog box, select TCP.
  6. Select Specific Port Numbers and then type the port numbers: 1433, 1434
  7. Select Next until get to 'Specify the name and Description of this Rule" screen
  8. Enter name for Inbound Rule (for instance SQL - TCP)
  9. Select Finish

Open port in Windows firewall for UDP Access

  1. Open Administrative Tools, Windows Firewall with Advanced Security console
  2. In the left pane of the console, select Inbound Rules
  3. Right-click select New Rule
  4. Select Port and click Next
  5. In the Protocol and Ports dialog box, select UDP.
  6. Select Specific Port Numbers and then type the port numbers: 1434
  7. Select Next until get to 'Specify the name and Description of this Rule" screen
  8. Enter name for Inbound Rule (for instance SQL - UDP)
  9. Select Finish

Open access to SQL Server when using dynamic ports

  1. Open Administrative Tools, Windows Firewall with Advanced Security console
  2. In the left pane of the console, select Inbound Rules
  3. Right-click select New Rule
  4. Select Program and click Next
  5. In the Program dialog box, select 'This program path.' Select Browse and navigate to Instance of SQL Server that you want to access through firewall, and then click Open. (Example: C:\Program Files\Microsoft SQL Server\MSSQL11\Instance_Name\MSSQL\Binn\Sqlserv,exe)
  6. Select Next until get to 'Specify the name and Description of this Rule" screen
  7. Enter name for Inbound Rule (for instance SQL - Dynamic)
  8. Select Finish

If error continues, verify TCP/IP is enabled for Sage 100 SQL Server Instance

  1. Open Start, All Program (or Apps), Microsoft SQL Server YYYY (YYYY = Year), Configuration Tools, SQL Server Configuration Manager
  2. Expand SQL Server Network Configuration
  3. Select the Protocols for the SQL Instance for Sage 100
    • Example: Protocols for SAGE100SQL
  4. If TCP/IP status is Disabled, right-click TCP/IP and select Enable
  5. To save changes, you'll need to Stop then Start the Sage 100 SQL Server Instance inside SQL Server Configuration Manager using the following steps:
    1. Select SQL Server Services under SQL Server Configuration Manager (Local)
    2. Right-click the SQL Server Instance for Sage 100 (Example: SQL Server (Instance_Name)) and select STOP
    3. Right-click the SQL Server Instance for Sage 100 and select START
    4. Exit SQL Server Configuration Manager

If you're using the Default SQL Server instance (MSSQLServer) and manually changed the PortID from 1433, use the steps below to resolve issue0

  1. Get everyone out of Sage
  2. Log into the Sage 100 Server
  3. Browse to the …\MAS90\Home\ folder
  4. Make a copy of massql.settings
    NOTE: if you’re hiding known file extensions the file name is ‘massql'
  5. Right-click massql.settings, select Open With
  6. Choose whether or not to ‘Always use this app to open .settings files’ then select Notepad
  7. Click OK
  8. Add the PostID after the Server name on the 3rd line
    Example:

    @Application
    CONNECT='Driver={SQL Server Native Client 11.0}';
    SERVERNAME,PORTID (Replace SERVERNAME with your SQL Server name and PORTID with the Port number you assigned to the SQL Instance
  9. Save changes
  10. Try printing from Sage 100
    NOTE: If the issue continues, try updating the PortID in the following Registry Key on ALL Sage 100 workstations
    • HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\MSSQLServer\Client\SNI11.0\tcp\Property1\Value. Change from 1433 to the PORTID you assigned the SQL Server Instance for your Sage 100 installation

DocLink: How to configure Windows Firewall for Sage 100 Advanced and Premium (video)
DocLink: Error: "SQL is not enabled" when opening Sage 100 Premium with TLS 1.0 and 1.1 disabled on SQL Server

[BCB:155:Chat 100 US:ECB]
Defect ID
Steps to duplicate
Related Articles