We consider sequential quadratic programming (SQP) methods for solving constrained nonlinear programming problems. It is generally believed that SQP methods are sensitive to the accuracy by which partial derivatives are provided. One reason is that differences of gradients of the Lagrangian function are used for updating a quasi-Newton matrix, e.g., by the BFGS formula. The purpose of this paper is to show by numerical experimentation that the method can be stabilized substantially. Even in case of large random errors leading to partial derivatives with at most one correct digit, termination subject to an accuracy of 10−7 can be achieved, at least in 90 % of 306 problems of a standard test suite. The algorithm is stabilized by a non-monotone line search and, in addition, by internal and external restarts in case of errors when computing the search direction due to inaccurate derivatives. Additional safeguards are implemented to overcome the situation that an intermediate feasible i...