There’s nothing more annoying than having to email, call, or log a support ticket to have one of your accounts reset. This is no less annoying in the Oracle database. Those pesky security folks have determined that your password should only be valid for X days, and your time is up. Time to reset the password!
Except…you can’t log into the database to reset your password.
What now?
Wait a second, look at this nifty thing I see in SQL Developer:
The JDBC Driver Doesn’t Support This Operation
We can’t make this call over the Oracle JDBC layer, because it hasn’t been implemented. However our primary interface, OCI, does indeed support this. In order to use the Oracle Call Interface (OCI), you need to have an Oracle Client on your machine.
The good news is that this is fairly easy to get going.
The Instant Client will do.
You have two options, the full or ‘Lite’ Instant Clients. If you want SQL*Plus and the other client tools, go for the full. If you just want the basic drivers, go for the Lite.
Make sure you get a 32 bit Instant Client if you run 32 bit SQL Developer or 64 bit if you run 64
Mind the version of Oracle too!
You want to be at the same level or higher of the database you’re working with.
You can use a 11.2.0.3 client with 11.2.0.1 database but not a 10gR2 client with 11gR2 database.
Clear as mud?
Download and Extract
Put it where you want – Program Files is as good as place as any if you have the rights. When you’re done, copy that directory path you extracted the archive to, because we’re going to add it to your Windows PATH environment variable.
The easiest way to find this in Windows 7 is to open the Start dialog and type ‘path’. In Windows 8 you’ll cast your spell and wave at your screen until something happens.
Now with that set, let’s start up SQL Developer.
Check the Connection Context menu again
What happened there?
SQL Developer looks to see if it can find the OCI resources. Guess where it looks? That’s right, the PATH. If it finds what it’s looking for, and confirms the bit level is right, it will activate the Reset Password option.
We have a Preference to ‘force’ an OCI/THICK connection that gives you a few other edge case features, but you do not need to enable this to activate the Reset Password.
There are a few actual benefits to using OCI powered connections, but that’s beyond the scope of today’s blog post…to be continued.
Ok, so we’re ready to go.
Now, where was I again?
Right click on your connection and now choose ‘Reset Password’

You’ll need to know your existing password and select a new one that meets your databases’s security standards.
I Need Another Option, This Ain’t Working!
If you have another account in the database, you can use the DBA Panel to reset a user’s password, or of course you can spark up a SQL*Plus session and issue the ALTER USER JEFF IDENTIFIED BY _________; command – but you knew this already, yes?
I need more help ‘installing’ the Instant Client, help!
There are lots and lots of resources out there on this subject. But I also know from personal experience that many of you have problems getting this to ‘work.’ The key things to remember is to download the right bit level AND make sure the client install directory is in your path. I know many folks that will just ‘install’ the Instant Client directly to one of their ‘bin’ type directories. You can do that if you want, but I prefer the cleaner method. Of course if you lack admin privs to change the PATH variable, that might be your only option.
Or you could do what the original ORA- message indicated and ‘contact your DBA.’








Twitter
RSS
GooglePlus
Facebook
Nov 15, 2012 @ 08:45:31
I have a write-up on installing the Instant Client on Ubuntu. It’s the first half of http://maxolasersquad.blogspot.com/2011/04/cxoracle-on-ubuntu-1104-natty.html
Nov 15, 2012 @ 09:19:35
Thanks for sharing! Ubuntu is a pretty popular Linux distribution, so I’m sure this will come in handy
Nov 15, 2012 @ 10:39:56
Thanks for the tip and help Jeff!
In my case it appears the Installer actually set the PATH correctly. Will wonders never cease.
Nov 15, 2012 @ 10:45:22
It is nice when things work, even if it does surprise us
Dec 04, 2012 @ 10:36:34
Jeff,
I am having a hard time getting path setup so i can use reset pw. My oci.dll is located at c:\oracle\ora112\bin. I created a path c:\oracle\ora112\bin\oci.dll and restarted sql developer. pw reset is still grayed out.
Dec 04, 2012 @ 11:38:35
When you say you ‘created a path’ – do you mean you modified the EXISTING path environment variable on your Windows machine? If so, make sure it’s listed at the front of the directory string so it’s found first.
Dec 04, 2012 @ 11:49:15
I have it listed very first. does my path definition look correct?
Dec 04, 2012 @ 11:55:28
You installed a 32 bit or 64 bit client to ‘c:\oracle\ora112′ ? You don’t need the \bin, but that shouldn’t hurt anything. I don’t think it’s necessary but a restart of SQLDev and/or Windows might be in order.
When you attempt to connect, do you get any error messages in SQL Developer? You have set the Advanced OCI option to ‘true,’ yes?
Dec 04, 2012 @ 12:31:25
rebooted. no dice. running 32.
Dec 04, 2012 @ 12:34:32
yes, i have use oci/thick checked in preferences>database>advanced
Dec 04, 2012 @ 13:20:16
keeps getting better. manually changed my pw through sql plus. cant get my results to export. hung up at row 137590. hit my sql developer frustration limit for the day!
Dec 04, 2012 @ 13:24:16
Export to…Excel? Yeah, we have a known issue with the JVM being consumed on XLS exports. You can increase the amount of memory OR you can export to CSV instead. So sorry for all the headaches today.
Feb 17, 2013 @ 16:51:31
As a dba, I create new accounts with expired passwords, this is a common-sense policy to protect and enforce security.
However SQL Dev is not intuitive on this. Sure I know about right click, but 50% of the users do not find it.
I really would consider a huge improvement if sql developer could catch the ora exception and simply prompt for a password instead of displaying the “contact your admin” message. Changing user password is (as well as alter tablespace add datafile) one of the most boring task for a dba.
Cheers
Laurent