This paper proposes a control strategy of Battery Energy Storage System(BESS) for increasing the hosting capacity of the Variable Energy Resources (VER) in the distribution system by resolving any violation in bus voltages and line loading caused by the connection of VER. The effectiveness of the proposed algorithm was verified by study cases employing the real distribution system based test system in terms not only of the long term time-series simulation but also of the real-time simulation.