Does the moves secondary effect still occur if the move is not effective? Ex. Kingdra uses Clear smog on dialga. Does dialga's stat changes revert to normal?
No, if a move does not effect the target then nothing happens. Source: personal experience.