If you are in possession of a valid residence visa, and have stayed outside UAE for over six months, your visa automatically becomes invalid or expired, but, it is a good idea to cancel that, else, you might be denied a new visa when you want to go into the country next moment. The permanent visa is dependent on the need and requirements.