oracle auto star suspection

Tags:
Oracle
after i login into oracle at scott user, immediately my own user defined programme like(tamil.sql) will run automatically (like autoexec.bat in dos). what sould do ?

Answer Wiki

Thanks. We'll let you know when a new response is added.

I think you are talking about an AFTER LOGON trigger.

You can define a trigger that will fire after connecting to the database.

Here is an example:

<pre>CREATE TABLE connection_audit (
login_date DATE,
user_name VARCHAR2(30));</pre>

<pre><b>CREATE OR REPLACE TRIGGER logon_audit
AFTER LOGON ON DATABASE
BEGIN
INSERT INTO connection_audit
(login_date, user_name)
VALUES
(SYSDATE, USER);
END logon_audit;
/</b></pre>

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: