SQLState = 28000, NativeError = 18456
Error = [Microsoft][SQL Native Client][SQL Server]Login failed for user 'NT AUTHORITY\SYSTEM'.
SQLState = 42000, NativeError = 4060
Error = [Microsoft][SQL Native Client][SQL Server]Cannot open database "select * from cycledate" requested by the login. The login failed.
NULL
This is the query.
SET QUOTED_IDENTIFIER OFF
declare @output varchar(5000)
SELECT @output ='bcp "select * from cycledate" out "c:\text.txt" -c -q -S -T'
EXEC master..xp_cmdshell @output
I tried to give elevated rights to NT\AUTHORTY\SYSTEM but still get the same error. Has anyone run into this and if so what was your solution
thanks