disable connect to database

i want to disable all user from access my oracle database includig user with admin privilage like system  ;
waleed ahmedassociate technical consultant Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

pcelbaCommented:
In Windows: Simply stop the Oracle service
On other operating systems also the possibility to stop the Oracle database exists. Just tell what OS do you use.

You should tell what is your main goal. Remember admins do have access to all files after stopping the Oracle service.
0
waleed ahmedassociate technical consultant Author Commented:
i want to do some thing on my database and i don`t want any user to login to the database including the user with admin privilage  
i used oracle linux 7.4 as os
0
pcelbaCommented:
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

waleed ahmedassociate technical consultant Author Commented:
i don`t want to stop database
i want to stop all user from login to database
just only me
0
johnsoneSenior Oracle DBACommented:
Not possible to keep anyone from logging in.  You can keep most people out, but not everyone.

I see 2 options.

Issue this command:

ALTER SYSTEM ENABLE RESTRICTED SESSION;

That will prevent anyone that does not have the RESTRICTED SESSION privilege from connecting.  Out of the box, that would be the SYS user and any user with the DBA role.

The other would be to create a logon trigger that just returns an error.  This should prevent everyone except SYS from logging in.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Alex [***Alex140181***]Software DeveloperCommented:
What about "just" stopping the Listener ("lsnrctl stop")?! If he's doing his database work directly on the server, he should be able to connect...
0
johnsoneSenior Oracle DBACommented:
Stopping the listener wouldn't stop anyone who has an account on the server from connecting.  It would also stop connections to all databases the listener serves and not just the one that you are working on.
0
johnsoneSenior Oracle DBACommented:
I forgot to mention....

To allow users to connect again, issue:

ALTER SYSTEM DISABLE RESTRICTED SESSION;

I'm sure everyone could figure that out, but just putting it out there.

In addition, if you were doing a restart, instead of STARTUP, use STARTUP RESTRICT.  Then it is enabled at startup and you can disable with the above command as well (without having to restart again).
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Databases

From novice to tech pro — start learning today.