1- Introduction and background: It has been suggested that there is a relationship between vitamin D deficiency and glucose metabolism in type 2 diabetes. This association has not been studies in Iran so far. 2 – Objectives: we aimed to determine the effect of vitamin D on insulin resistance in patients with type 2 diabetes. The other aim was prevention of diabetes by supply vitamin D in serum. 3 – Design: randomized controlled double-blind clinical trial; the overall follow-up period was 3 month for each subject , they will be randomly divided into two groups of intervention and control 4 - Setting and conduct: At the start of study and after 90 days all patients will be evaluated for body mass index, waist to hip ratio, blood pressure, glycosylated hemoglobin, fasting blood sugar, triglyceride, insulin, homeostasis model assessment index and 25 - hydroxy vitamin D3. 5 - Inclusion criteria: treatment with oral hypoglycemic agents, optimal control: HbA1C (<7.5%) Exclusion criteria: gross deficiency vitamin D, renal failure, uncontrolled diabetes, daily intake of multivitamins, intake of oral vitamin D in the last month or injected in the past six months, uncontrolled hypertension 6 - The intervention group will receive one intramuscular injection of 300,000 international units of vitamin D3 and the control group will receive placebo. 7 - The main outcome (variables): 25 - hydroxy vitamin D3 level, glycemic status, insulin and homeostasis model assessment index will be compared in the two groups.