I execute a command (xp_cmdshell) , but i always receive this error:
Login failed for user 'teste'.
But the user is sysadmin and the password is correct.... and the functionality is already active in the surface area)
Here is the command that i execute:
Declare @osql varchar(8000)
Set @osql='EXEC master.dbo.xp_cmdshell '+''''+'osql -Uteste -Pteste -Q"DBCC Checkdb (''''securdb'''')" -o"C:\teste1.txt"'''''''
Can someone help?