Problem to execute following command shell for msg command through Sql Server 2008 r2
EXEC master..xp_cmdshell 'msg Curious.k /server:CuriousK-PC "Hello"'
And Output is : user.name does not exist or is disconnected NULL
But from command prompt its successfully executed and message sent to the require host.
c:\>msg Curious.k /server:CuriousK-PC "Hello"
At the same time following command is successfully executed
EXEC sp_configure 'show advanced option'
EXEC sp_configure 'xp_cmdshell'
Result of above both query is :
minimum maximum config_value run_value
0 1 1 1
EXEC xp_cmdshell 'del "E:\01. DailyBackup\MainDB.bak"'
exec master..xp_cmdshell 'net use t: "\\192.168.0.1\c$" My@Secrete007 /user:MyCoLocal\user.name'
EXEC master..xp_cmdshell 'copy t:\a.txt t:\b.txt'
EXEC master..xp_cmdshell "net use t: /delete"
All of above is executing perfectly but following command not work through sql server
EXEC master..xp_cmdshell 'msg Curious.k /server:CuriousK-PC "Hello"'