No cheat codes unlock Doc Ock as playable or alter his boss fight in Spider-Man 2 (PS2). The game has no character-specific cheats.
General cheats (enter at main menu):
These reduce challenge; no Doc Ock-specific codes exist.