Msg 3121 on restore, created with dbisql client
I’m running on ASE 15.5 ESD 5[.2, etc] Linux RHEL 6, 64bit, and had an amusing experience with restore you might want to know about.
I restored a database I have been building on another server, and got several instances of this message:
Recovery of database ‘rt_test’ will undo incomplete nested top actions
Msg 3121, Level 16, State 1:
Index Broker_BrokerCategory.pk_Broker_BrokerCategory (objid=44524161,indid=2) may be invalid. It uses CHAR or VARCAHR columns in its key and was created under a different sort order ID (0) or charset ID (0) that the ones on this server (SortOrd=50,CharSet=1)
Strangely, both the test server above and the production server where this database was created have the SortOrd 50 and CharSet 1 as their defaults. On the production server, I dropped and recreated the primary key constraints (in the production copy) using isql, and now dumps of the production database and loads on the test server no longer exhibit this error.
I think what I originally did was use dbisql to issue the commands to create the primary key constraints on these tables – the tables were empty at the time the constraints were added. I strongly suspect that the dbisql/jdbc session produced a different result than the same commands issued using isql.
You have been warned 🙂