The penetration of distributed energy resources (DERs) is increasing dramatically. Due to the uncertainty of DERs, the operation of the distribution system is facing higher risks and challenges. To overcome such challenges, a two-stage chance-constrained convex AC optimal power flow (ACOPF) model is proposed in this paper, which can increase the economic efficiency of distribution system operation and manage the intermittency of DERs. In the first stage, a convex second-order cone programming (SOCP)-based ACOPF model is proposed in which the detailed models and limitations of DER, namely, demand response (DR), energy storage units, and rooftop PV systems are modeled to obtain participation ratio of DERs. In the second stage, Monte Carlo simulation is utilized to model the uncertainties of DERs. A probability violation index is introduced to make a trade-off between scheduling more DERs and imposing a higher risk to the distribution system. In this stage, power flow analysis is conducted for each scenario to determine the probability violation index of system. Then, a modified SOCP-based ACOPF is proposed to satisfy the system probability violation criterion. Simulation results illustrate that the proposed two-stage chance-constrained model improves economic efficiency and reliability of real-time operation of the distribution system.