Good morning!
I have the following problem.
I need to get the user who is logged in to the PL and that is running something.
Ex: The guy goes and disables a trigger, can you get this in real run-time?
I'm waiting.
Abraxxx
Catch User Logged on the Bank
-
leandrolinof
- Rank: Programador Pleno

- Posts: 33
- Joined: Wed, 17 Feb 2010 6:30 am
- Location: Americana
-
diegolenhardt
- Moderador

- Posts: 1177
- Joined: Thu, 15 Oct 2009 10:28 am
- Location: Recife
I know there is a Database level trigger, which you monitors changes in the tables and objects type, maybe it would be the case that you put a trigger from these to send an e-mail I do not know, or serious in another table such information, To get the logged user searches for
USERENV Oracle, has several functions, machine name, domain, etc.,
USERENV Oracle, has several functions, machine name, domain, etc.,
-
victorhugomuniz
- Moderador

- Posts: 1396
- Joined: Fri, 01 Feb 2008 2:06 pm
- Location: Rio de Janeiro - RJ
- Contact:
select * from v$session;
select * from v$sql;
-
leandrolinof
- Rank: Programador Pleno

- Posts: 33
- Joined: Wed, 17 Feb 2010 6:30 am
- Location: Americana
Diegolenhardt
I did not understand what would use a field? A table? I am a programmer in the company our bank the administrative part the DBAs é who take care of the company's database so I do not have access. Would you tell me what the name of this trigger you said in the post?
VictorHugomuniz
These two selects that you gave me one has already done that it is the bad Session's V $ na can not get if the user logged in is doing an update in some trigger.
In v $ SQL I did not find where I can base myself to find what the user is doing at the moment, I did not find anything in the SQL_Text field that speaks of update from the sys.all_triggers table.
As I am half a layman in the subject of the bank I am kind of lost now.
I did not understand what would use a field? A table? I am a programmer in the company our bank the administrative part the DBAs é who take care of the company's database so I do not have access. Would you tell me what the name of this trigger you said in the post?
VictorHugomuniz
These two selects that you gave me one has already done that it is the bad Session's V $ na can not get if the user logged in is doing an update in some trigger.
In v $ SQL I did not find where I can base myself to find what the user is doing at the moment, I did not find anything in the SQL_Text field that speaks of update from the sys.all_triggers table.
As I am half a layman in the subject of the bank I am kind of lost now.
-
victorhugomuniz
- Moderador

- Posts: 1396
- Joined: Fri, 01 Feb 2008 2:06 pm
- Location: Rio de Janeiro - RJ
- Contact:
I do not know if it solves I know brother problem but ..
select username, vsql.SQL_TEXT from v$session vses, v$sql vsql where vses.sql_id=vses.sql_id;
-- para achar o seu update
vsql.SQL_TEXT like '%SYS.ALL_TRIGGERS%'
-
leandrolinof
- Rank: Programador Pleno

- Posts: 33
- Joined: Wed, 17 Feb 2010 6:30 am
- Location: Americana
VictorHugomuniz
It did not work it seems that he only moves me what the staff does in the system and not in the bank, I made the code below and he brought me nothing ...
I guess you can not do this via code. Only via adm. Bank !!!
It did not work it seems that he only moves me what the staff does in the system and not in the bank, I made the code below and he brought me nothing ...
Select OSUSER, username,
vsql.SQL_TEXT
From v$session vses,
v$sql vsql
Where vses.sql_id = vsql.sql_id
And vsql.SQL_TEXT like '%SYS.ALL_TRIGGERS%';
-
- Information
-
Who is online
Users browsing this forum: Bing [Bot] and 1 guest
