Hello,
Good Morning.
I just want to ask, How can I execute an Link Server SP via SQL JOB.
My SP works like this
Create Procedure [TEST_Proc]
@RowCount INT OUTPUT
As
Begin
Set NCOUNT ON;
SET XACT_ABORT ON;
Begin Transaction
Insert Into Openquery(LINKSVR, 'Select Col1, Col2, Col3 from Link_Table')
select ColA, ColB, ColC from Local_Table
END
COMMIT TRANSACTION
END
When I manually execute the SP it is OK but when it is executed via SQL JOB it says that
"Execute as User: Networklocalsystem. LOgIN Failed for user Networklocalsystem [SQLSTATE 28000] (Error 18456). The step failed"
I have tried to change the SQL Server Log on into the Domain Admin but I still get the same error.