marshalleboc Posted September 21, 2011 Share Posted September 21, 2011 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. Link to comment Share on other sites More sharing options...
Tripredacus Posted September 21, 2011 Share Posted September 21, 2011 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 ashttp://www.eggheadcafe.com/software/aspnet/33312294/problem-using-ado-in-the-winpe-image-from-mdt-2008.aspx Link to comment Share on other sites More sharing options...
allen2 Posted September 21, 2011 Share Posted September 21, 2011 To fix this kind of behavior you might try to authenticate with :net use \\remotesqlservername\ipc$ /u:domain\username password before trying your connexion to the SQL server. Note if the IPC$ share doesn't work try any shared folder (or create one). Link to comment Share on other sites More sharing options...
willwin7 Posted January 13, 2012 Share Posted January 13, 2012 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/238949HTH,W Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now