In a environment where multiple servers running SQL-Server 2005 support various databases i have to exchanga data and results between two databases running on different servers. The transact-sql scripts ic contained in a stored procedure called TransferLbToOc and is roughly like:
Insert Into Server2.Database2.Dbo.Table
Select *
From SourceView
The script runs on server1 in database1.
When invoke the stored procedure manually in the Sql Server Management Studio by 'Exec TransferLbToOc' it executes flawless but the procedure is invoked within a scheduled job in Sql Server Agent it fails.
This not only for this particular procedure but for al procedures involved with exchanging data between these databases and I can't figure out why.
Who can advise me