The gods were unable to perform the rites without the Vedas and Brahma was incapable of creation. At that time, Shakti, the female power of Shiva helped Vishnu in the recovery of the Vedas. Vishnu assumed the form of a boar and brought back the Vedas. See : Das Avatars (boar incarnation).
References :
1. Kohli,Surindar Singh ed,Dictionary of Mythological References in Guru Granth Sahib 1993