Skip to content
English
  • There are no suggestions because the search field is empty.

Connecting portier Companion to Microsoft SQL Server (Correct Host Configuration)

When connecting portier Companion to a Microsoft SQL Server, the server must be entered in the correct format. Important: With MS SQL Server, the server and port are separated by a comma, not a colon.

Basic Rule

Syntax:

ServerName or IPAddress,Port

Example:

192.168.1.50,1433

Incorrect:

192.168.1.50:1433   βŒ

Typical Configurations

1. SQL Server on the Same Machine (Local)

localhost,1433

or

127.0.0.1,1433

2. SQL Server on a Network Server (Including Custom Ports)

If SQL Server runs on another machine in the network:

Default port example:

192.168.1.50,1433

Custom port example (very common in customer environments):

192.168.1.50,50100

If your SQL Server is configured with a custom static port (e.g. 50100), that port must be used.


3. Named Instance (e.g. SQLEXPRESS)

For named instances, use:

SERVERNAME\SQLEXPRESS

In this scenario:

  • No port needs to be specified manually
  • SQL Browser (UDP 1434) is used for instance discovery
  • The actual database port is resolved automatically
  • The resolved port is often a dynamic high port (e.g. 50345)

You do not need to know or configure the dynamic port manually.

For clarity and simplicity, it is not recommended to combine named instance and fixed port in standard setups.


Technical Requirements

To ensure successful connection:

  • TCP/IP must be enabled in SQL Server Configuration Manager
  • The SQL Server port (e.g. 1433 or custom like 50100) must be open in the firewall
  • SQL Browser service must run when using named instances
  • UDP port 1434 must not be blocked (required for instance discovery)
  • SQL authentication must be enabled if SQL login is used
  • Database user permissions must be correctly configured

Common Issues

Problem Possible Cause
Connection fails immediately Colon used instead of comma between server and port
Connection timeout Firewall blocking SQL port (1433 or custom port)
Named instance not found SQL Browser service not running
Named instance not found UDP port 1434 blocked (instance discovery fails)
Login failed Incorrect credentials
Login failed SQL authentication not enabled
Works locally but not remotely TCP/IP disabled
Server not found SQL Server service not running
Cannot connect to database 'X'. Switching to database 'master'. Database offline, missing, or insufficient permissions

Explanation:

β€œCannot connect to database 'X'. Switching to database 'master'.”

This message means:

  • The SQL Server connection itself works
  • But the configured target database cannot be opened

Typical reasons:

  • Database name is misspelled
  • Database was renamed or deleted
  • Database is set to Offline
  • Database is in Restoring / Recovery state
  • The SQL login has no permission for that database

In this case, SQL Server connects to the server but falls back to the default master database.


Summary

  • Always use a comma between server and port
  • Use custom port numbers if configured (e.g. 50100)
  • For named instances, use SERVERNAME\INSTANCENAME only
  • SQL Browser handles dynamic ports automatically
  • Ensure UDP 1434 is open for named instances

Correct:

192.168.1.50,50100

Incorrect:

192.168.1.50:50100