Created
June 23, 2016 02:38
-
-
Save timyhac/d3da44d0d0d8dbabdba93ca9a4681c35 to your computer and use it in GitHub Desktop.
Test sql connection using sqlcmd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS C:\> sqlcmd -S 'localhost\SQLEXPRESS' -U username -P RealPassword -Q "select getdate()" | |
----------------------- | |
2016-06-23 12:37:12.523 | |
(1 rows affected) | |
PS C:\> sqlcmd -S 'localhost\SQLEXPRESS' -U -U username -P FakePassword -Q "select getdate()" | |
Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : Login failed for user 'username'.. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment