I have to create a trigger to get where the Insert into a table happened from. There are many places that can Insert into my table LCF_CHECK_TABLE.
I want to be able to log a bad LCF Name(I already have this functionality) into this table from any number of our processes. I have a Create_By field and a Create_Date field that are defaulted to USER and SYSTIMESTAMP. I couldn't find anything that I can put as a default for CREATED_FROM field that will tell me where the Insert, into the table, came from. I have some code that uses the v$session table that has some of the values I want. If I could, Id like the username,machine and maybe a couple of more fields that would help me and I will save them to my field CREATED_FROM. If I could do this as a default for my field that would be ideal but if not then I will just create the trigger.
I essentially want to who what and where in my table so we can look back and have this info at our finger tips ....Anybody know how I can do this? Im thinking that maybe the v$session is not the table I need because its giving me all the session info and I just want info pertaining to a specific program, user and or machine?
Thanks in advance...