Objectives, The aim of this study is comparison of sedative and analgesic effect of dexmedetomidin and fentanyl versus midazolam and fentanyl during colonoscopy. Design, in a randomized clinical trial after approval of the ethics committee of the Babol University of Medical Sciences, 60 hospitalized patients, who candidate for colonoscopy were consecutively assigned into two equal groups. Setting and conduct, after taking written consent about type of anesthesia, to both groups, if the rescue dose is need, propofol 0.5 mg per kg as a bolus will administered. Patients, anesthesiologists, colonoscopist and the patient’s examiner are blinded. The intervention group receives dexmedetomidine 1 mg per kg over 10 minutes and then 0.5 mg per kilogram per minute and fentanyl 0.5 microgram per kg and the control group receives midazolam 0.5 mg per kg maximum to 2.5 mg and fentanyl 0.5 microgram per kg before and during colonoscopy. Inclusion criteria: age 20-70 years; ASA class ≤ 3. Exclusion criteria: liver disease, kidney disease and addicted patients. Intervention, administration of dexmedetomidine 1 mg per kg over 10 minutes and then 0.5 mg per kilogram per minute and fentanyl 0.5 microgram per kg. Main outcome measures (variables), the depth of sedation based on the Ramsay scale, recovery time based on Aldret score equal to or greater than 9, the severity of pain according to the Visual Analogue Scale, colonoscopist satisfaction based on Likert scale.