I have tried the folowing procedure that you had given to restrict access to database during a particular time period. But it doesn't work if I connect as system or sys, and also when I connect as some other user it gives the error "cannot kill current session". I have a requirement to restrict SQL*Plus access from the client machines and can only be connected to SQL*Plus from the server host. I tried the above method to acheive this, but didn't work due to the above reason. Could you please advise how I can achieve this?
Why would you possibly want to resrict SYSTEM or SYS from accessing your database? If your limit the time of day that these accounts can access your instance, then your DBAs will not be able to sign on and fix anything that breaks if until that time frame has passed. The AFTER LOGON triggers do not work for those with the DBA privilege. Tom Kyte discusses this in great detail on his AskTom Web site. Just type in "after logon trigger" in the search field. One thread pertaining to your exact problem can be found in the following URL: http://asktom.oracle.com/pls/ask/f?p=4950:8:310565931942668972::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:3236035522926,
For More Information
- Dozens more answers to tough Oracle questions from Brian Peasland are available.
- The Best Oracle Web Links: tips, tutorials, scripts, and more.
- Have an Oracle or SQL tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize. Submit your tip today!
- Ask your technical Oracle and SQL questions -- or help out your peers by answering them -- in our live discussion forums.
- Ask the Experts yourself: Our SQL, database design, Oracle, SQL Server, DB2, metadata, object-oriented and data warehousing gurus are waiting to answer your toughest questions.
Dig Deeper on Oracle database design and architecture
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.