SAN FRANCISCO  A fierce and public feud between Oracle and Hewlett-Packard, two of the world’s largest technology companies, has ended after all of two weeks.

On Monday, the companies announced a settlement to a dispute that centered on Oracle’s hiring of Mark V. Hurd, the former chief executive of H.P., as a president. H.P. sued Mr. Hurd this month, claiming he would violate agreements to protect H.P.’s secrets by taking on such a high-level role at Oracle. The parties declined to reveal details about the settlement but said Mr. Hurd would protect H.P.’s confidential information.

However, in a filing with the Securities and Exchange Commission on Monday, H.P. said it had modified its separation agreement with Mr. Hurd. He effectively waived about half the compensation owed him. Mr. Hurd agreed to give up his rights to the 330,177 performance-based restricted stock units granted to him on Jan. 17, 2008, and to the 15,853 time-based restricted stock units granted on Dec. 11, 2009.

Although most legal analysts said H.P. had had little chance of winning its case, the lawsuit immediately strained the business relationship between the two companies. Oracle and H.P. have a long history of selling technology together. About 40 percent of Oracle’s business software runs on computing systems sold by H.P., and the companies have 140,000 customers in common. After the lawsuit was filed  19 hours after Oracle hired Mr. Hurd  Lawrence J. Ellison, Oracle’s chief executive, warned that H.P.’s actions threatened to derail the companies’ longstanding partnership.