All of these sentences work: osql -E -d pubs -Q "select * from authors" -S localhost osql -E -d pubs -Q "select * from authors" -S 127.0.0.1 osql -E -d pubs -Q "select * from authors" -S [ReplaceWithTheIPAdress] osql -E -d pubs -Q "select * from authors" -S [ReplaceWithTheDNSName] but this doesn't work: osql -E -d pubs -Q "select * from authors" -S [ReplaceWithMyAlias] it returns "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection." I found a workaround which is to register the alias in the "SQL Server Client Network Utility"
osql -E -d pubs -Q "select * from authors" -S localhost osql -E -d pubs -Q "select * from authors" -S 127.0.0.1 osql -E -d pubs -Q "select * from authors" -S [ReplaceWithTheIPAdress] osql -E -d pubs -Q "select * from authors" -S [ReplaceWithTheDNSName]
osql -E -d pubs -Q "select * from authors" -S [ReplaceWithMyAlias]
Loading a page in IE This two addresses just load the page http://localhost/MySite/default.aspx http://[ReplaceWithTheDNSName]/MySite/default.aspx the next two show a window asking for credentials and after the credentials are entered the page is load http://127.0.0.1/MySite/default.aspx http://[ReplaceWithTheIPAdress]/MySite/default.aspx but the one using the alias shows a window asking for credentials BUT after the credentials are entered the page is NOT loaded and "unahutorized" error message is display http://[ReplaceWithMyAlias]/MySite/default.aspx the same problem shows up when calling a WebService from a net client program.
No Comments