Hello,
I'm trying to query a SQL 2005 database/server using vbscript running windows PE 2.1 (Vista + SP1). If it works I can finaly use the database to lookup the computername for OS-deployment.
I tried a lot of things but still get an Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON' error.
I know this is caused by the nature of windows PE which uses Local Anonymous account for network connections. The SQL server is a domain connected Microsoft SQL 2005 server. The log shows me :
Logon Error: 18456, Severity: 14, State: 11.
Logon Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. [CLIENT: 1.2.3.4]
This state means the login was valid but server access failed.
For connction I use the following connection string :
sConnectString = "Provider=SQLOLEDB;Data Source=servername;Initial Catalog=database;User ID=domain\username;Password=password;Integrated Security=SSPI"
The user is a domain user. I tried this script on a domain connected windows (win 7) machine and it works, so the trouble is in the local anonymous user network connections.
Does anybody knows how to solve this problem or an other smart secure way to query a ms sql database under windows PE 2.1 ?
Thanks.
Page 1 of 1
Windows PE and SQL connection Error 'NT AUTHORITY\ANONYMOUS L
#2
Posted 21 September 2011 - 09:05 AM
Did you build your WinPE with the MDAC package?
There's not a lot of info about how to exactly use it but you can find some topics about using MDAC in WinPE to talk to MSSQL. such as
http://www.eggheadca...m-mdt-2008.aspx
There's not a lot of info about how to exactly use it but you can find some topics about using MDAC in WinPE to talk to MSSQL. such as
http://www.eggheadca...m-mdt-2008.aspx
#3
Posted 21 September 2011 - 02:23 PM
To fix this kind of behavior you might try to authenticate with :
Note if the IPC$ share doesn't work try any shared folder (or create one).
net use \\remotesqlservername\ipc$ /u:domain\username passwordbefore trying your connexion to the SQL server.
Note if the IPC$ share doesn't work try any shared folder (or create one).
#4
Posted 13 January 2012 - 10:05 AM
I was having the same issue.
I used the following connection string.
"Provider=SQLOLEDB.1;Persist Security Info=False;User ID=<User ID>;Initial Catalog=pubs;Data Source=<YourDataSourceName>;Network Library=dbnmpntw"
http://support.microsoft.com/kb/238949
HTH,
W
I used the following connection string.
"Provider=SQLOLEDB.1;Persist Security Info=False;User ID=<User ID>;Initial Catalog=pubs;Data Source=<YourDataSourceName>;Network Library=dbnmpntw"
http://support.microsoft.com/kb/238949
HTH,
W
Share this topic:
Page 1 of 1



Help
Back to top










