To tilt the frame slightly, instead of increasing your caster levels to ridiculous heights, you can try to avoid getting your spells dispelled by just becoming immune to spells that dispel magic. While many spells dispel magic, unless the DM is Dumpster-diving to deliberately overcome your shored-up defenses, you only really need worry about the 3rd-level Sor/Wiz spell dispel magic [abjur] (PH 223) and the 6th-level Sor/Wiz spell greater dispel magic [abjur] (PH 223).1 The basic items that help do this:
- The ring of counterspells (DMG 230) (4,000 gp; 0 lbs.) counters once the spell that's cast in it after which it can be reloaded with the same or a different spell.
- The ring of spell-battle (Magic Item Compendium 127) (12,000 gp; 0 lbs.), in addition to other effects, grants the wearer 1/day the ability to redirect a spell that the wearer's identified that's cast on him at a different target within a limited range.
- The magic weapon special ability spellblade (Player's Guide to Faerûn 120) (6,000 gp; 0 lbs.) is keyed when created to one specific spell (like dispel magic or greater dispel magic but not both), and when that spell is cast upon the weapon's wielder he can either redirect the spell to the originator or have the spell dissipate.2
Note that of these only the ring of spell battle can, after its fashion, defend against area dispel effects.
Other similar magic items likely exist—as do shenanigans (like finding someone with the feat Craft Contingent Spell (Complete Arcane 77) and paying him to ensorcell you appropriately)—, but the above list probably holds the most convenient and palatable solutions.
1 Other spells that dispel magic include (but by no means are limited to) the 2nd-level Sor/Wiz spell arcane turmoil [abjur] (CM 96),
the 2nd-level Sor/Wiz spell dispelling touch [abjur] (Player's Handbook II 110), the 8th-level Sor/Wiz spell blackstaff [trans] (Magic of Faerûn 81), the 8th-level Sor/Wiz spell chain dispel [abjur] (Player's Handbook II 106-7), and the 9th-level Sor/Wiz spell reaving dispel [abjur] (Spell Compendium 169-70).
2 Many weapons can be wielded—often simultaneously—an not occupy a creature's hands. I suggest multiple surprise weapons (Complete Scoundrel 109-10).