I'm trying to establish a SQL Server connection to a SQL server database using SQLAlchemy, but when I enter bogus credentials, the SQL Server log (which I view using xp_readerrorlog) say there are two failed login attempts within a few milliseconds. Why are there two entries and how do I make each connection attempt log only one entry?
Thanks!
Python code:
import sys
from sqlalchemy import create_engine
username = "test3"
password = "12345"
db = "@servername/dbname?driver=SQL+Server+Native+Client+11.0"
connection_string = "mssql://domain\\" + username + \
":" + password + db
#
test_engine = create_engine(connection_string)
test_connection = test_engine.connect()
SQL Server log:
LogDate ProcessInfo Text
2015-08-04 00:00:18.670 spid26s This instance of SQL Server has been using a process ID of 4800 since 8/3/2015 4:00:36 AM (local) 8/3/2015 9:00:36 AM (UTC). This is an informational message only; no user action is required.
2015-08-04 12:26:12.590 Logon Error: 18456, Severity: 14, State: 5.
2015-08-04 12:26:12.590 Logon Login failed for user 'ENT\test3'. Reason: Could not find a login matching the name provided. [CLIENT: 10.122.162.41]
2015-08-04 12:26:13.000 Logon Error: 18456, Severity: 14, State: 5.
2015-08-04 12:26:13.000 Logon Login failed for user 'ENT\test3'. Reason: Could not find a login matching the name provided. [CLIENT: 10.122.162.41]
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire