Dental sedation is very safe. Simply verify that they have an experienced anesthesiologist if they are putting the child to sleep and that they have experience with pediatric patients (children), not just adults. If they don't have experience with sedating children, get a referral to a pediatric dentist who does.
It is perfectly fine for a 2 year old to undergo sedation for dental work. A number of children are sedated to have foreskin removed or scopes done. It will actually be easier on the child as they won't have to have a first hand experience of pain.
Oh, yes! Children undergo dental surgery all the time and the sedation your dentist will use if far safer and less dangerous than heavy sedation used in hospitals.
General anesthetic is never a perfectly safe procedure. Dentists often sedate children to make their own job easier - no squirming around. Unless the procedure involves minor surgery, think twice.