PRB: Unable to Connect to SQL Server Through ODBC When Password Contains a Semi-colon

Article ID: 301076 - View products that this article applies to.
This article was previously published under Q301076
Expand all | Collapse all

SYMPTOMS

When you use SQL Server Authentication, a computer running SQL Server allows login passwords to be defined with semi-colons. When you attempt to connect to a SQL Server server through ODBC or OLEDB by using a SQL Server login whose password contains a semi-colon, an error message similar to the following occurs:
Unable to connect to server <servername>:

Server: Msg 18456, Level 16, State 1
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '<username>'.
This error message occurs when you use either the Query Analyzer or the SQL Enterprise Manager.

CAUSE

ODBC interprets the semi-colon as the end of the password, not part of the password itself.

RESOLUTION

Change the password and remove the semi-colon.

STATUS

This behavior is by design.

Properties

Article ID: 301076 - Last Review: October 30, 2003 - Revision: 3.2
APPLIES TO
  • Microsoft SQL Server 7.0 Standard Edition
  • Microsoft SQL Server 2000 Standard Edition
Keywords: 
kbprb KB301076

Give Feedback