-
very funny oracle error
Hi All,
I am trying to modify a nullable column to make it NOT NULL and getting this error ORA-01442. When I query the USER_TAB_COLUMNS it shows the NULLABLE column as 'Y' but even then the alter table command is throwing error. When I tried the same thing thru TOAD , I got the same error message. The schema browser of TOAD is showing this column as nullable and even then when I try to make it NOT NULL, it is failing. The error message in both cases is : ORA-01442: column to be modified to NOT NULL is already NOT NULL
I am not sure about how can this be ever possible. Pls let me know what is happening with my tables? It seems somehow the oracle tables are not getting updated. After I made the same column null and re-ran the alter stmt to modify the column to NOT NULL, it worked fine.
I have never seen such a funny thing happening with my database. Pls correct me if you can spot the mistake that I have been doing to get this error.
Regards
Parijat
----------------------------------------------------------------------
SQL> SELECT TABLE_NAME , COLUMN_NAME, NULLABLE
FROM USER_TAB_COLUMNS
WHERE
COLUMN_NAME = 'STRATEGY_STATUS_IND' AND
TABLE_NAME = 'ORG_STRATEGY';
TABLE_NAME COLUMN_NAME NULLABLE
----------------------------------------------------------------
ORG_STRATEGY STRATEGY_STATUS_IND Y
----------------------------------------------------------------
SQL> alter table ORG_STRATEGY modify (STRATEGY_STATUS_IND NOT NULL )
ORA-01442: column to be modified to NOT NULL is already NOT NULL
----------------------------------------------------------------------
-
by any chance did u switch to stand by server and that prior this table was in no logging mode? ( coz i faced such issue )
funky...
"I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."
"Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"
-
The database is not a standby one. The logging option is set to on for the table.
Parijat
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|