Every database client has to answer the same question before it can run a query: where exactly is the database, and how do I reach it? Oracle and SQL Server answer that question in very different ways. If you manage both, or are moving between them, knowing the difference saves a lot of time when connections fail.
The short version
| SQL Server | Oracle Database | |
|---|---|---|
| What connects clients | The instance itself, plus SQL Server Browser for named instances | A separate listener process |
| Default port | TCP 1433 (default instance) | TCP 1521 |
| Discovery | Browser service on UDP 1434 tells clients a named instance’s port | Clients use tnsnames.ora, EZConnect or LDAP |
| Configuration | SQL Server Configuration Manager | listener.ora, tnsnames.ora, sqlnet.ora |
| How the database registers | Automatic | The database registers its services with the listener (dynamic), or they are listed in listener.ora (static) |
The thing most people get wrong
They assume “the port is open” means “the database is reachable”.
On Oracle in particular, the listener can be running and accepting connections on 1521 while not knowing about the database at all, for example straight after a restart, before the database has registered. The port test passes and the connection still fails.
How SQL Server does it
A default instance listens on TCP 1433. Clients connect to the server name and that is usually it.
A named instance (for example SERVER\SQLEXPRESS) normally uses a dynamic port. The SQL Server Browser service listens on UDP 1434 and tells the client which TCP port to use.
Common causes of failure:
- SQL Server Browser stopped or disabled, so named instances cannot be found
- UDP 1434 or the instance’s TCP port blocked by a firewall
- TCP/IP protocol disabled in SQL Server Configuration Manager (common on Express editions)
- A dynamic port that changed after a restart, while a firewall rule was written for the old one
Our usual fix for production named instances: set a fixed TCP port, open that port only, and stop relying on discovery.
How Oracle does it
Oracle uses a separate listener process, configured in listener.ora, on port 1521 by default. The database registers its services with the listener, either automatically (dynamic registration) or through static entries in listener.ora.
Clients find the database through tnsnames.ora entries, EZConnect strings (host:port/service) or a directory such as LDAP.
Our checklist when an Oracle connection fails
- Service name mismatch between the client’s
tnsnames.oraand what the listener actually offers. - The database has not registered yet, common right after a restart.
lsnrctl servicesshows what the listener knows about. - Port open, database not registered. The connection reaches the listener and is refused (ORA-12514).
- Static versus dynamic registration confusion, especially with several databases on one server.
- Several databases on one listener without anyone checking which services each provides.
- A firewall silently dropping traffic somewhere in between.
lsnrctl status and lsnrctl services answer most of these in seconds, which is why they are the first thing we run.
In Oracle E-Business Suite environments, listener problems show up as login failures, concurrent manager problems or patch sessions that will not connect, so listener checks are part of every health check.
A real fault, and two common ones
- An intermittent ORA-03113 in production. The database was healthy. Short network drops between the application and database servers, combined with an LDAP connection timeout of only two seconds, broke connections at random. Raising the timeout stopped the errors while the network issue was traced. Read the ORA-03113 case study.
- A named SQL Server instance that “disappears” after a restart. If it uses a dynamic port and the firewall rule was written for the old one, clients can no longer reach it. A fixed port prevents it.
- Ambiguous service names. With several databases behind one listener, a vague client entry can connect to the wrong one. Use explicit, unique service names in client configuration.
Quick checks to keep handy
- SQL Server: is the instance running, is TCP/IP enabled, which port is it on, is Browser running for named instances?
- Oracle:
lsnrctl status,lsnrctl services, does the service name match the client, can youtnspingit? - Both: test the port from the application server itself, not from your laptop.
If your team runs SQL Server, Oracle or both and wants help with connectivity, tuning or day-to-day care, see our database administration service.
Questions
Quick answers
What port does the Oracle listener use?
1521 by default, configured in listener.ora. It can be changed, and clients then need the new port in tnsnames.ora or their connection string.
What does the SQL Server Browser service do?
It listens on UDP port 1434 and tells clients which TCP port a named SQL Server instance is using. Default instances usually listen on TCP 1433 and do not need it.
What does ORA-12514 mean?
The listener is running but does not know the service name the client asked for. Usually the database has not registered with the listener yet, or the service name in the client configuration does not match.