Re: Trigger**

From: avnrao (avn_at_newsgroups.com)
Date: 11/25/04


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
>
>
>
>
>



Relevant Pages

  • Re: Error 3011
    ... Is the Destination database the same version as the source. ... That might make it more palatable to the ObjectType ... For Each frm in CurrentProject..AllForms ...
    (microsoft.public.access.modulesdaovba)
  • Re: code access security
    ... Error 1 CREATE ASSEMBLY for assembly 'GmsSqlClr' failed because assembly ... owner has EXTERNAL ACCESS ASSEMBLY permission and the database has the ... make sure the database owner is mapped to the correct login on ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Setting up destination database using dynamic properties task/global variable
    ... Normally I need to change the database but the table name stays the same, so I just manually remove the database qualifier from the object name through Disconnected Edit, and that way I only need to manage the ... destination database server, database name, user id and password. ... added a dynamic properties task and have assigned the global variables ... Say I have created the package with destintaion as Northwind1 and I have ...
    (microsoft.public.sqlserver.dts)
  • Re: moving oracle database 9 from another computer to another one
    ... Installing Oracle 9.2.0.4 on the destination machine ... Creating a controlfile script by issuing the 'alter database backup ...
    (comp.databases.oracle.server)
  • Re: low permission cannot convert from A97 to A2000/2003
    ... Delete is a separate permission. ... You need open exclusive permission on the database to ... > The admin user has full privileges. ... > as we wont be importing those files from them, and the contractor will be ...
    (microsoft.public.access.conversion)