Re: Trigger**
From: avnrao (avn_at_newsgroups.com)
Date: 11/25/04
- Next message: maryam rezvani: "Re: Trigger**"
- Previous message: maryam rezvani: "Trigger**"
- In reply to: maryam rezvani: "Trigger**"
- Next in thread: maryam rezvani: "Re: Trigger**"
- Reply: maryam rezvani: "Re: Trigger**"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 25 Nov 2004 11:53:41 +0530
if owner of table 1 and table 2 are same..then you shud not receive such an
error. are they same?
if table 2 is in another database, you must enable ownership chaining.
are you on SQL Server SP3? if so you must enable ownership chaining on that
particular database.
EXEC sp_configure 'Cross DB Ownership Chaining', 1
RECONFIGURE
for more ifnormation
http://www.windowsitpro.com/Windows/Articles/ArticleID/40963/pg/2/2.html
hth,
Av.
http://dotnetjunkies.com/WebLog/avnrao
http://www28.brinkster.com/avdotnet
"maryam rezvani" <rezvani@parskhazar.net> wrote in message
news:euKnmMr0EHA.1292@TK2MSFTNGP10.phx.gbl...
> Hi
>
> I've a following trigger which is fired in update status and make all
> changes
> to a new table successfully,I've a question:
> I just want by changing the emp_name column in first table the emp_name in
> second
> table changes(this happen by login L1 which has permission to the
> destination table)
> ,but when I change the emp_status (by another login which has not access
to
> the second
> table,an error occurred that you have no permission to update the second
> table) and that's
> correct,but how can I solve my problem ? I don't want to permit the login
L2
> to the destination
> table,but I don't want to recieve such an error like this too,
>
> Any help would be greatly thankful
>
>
>
> SET QUOTED_IDENTIFIER OFF
> GO
> SET ANSI_NULLS ON
> GO
>
> create TRIGGER dummy1
> ON [dbo].[emp1]
> FOR UPDATE
> AS
> update emp2 set
> emp_name= (select emp_name from inserted)
> where
> emp_cod= (select emp_cod from inserted)
>
> GO
> SET QUOTED_IDENTIFIER OFF
> GO
> SET ANSI_NULLS ON
> GO
>
>
>
>
>
- Next message: maryam rezvani: "Re: Trigger**"
- Previous message: maryam rezvani: "Trigger**"
- In reply to: maryam rezvani: "Trigger**"
- Next in thread: maryam rezvani: "Re: Trigger**"
- Reply: maryam rezvani: "Re: Trigger**"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|