Delete user of oracle 12c through powershell scripting

Hi Experts,

I am using oracle database 12C. I have to delete users of this database And kindly let me know how PowerShell will make connection with oracle database? Integration part ?
member 01Asked:
Who is Participating?
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.

Geert GOracle dbaCommented:
powershell ???
can you fix a car with a pen  ?
use the right tool for the right job

install an oracle client
then you will have sqlplus
use sqlplus to
login with a dba user, which requires you to know the password
or login with sys ...

then execute "drop user user_name"
johnsoneSenior Oracle DBACommented:
While I believe that the SQL*Plus route is probably the easiest way to go, you can actually do this in PowerShell.  Installing a full client is not required (although the ODAC install does include instant client).

I saw something about this recently and decided to do some research.  Turns out PowerShell has some sort of .Net framework built into it.    There is a pretty good article about that here.  It includes an example, but that really relates to SQL Server which has some built in access with PowerShell.

To connect to Oracle, you need to install ODP.NET, you can get that here.

Then this is a pretty good example of how to connect to Oracle through PowerShell.

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
slightwv (䄆 Netminder) Commented:
>>To connect to Oracle, you need to install ODP.NET, you can get that here.

Go with the Managed Client.  There is no "install".  Single DLL and proper references and you are good to go.

Disclaimer:  Yes, I've seen quick .Net code run in Powershell.  I've never done it personally.
PberSolutions ArchitectCommented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

-- johnsone (https:#a42060329)
-- Geert Gruwez (https:#a42059196)
-- slightwv (䄆 Netminder) (https:#a42064110)

If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

Experts-Exchange Cleanup Volunteer
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

From novice to tech pro — start learning today.