Dont want user to connect to connet through SQL plus? [message #119072] |
Tue, 10 May 2005 09:15 |
sunil_v_mishra
Messages: 506 Registered: March 2005
|
Senior Member |
|
|
hi
My question is as below....
I dont want user to connect through SQL*plus on database .... As a DBA What query i should write to to do this?
Note:- I know there is a simple query that DBA can type to do this but right now i m not getting it..
so please if any one know query to solve my problem than please let me know.
thank you
From :- sunil
|
|
|
|
|
|
Re: Dont want user to connect to connet through SQL plus? [message #119105 is a reply to message #119082] |
Tue, 10 May 2005 10:53 |
DaljitSingh
Messages: 4 Registered: May 2005
|
Junior Member |
|
|
Hi,
You can write the following LOGON trigger to prevent SQLPLUS sessions on your DB.
CREATE OR REPLACE TRIGGER block_sqlplus
AFTER LOGON ON DATABASE
DECLARE
v_prog sys.v_$session.program%TYPE;
BEGIN
SELECT program INTO v_prog FROM sys.v_$session
WHERE audsid = USERENV('SESSIONID')
AND audsid != 0; -- Allow SYS Connections
IF UPPER(v_prog) LIKE '%SQLPLUS%' THEN
RAISE_APPLICATION_ERROR(-20001, 'SQL*PLUS users not allowed on Database');
END IF;
END;
/
SHOW ERRORS
Daljit Singh
|
|
|
|
|
|
|
|
|
Re: Dont want user to connect to connet through SQL plus? [message #124200 is a reply to message #124199] |
Thu, 16 June 2005 17:10 |
|
Mahesh Rajendran
Messages: 10708 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
>>I dont want this user to login using sqlplus or any other tool. He should be able to perform the batch job though.
without logging into database, what is 'USER' about to do?
He can do anything he wants with without ever logging into database.
May be you are actually lookinto writing a procedure (job), and scheduling the procedure using DBMS_JOB (within oracle).
THus, the user is not actually logging into database with any external means.
[Updated on: Thu, 16 June 2005 17:11] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|