インスタンスは起動しているのにEnterprise Managerでログインしようとするとインスタンスが停止していると言われる件について

 Oracle10gをローカルにインストールし、startupでインスタンスを起動したのにEnterprise Manager(10gからWebになったやつです)でつなげようとしたらつながらないという現象と一日戦っておりました。

 どっかのログを見ると、SYSMANとDBSNMPユーザあたりのアカウントがロックされているようなエラーが出ているので、ロックを解除してみたが、こんどはパスワードが間違ってるぜーみたいなエラーが出ている。パスワードなんてどうやってシステムに教えればいいのだ。

 で、調べたら外国で同じ症状になっている人を発見。
 http://forums.oracle.com/forums/thread.jsp?forum=60&thread=234321&message=684839
 こたえは、2ページ目にある、この投稿です。

Re: Windows 10g EM: database status unavailable ( In Reply To : Windows 10g EM: database status unavailable )
Jul 9, 2004 3:23 PM
I saw a few people say that they had to drop their instances (or thought they did). An option is to issue the command "emca -x SID" This will remove the Database Control for that database. Then go into the database and manually set the passwords for SYSMAN and DBSNMP to something you like (and can remember). Then run DBCA and choose the reconfigure option. This will allow (by default, I think) you to put Database Control back in and set the passwords. Ensure you set them to the same passwords you just set in the database! When DBCA is done, you should be able to see your database status. This seems to be platform independent. I fixed my Linux instance.

 ようはいったんemca -X SIDでDB設定を初期化してから、SYSMANとDBSNMPのパスワードを手動で設定。するとDBCAでいじれるようになるので、その後、DBCAを再度起動して、もう一度設定しなおすとできるようです(このとき、アカウントごとにちゃんとパスワードを設定すること。まとめて設定してもうまくいきません)。

 なんじゃこの仕様。バグ?
 そもそも、アカウントがロックされているのに、Web画面上ではインスタンスが停止している、というエラー画面になるのが変。ちゃんと教えろ。