Home » Server Options » Replication » GG Replicat process using sys vs ggadmin
GG Replicat process using sys vs ggadmin [message #623603] Thu, 11 September 2014 14:11 Go to next message
pwisman
Messages: 4
Registered: September 2014
Junior Member
I have GoldenGate 12c on Windows 2012 server, using Oracle 12.1.0.1. I have successfully setup bi-directional replication between my 2 systems. I need to have triggers firing so NOSUPPRESSTRIGGER is in the replicat parameter file.

The problem I have is that we have some after update or after insert triggers that need to do some processing when it is NOT a replication event. I have a check for sys_context('userenv','current_user') and sys_context('userenv','session_user'), none of these get set to the ggadmin user. The current_user = the owner of the trigger, and the session_user = sys.

According to documentation, we should be able to check the user for ggadmin so we can filter processing. But this doesn't work, or at least what I did, using sys_context hasn't worked.

Does anyone know what is going on? Any suggestions would be greatly appreciated.

Thank you.
Re: GG Replicat process using sys vs ggadmin [message #623612 is a reply to message #623603] Thu, 11 September 2014 20:17 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
Are you committed to using Golden Gate? This would be trivial with Streams, you use dbms_ddl.set_trigger_firing_property to detect whether the action is from a replication event or not.

Yes, I know there is that comment in the docs about Streams being deprecated with release 12.1. Utter rubbish, is all there, it works as well as ever. It is also free, unlike Golden Gate.
Re: GG Replicat process using sys vs ggadmin [message #623613 is a reply to message #623612] Thu, 11 September 2014 20:47 Go to previous messageGo to next message
pwisman
Messages: 4
Registered: September 2014
Junior Member
Thanks for your reply John.

Unfortunately, we have to go to GG. We have a great Advanced Replication system in place now that works like a charm, but because it is deprecated in Oracle 12c we have to use GG. Streams falls in that same soon to be deprecated area. GG uses many Streams attributes. Probably why Streams hasn't been deprecated with 12c. According to some of the GG documentation using the trigger properties could be used in the replicat parameter, but I haven't gotten it to work.

Thanks.
Re: GG Replicat process using sys vs ggadmin [message #623618 is a reply to message #623613] Thu, 11 September 2014 22:27 Go to previous message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
Well, it is your database. Adv Rep is fully functional in 12.x. Like Streams, that comment in the docs is only to push you towards a more expensive but less functional solution. I certainly wouldn't do it. Sorry, I can't assist.
Previous Topic: ERROR OGG-00146 VAM function VAMRead returned unexpected result
Next Topic: Define unique index
Goto Forum:
  


Current Time: Thu Mar 28 11:14:29 CDT 2024