Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Cross Database Different User

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-11-03 : 07:48:14
Rob Hudson writes "Hi

I don't know if this is possible and may well not be possible but, here goes...

I am connecting to SQL Server using a user account. The SP that gets executed updates/deletes/inserts into a table. When this occurs it fires a trigger that updates/deletes/inserts into a different table in a different database (same server).

The jobs fails with a permissions error when the trigger fires, informing me that the user is not setup on the different DB. Which is correct. It is not possible for me to create the user (for one reason or another) on the different DB. So is it possible to execute the statement as a different user? for example as a user that does exist on the different DB.

If I execute the statement on local DB as sa, the trigger fires correctly.

Does that make sense?!?

Any help would be ace :D

Cheers
Rob

ps. SQLy 2000, sp3"

chadmat
The Chadinator

1974 Posts

Posted - 2003-11-03 : 13:24:38
You need to figure out why you can't create the user in the other database. That is the answer.

-Chad

http://www.clrsoft.com

Software built for the Common Language Runtime.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-11-03 : 15:39:27
The account that you are using must have permissions in the other database in order for the trigger to work.

Tara
Go to Top of Page
   

- Advertisement -