To determine incidence of dementia in type 2 diabetic (T2DM) patients, and whether there are adverse or favorable effects of oral agents (OA) in DM, we obtained a representative cohort of 800,000 from Taiwan’s National Health Insurance database. Those who, as of on January 1, 2000, were 50 years or older and dementia free (n = 127,209) were followed until December 31, 2007, in relation to absence (n = 101,816) or presence (n = 25,393) of T2DM, and whether any OA was used. Dementia was ascertained by ICD9-CM or A-code. Dementia incidence densities (DID) and fully adjusted Cox proportional hazard models were used to estimate association between dementia, DM, and OA. Notably, DID (per 10,000 person-years)was markedly increased with DM (without medication), compared to DM free subjects (119 versus 46). Using non-DM as reference, the adjusted hazard ratios (HRs) (95% confidence interval) for DM without and with OA were 2.41 (2.17–2.66) and 1.62 (1.49–1.77), respectively. For T2DM, compared with no medication, sulfonylureas alone reduced the HR from 1 to 0.85 (0.71–1.01), metformin alone to 0.76 (0.58–0.98), while with combined oral therapy the HR was 0.65 (0.56–0.74). Adjustments included cerebrovascular diseases so that non-stroke related dementias were found to be decreased in DM with sulfonylurea and metformin therapy. T2DM increases the risk of dementia more than 2-fold. On the other hand, sulfonylureas may decrease the risk of dementia, as does metformin; together, these 2 OAs decrease the risk of dementia in T2DM patients by 35% over 8 years.