Change Tables data lost after nulltable error
We have faced an issue in production (not in test), where we added 2 columns in HP SM through cm3r dbdict.
After creation of 2 new fields ,we found that these 2 new fields were moved to NULL tabe automatically.We tried to change this field back to cm3rm3 table from NULL Table but were not able to do it(while doing this system was getting hanged, we did several tries).
So we changed to m3 table though system navigator -->tables -->cm3r --> selected the field name that we have created in dbdict and changed sql table alas into M3.
After doing this we found that all our cm3r dats got removed from database.
We want to know what is the rootcause for this,kindy help.
Have you tried regen IR? Regen IR won't delete any data but it will regenerate the table keys.
Idealy when you do modification to dbdict fields you should regen.
If you find that this or any post resolved your issue, please be sure
to mark it as an accepted solution.
Please also give kudo if you find it interesting 🙂
Do not know the rootcause but it is not recommended to do anything to dbdict.
Also mapping of field may take hours or so depending on records and structure of dbdict and meanwhile client will remain hang.
Assign Kudo, if found post useful and mark it accepted if solves the issue.
The SM Regen IR function does not regen keys/indexes except for the IR key. All other indexing funtions must be performed using the RDBMS.
If you need to regen the indexes for the table, you need to perforn the index rebuild using the database commands.
The only reason I can think that your new fields in Prod were automatically set to NULLTABLE is because your SM id that connects to SQL doesn't have full rights to create/alter/drop in the database. It's quite possible that by trying to redo the mapping later, simply compounded the problem. Is the data still in your database? If it is you may be able to remap the dbdict to the tables.
Before you do any other prod changes to dbdicts, make sure that SM has create/alter/drop rights to the database. If you are restricted from letting SM alter tables in your environment, you will need to work with your dba to get the changes done by them first then remap or add your new fields and hand map the fields to the sql columns.
Thanks, I will look into this; also, we lost all cmm3r data from db and had to restore from DB (could not recover 3 hrs data). Client is asking for RCA and HP is replying that it seems to be manually deleted.