I was used Logic Apps to refresh reporting tables. Now I am trying to use Elastic Agent Job to do that because of long-running time queries.
I understand the concept of target member and job etc. However, I have an issue with the credentials. In my case, I want to refresh my tables with the views that I created in the same database daily.
When shoul I use job_credential or refresh_cedential? I think in my case, I need to use refresh_credential but I'm not sure. I tried to test first, so I create a job 'CreateTableTest' that exist in the document.
When I query select * from sys.symmetric_keys I see I have a credential that has a key_guid :'xxx'. So I created this:
create database scoped credential refresh_credential with identity ='refresh_credential', secret = 'xxx'
Error: Failed to connect to the target database: Login failed for user 'refresh_credential'.
How can I solve it?