This is my code:
SET @GETCommand = 'curl --silent -X GET -u user:password -H "Content-Type: application/json" "https://jira.com/rest/api/latest/.... > "C:\Test.txt"'
EXEC xp_cmdshell @GETCommand
When running it outside of Stored Procedure (SP), it takes 2 seconds, however when running it in SP it can take up to 2-3 minutes, why is that?
Please note that I must use variable (@GETCommand) since I've dynamic variables in the SET @GETCommand