Hi,
I have created a Linked Server to connect my Server3 with the prod Server. I am basically writing a procedure to fetch the data from prod server to Server3 using linked Server and it seems to be working fine, when executed manually.
Now I have created a SQL Server Agent job to automate the Same, but the job keeps on failing with the error as given below:
Message
Executed as user: NT SERVICE\SQLSERVERAGENT. Named Pipes Provider: Could not open a connection to SQL Server [5]. [SQLSTATE 42000] (Error 5) OLE DB provider "MSOLEDBSQL" for linked server "SERVER\PROD" returned message "Login timeout expired". [SQLSTATE 01000] (Error 7412) OLE DB provider "MSOLEDBSQL" for linked server "SERVER\PROD" returned message "A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.". [SQLSTATE 01000] (Error 7412). The step failed.
I have the named Pipes Enabled and below is what I am using as the Configuration for the Job:
1) The owner of the job is me with Sysadmin Permissions
2) Run as User tab is set to blank
3) In the Linked Server I have created a mapping where under Local Login I have given my user and under the Remote mapping and Creds the credentials of the user having access to prod server have been given
4) Impersonate has been unchecked.
5) Login has been Set to -"Be made using Login's Current Security Context"
I am not sure What I am missing here and Why I am getting this error. I need urgent Help on this.
Thanks in Advance