Hello everyone,
I am a beginner in Oracle and would like to take a question or even receive a suggestion. I am with the following scenario:
I am implementing data auditing on the banks of the applications that I develop in .NET, but I would like the time when my audit trigger is to register the inclusion / amendment / deletion Recover which user of the application (and not from the bank) performed to such operation, I would like to do this in a less coupled as possible.
In the applications where I use SQLServer, I implemented as follows:
There is an attribute in ConnectionString named Workstation ID that I can inform any value, and in the bank, through A trigger or procedure can recover the value that was informed at the time of connection to the bank.
With this implementation I do not need at no time to implement fields in the tables with the user code, or even mechanize in the methods of my application. Because the entire connection will have the user code.
I would like to know if there is a similar attributes in Oracle, or even some suggestion of how to implement this audit.
Thanks for those who can help me.
Workstation ID or similar in Oracle
-
- Rank: DBA Pleno
- Posts: 264
- Joined: Sun, 19 Aug 2007 8:18 pm
- Location: Ribeirão Preto - SP
Lucas de Souza
OCA Developer
Analista de sistemas
OCA Developer
Analista de sistemas
Ixi son, in Oracle has as yes ...
Look at this select
I hope I have helped;)
Look at this select
select trim(username), -- Usuário conectado no banco
nvl(trim(program),'PROGRAMA NÃO INDENTIFICADO'), -- Nome do programa que abriu a sessao não banco
trim(machine), -- Nome do computador na rede
trim(osuser), -- Nome do usuário da rede
trim(terminal) --Nome do computador
from v$session
where audsid = userenv('sessionid')
-
- Rank: DBA Pleno
- Posts: 264
- Joined: Sun, 19 Aug 2007 8:18 pm
- Location: Ribeirão Preto - SP
Lucas de Souza
OCA Developer
Analista de sistemas
OCA Developer
Analista de sistemas
Ueh ... Are you connecting on an Oracle bank ??
porque as far as I know all users have privilege to see the v $ session
now I do not know why this is happening, if anyone can help ....
porque as far as I know all users have privilege to see the v $ session
now I do not know why this is happening, if anyone can help ....
-
- Rank: Estagiário Pleno
- Posts: 4
- Joined: Tue, 01 Apr 2008 2:08 pm
- Location: Rio de Janeiro - RJ
Att.
Marcus Dorbação
Marcus Dorbação
Guys, I managed ... I assign some privileges to my user and it was ...
Just a question, is there any attribute that I can inform in the connectionstring of my application and recover via Query?
Type a value that I can inform anything, in SQL Server I use the Workstation ID attribute = id_usuario_aplication ... I would like to do something like Oracle.
does not wait and even more ...
Just a question, is there any attribute that I can inform in the connectionstring of my application and recover via Query?
Type a value that I can inform anything, in SQL Server I use the Workstation ID attribute = id_usuario_aplication ... I would like to do something like Oracle.
does not wait and even more ...
-
- Rank: DBA Pleno
- Posts: 264
- Joined: Sun, 19 Aug 2007 8:18 pm
- Location: Ribeirão Preto - SP
Lucas de Souza
OCA Developer
Analista de sistemas
OCA Developer
Analista de sistemas
Hmm .. well, I did not understand very well what you say ...
for the chi I intendi, you want something like global variables não é ??
This exists in Forms, but I do not understand well about it ....
More in SQLPlus you can recover the connected user's connection code Thus:
= D
for the chi I intendi, you want something like global variables não é ??
This exists in Forms, but I do not understand well about it ....
More in SQLPlus you can recover the connected user's connection code Thus:
select user from dual;
-
- Information
-
Who is online
Users browsing this forum: No registered users and 19 guests