Wednesday, March 28, 2012

ORA-20000: index "string"."string" or partition of such index is in unusable state

This kind of error i saw in our production database.
so first i checked that index status in all_indexes view, it was in unusable state. after that i tried to rebuild that index with that particular table_owner. for that i issued the below query.
sql>alter index table_owner.index_name rebuild online;
but it was giving the below error
ORA-02243: invalid ALTER INDEX or ALTER MATERIALIZED VIEW option
then i checked in all_indexes view that index is partitioned or not but it was not partitioned then i issued the below query so that became unusable state to valid.
sql>alter index table_owner.index_name rebuild parallel;
The above query causes the index to be rebuilt from the existing index by using parallel execution processes to scan the old and to build the new index








Thursday, March 1, 2012

PING[ARC1]: Heartbeat failed to connect to standby 'hcmsstby'

 This problem arises when standby server not getting archive logs from standby server. Here is the solution to fix this problem.

step1:- connect(go) to standby server log in as a system account.
step2:- then type the below command
SQL>recover standby database;
after executing this command it gives three options to recover file from main server. the options listed in below statement.
Specify log: {=suggested | filename | AUTO | CANCEL}
then specify which option is familiar to you. If you specified AUTO then automatically that statement only gives which log is needed for recovery then copy that log from main server then paste it in standby server. Then after that run the above commmand
SQL>recover standby database;
if their is no log is missing then standby server updates logs then logs will come automatically from main server to standby server. Then put standby server in managed mode. In this mode standby server automatically updates and logs will comes from main server. the command is listed below.
setp3:-SQL>recover managed standby database;
if you want to check the logs are updated in standby server then cancel this command using the below command.
step4:-SQL>recover managed standby database cancel;
then run that step2 command. then you will get log missing error message then cross check that archive log number in main server if that archive log is not exists in main server then you are standby server updated up to that  archive log. Then put your standby database is in managed mode using step3 command.



















ORA-28000: the account is locked


Cause: The user has entered wrong password consequently for maximum number
of times specified by the user"s profile parameter FAILED_LOGIN_ATTEMPTS, or
the DBA has locked the account

Solution:- Contact oracle dba or unlock the user account using below queries.

sql>alter user username unlock;
if the user is locked by user has entered maximum number of times wrong password then use the below query to unlock the account.
simple method.
sql>alter user username account unlock;
one more method.
sql>alter user username identified by new_password account unlock;