question

Steve 5 avatar image
Steve 5 asked

schema trigger with long datatype?

I'm not a dba so I'm not that familiar with the correct terms for some of the following. Sorry about that!

Can you have shcema synonm triggers on tables with long data types?

i.e. say you have a table schemax.table and the first column is numeric and another column in the table is a long datatype. A trigger is set up so that you can do a select/insert/whatever on the table using schema1.table and it would only effect rows with 1 in that first column, but you wouldn't have to specify that column in the where clause.

They're trying something similar to this at work and its screwing everything else because they can't get it to work on tables with the long or clob datatype.

oracle
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
sydoracle avatar image
sydoracle answered

Sounds like you should be looking at VPD. Check it out here:

http://download.oracle.com/docs/cd/B19306_01/network.102/b14266/apdvpoli.htm#sthref1877

A simpler mechanism is tom create a view over the table that only selects the rows with '1' in the first column and only do updates on/through the view.

10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.