PSExec – Problems connecting to MSSQLServer

PSExec – Problems connecting to MS SQL Server

Microsoft – SysInternals Tool allows one to remotely connect to a machine and execute commands

Sample Command


psexec \\server-name cmd.EXE /c "sqlcmd -S DBServer -E -Q "select SYSTEM_USER " "

Error Message:


Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

Resolution:

Explicitly specify the domain-user name & password.


psexec -u LAB\JoeSimpson -p jsimp \\LABSERVER cmd.EXE /c "sqlcmd -S DBLAB -E -Q "select SYSTEM_USER " "

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s