| Author |
Messages |
|
Jag3256 (guest)
 |
| 05/09/2008 6:22 AM |
Quote
Reply
Alert
|
I’m trying to execute a stored procedure from a SQL Server job. The SP copies data from one server in domain A to a server/database in domain B and I have tested this with straight code (not in a stored proc) and it works because I’m logged on with my Login, which has security access to do this. When the job is executed it uses : domain B\servicesql as a logon and gets: Executed as user: domain B\servicesql. Login failed for user ''. The user is not associated with a trusted SQL Server connection. [SQLSTATE 28000] (Error 18452). The step failed. Do you know of a way to force my logon inside the stored proc? |
|
|
|
|
Chip Andrews Posts:113
 |
| 05/09/2008 7:42 AM |
Quote
Reply
Alert
|
| If you are using SQL 2005 you can use the EXECUTE AS statement to do this. See Books Online for details. You will have to grant Impersonate rights to do this. |
|
|
|
|
|
|
|
|
|
Quick Reply |
 |
|
|
|