The problem of optimal control of a finite dam in the class of policies has been considered by Lam Yeh [6], [7]. In this paper, by using the first Dynkin formula, the same problems of specifying an optimal policy in the class of the policies to minimize the expected total discounted cost as well as the long-run average cost are considered. Both the expected total discounted cost and long-run average cost are determined explicitly, and then the optimal policy can be found numerically, Also, we obtain the transition density function and the resolvent operator of a reflecting Wiener process.