1
                                                                    EXHIBIT 10.5

                           RESTRICTED STOCK AGREEMENT


         Agreement made as of the ______ day of _________________, _____ between
BMC Software, Inc., a Delaware corporation (the "Company"), and
____________________ ("Employee").

         WHEREAS, the Company has adopted the BMC Software, Inc. 1994 Stock
Incentive Plan (the "Plan"), which plan provides for grants to employees of the
Company of shares of restricted stock; and

         WHEREAS, Employee serves as a key executive officer of the Company. In
recognition of his service and to encourage Employee to remain with the Company
and devote his best efforts to its affairs, thereby advancing the interests of
the Company and its stockholders, the Company and Employee agree as follows:


ARTICLE I

DEFINITIONS, CONSTRUCTIONS AND INTERPRETATIONS

Section 1.1 Definitions. In this Agreement, the definitions, rules of
construction and interpretations set forth in this Article I shall be applied
unless the context otherwise indicates.

(A) "Board of Directors" means, at any particular time, the then duly elected
and acting directors of the Company.

(B) "Committee" means, at any particular time, the then duly constituted
Compensation Committee of the Board of Directors or such other similar committee
that is expressly designated by the Board of Directors to perform those
functions presently being performed by such Committee with respect to the Plan.
If no Compensation or other Committee has been expressly designated by the Board
of Directors to administer the Plan, the Board shall act as the Committee.

(C) "Company" means BMC Software, Inc., a Delaware corporation, and, except as
otherwise provided in Section 1.2(B) with respect to a Subsidiary which ceases
to be such in the circumstances therein described, any successor in interest by
way of consolidation, operation of law, merger or otherwise.

(D) "Disability" means a condition of Employee resulting from illness, injury or
disease, which, as determined by the Committee, causes Employee to be unable to
perform the normal duties of his employment with the Company or a Subsidiary and
is reasonably expected to be of long and indefinite duration or result in death.

(E) "Employee" means _______________________.



   2


(F) "Fair Market Value" means the average of the bid and asked closing price of
the Restricted Shares on a given date.

(G) "Restrictions" means (a) the obligation of Employee to forfeit shares of
Stock issued to him under this Agreement, for no consideration, and to surrender
such shares to the Company as set forth in this Agreement and (b) the transfer
restrictions that prohibit Employee's transfer of the Restricted Shares.

(H) "Restricted Shares" means the shares of stock issued under this Agreement
that are then subject to Restrictions.

(I) "Stock" means the Company's common stock, par value $.01 per share.

(J) "Stock Award" means the shares of Stock awarded to Employee under this
Agreement pursuant to the Plan.

(K) "Subsidiary" means any corporation at least a majority of whose securities
having ordinary voting power for the election of directors (other than
securities having such power only by reason of the occurrence of a contingency)
is at the time owned by the Company and/or one or more Subsidiaries.

Section 1.2  Termination of Employment.

(A) Except as otherwise provided in Subsection (B) hereof, for purposes of this
Agreement, Employee will be deemed to have terminated his employment only if his
employment relationship with the Company and all Subsidiaries is completely
severed; accordingly, neither transfer of employment among the Company and
Subsidiaries nor absence from active service by reason of a medical leave or any
other approved leave of absence will constitute a termination of employment.

(B) In the event that, prior to a "Change of Control," as that term is defined
in clause (A) of Section 3.1, a Subsidiary is sold, merged, contributed, or in
any other manner transferred, or if, for any reason, the Company's ownership
interest in the Subsidiary decreases below the level specified in clause (K) of
Section 1.1, (ii) Employee's primary employment duties are with the Subsidiary
at the time of the occurrence of such event, and (iii) Employee does not, in
connection therewith, transfer employment directly to the Company or a
Subsidiary, then Employee shall be considered to have terminated his employment
as of the date of the occurrence of such event.

Section 1.3 Headings. The headings of articles and sections are included solely
for convenience. If there exists any conflict between such headings and the text
of this Agreement, the text shall control.

Section 1.4 Governing Law. The validity, construction, interpretation and effect
of this Agreement and the rights of any and all persons having or claiming to
have an interest hereunder


   3



shall be governed by, and determined exclusively and solely in accordance with,
the laws of the State of Texas.

Section 1.5 Acknowledgement. Employee acknowledges receipt of the Plan and
agrees that the grant of a Stock Award under this Agreement shall be subject to
all terms and provisions of the Plan, including any amendments thereto, if any,
pursuant to Article IV thereof.

ARTICLE II

STOCK AWARD AND RESTRICTION LAPSE

Section 2.1 Stock Award. The Company shall issue to Employee, without the
requirement of payment by Employee if issued out of the Company's treasury, or
upon the payment by Employee of par value if not issued out of treasury,
___________ shares of Stock as a Stock Award subject to the provisions of the
Securities Act of 1933 (the "1933 Act"). The Restricted Shares issued to
Employee under this Agreement shall be subject to all the terms, conditions and
restrictions set forth in this Agreement.

Section 2.2  Form of Award.

(A) The Company shall cause to be issued a certificate registered in the name of
Employee representing the Restricted Shares and shall cause a copy of this
Agreement and Plan to be delivered to Employee. The Committee may require that
such certificate be legended to indicate that the shares of Stock represented
thereby are subject to the terms and provisions of this Agreement. The
Restricted Shares represented by the certificate agent shall constitute issued
and outstanding shares of Stock for all corporate purposes, and Employee shall
receive any dividends thereon and have the right to vote such shares; provided,
however, that the right to receive such dividends and to vote such shares shall
forthwith terminate with respect to any Restricted Shares that have been
forfeited pursuant to the provisions of Section 2.3. While the Restricted Shares
are held in escrow and until the Restrictions with respect to such shares have
lapsed, Employee shall not have the right to sell or otherwise dispose of the
Restricted Shares or any interest therein, and such shares shall not be subject
to attachment or any other legal or equitable process brought by, or on behalf
of, any creditor of Employee. As a condition precedent to delivering to the
escrow agent a certificate representing Employee's Stock Award, the Company may
require Employee to deliver a duly executed irrevocable stock power, in blank,
covering the shares represented by the certificate.

(B) As the Restrictions on the Restricted Shares lapse from time to time, the
escrow agent shall deliver to Employee or, in the event of Employee's death, to
his beneficiary, an unlegended certificate representing such unrestricted
shares.

(C) In the event the Restricted Shares are forfeited pursuant to the provisions
of Section 2.3, the certificate representing such Restricted Shares shall be
returned, together with any related stock power, to the Company.



   4



(D) The escrow agent, which may be the Company, shall be appointed by the
Committee for such period and upon such terms and conditions as the Committee
deems appropriate. The Committee shall have the power to remove any person from
the position of escrow agent and to appoint substitute or successor escrow
agents. If the escrow agent is a person other than the Company, any fees and
expenses of the escrow agent shall be paid by the Company. The escrow agent
shall not incur liability for any action taken pursuant to this Agreement or any
award granted hereunder so long as the escrow agent acts in good faith in
accordance with the instructions of the Committee, and, if the escrow agent is a
person other than the Company, the Company, at the request of the escrow agent,
may enter into an agreement indemnifying the escrow agent against any such
liability and any costs and expenses related thereto.

ARTICLE III

CHANGE OF CONTROL

Section 3.1

(A) "Change of Control" means any of the following events:

         (1) The acquisition (other than from the Company) by any person, entity
or "group", within the meaning of Section 13(d)(3) or 14(d)(2) of the Securities
Exchange Act of 1934 (the "Exchange Act") (excluding, for this purpose, the
Company or its subsidiaries, or any employee benefit plan of the Company or its
subsidiaries which acquires beneficial ownership of voting securities of the
Company) of beneficial ownership (within the meaning of Rule 13d-3 promulgated
under the Exchange Act), of 40% or more of either the then outstanding shares of
common stock or the combined voting power of the Company's then outstanding
voting securities entitled to vote generally in the election of directors; or

         (2) Individuals who, as of the date hereof, constitute the Board of
Directors (the "Incumbent Board") cease for any reason to constitute at least a
majority of the Board of Directors, provided that any person becoming a director
subsequent to the date hereof whose election, or nomination for election by the
Company's shareholders, was approved by a vote of at least a majority of the
directors then comprising the Incumbent Board (other than an election or
nomination of any individual whose initial assumption of office is in connection
with an actual or threatened election contest relating to the election of the
Directors of the Company, as such terms are used in Rule 14a-11 of Regulation
14A promulgated under the Exchange Act) shall be, for the purposes of this
Agreement, considered as though such person were a member of the Incumbent
Board; or

         (3) Approval by the stockholders of the Company of: a reorganization,
merger, consolidation, in each case, with respect to which persons who were the
stockholders of the Company immediately prior to such reorganization, merger or
consolidation do not, immediately thereafter, own more than 50% of the combined
voting power entitled to vote generally in the election of directors of the
reorganized, merged or consolidated company's then outstanding voting


   5

securities; or a liquidation or dissolution of the Company or of the sale of all
or substantially all of the assets of the Company.

(B) "Change of Control Termination" means, with respect to Employee, any of the
following events occurring within two years after a Change of Control:

         (1) Termination of Employee's employment by the Company or a 
Subsidiary for any reason, except for Cause; or

         (2) Termination of employment by Employee for Good Reason.

(C) "Good Reason" means a good faith determination by Employee that any one or
more of the following events has occurred without Employee's express written
consent, after a Change of Control:

         (1) A change in Employee's reporting responsibilities, titles or
offices as in effect immediately prior to the Change of Control or any removal
of Employee from, or any failure to re-elect Employee to, any of such positions
which has the effect of diminishing Employee's responsibility or authority;

         (2) A reduction by the Company or a Subsidiary in Employee's base
salary as in effect immediately prior to the Change of Control or as the same
may be increased from time to time or a change in the eligibility requirements
or performance criteria under any bonus, incentive or compensation plan, program
or arrangement under which Employee is covered immediately prior to the Change
of Control which adversely affects Employee;

         (3) The Company or a Subsidiary requiring Employee to be permanently
based anywhere other than within 50 miles of Employee's job location at the time
of the Change of Control;

         (4) Without replacement by a plan providing benefits to Employee equal
to or greater than those discontinued, the failure by the Company or a
Subsidiary to continue in effect, within its maximum stated term, any pension,
bonus, incentive, stock ownership, purchase, option, life insurance, health,
accident, disability, or any other employee benefit plan, program or arrangement
in which Employee is participating at the time of the Change of Control, or the
taking of any action by the Company or Subsidiary that would adversely affect
Employee's participation or materially reduce Employee's benefits under any of
such plans;

         (5) The taking of any action by the Company or a Subsidiary that would
materially adversely affect the physical conditions existing at the time of the
Change of Control in or under which Employee performs his employment duties;

         (6) If Employee's primary employment duties are with a Subsidiary, the
sale, merger, contribution, transfer or any other transaction in conjunction
with which the Company's ownership interest in the Subsidiary decreases below
the level specified in clause (K) of Section 1.1; or


   6



         (7) Any material variance from the terms of this Agreement by the
Company or a Subsidiary or any exercise by the Committee of its discretionary
authority under this Agreement in a manner that is inconsistent with the
Agreement's stated purposes.

(D)      "Cause" means

         (1) an act or acts of personal dishonesty taken by the Employee and
intended to result in substantial personal enrichment of the Employee at the
expense of the Company.

         (2)      the Employee

                  (a)    willfully breaches or habitually neglects the duties
                         that the Employee is required to perform under the
                         terms of his employment.

                  (b)    willfully violates reasonable and substantial rules
                         governing employee performance.

                  (c)    refuses to obey reasonable orders in a manner that
                         amounts to insubordination.

                  (d)    commits clearly dishonest acts toward the Company.

                  (e)    engages in acts of disruption or violence such as
                         unprovoked fighting.

         (3)      the conviction of the Employee of a felony.

Section 3.2 Lapse of Restrictions. Upon a Change of Control Termination of
Employee, and without further action by the Board of Directors, Committee or
otherwise, all Restrictions with respect to the Restricted Shares immediately
shall lapse and be of no further force or effect, and certificates with no
restrictive language for all such shares of Stock shall be given to Employee
immediately.

ARTICLE IV

GENERAL

Section 4.1 No Employment Rights Created. The granting to Employee of the Stock
Award under this Agreement and the Plan shall not give Employee any interest or
right to be retained in the employ of the Company or a Subsidiary, and the right
and power of the Company or a Subsidiary to dismiss or discharge Employee, with
or without cause, is specifically reserved.

Section 4.2 Liability of Directors and Committee Members. No member of the Board
of Directors or of the Committee shall be liable, with respect to this
Agreement, for any act, whether of commission or omission taken by any other
member of by any officer, agent or employee of


   7



the Company or a Subsidiary nor, except in circumstances involving such person's
own bad faith, for anything done or omitted to be done by such person in
connection with this Agreement.

Section 4.3 Nontransferability. No right or interest of Employee under this
Agreement shall be assignable or transferable, or subject to any lien, directly,
by operation of law or otherwise, including execution, levy, garnishment,
attachment, pledge and bankruptcy. In the event of Employee's death, payment of
any amounts due under this Agreement shall be made to Employee's designated
beneficiary or, in the absence of such designation, to Employee's estate.

Section 4.4 Successors and Assigns. Except with respect to a Subsidiary which
ceases to be such in the circumstances described in Section 1.2(B), this
Agreement shall be binding upon and inure to the benefit of the successors and
assigns of the Company and each Subsidiary, whether by way of merger,
consolidation, operations of law, assignment, purchase or other acquisition of
substantially all of the assets or business of the Company or Subsidiary, any
such successor or assign shall absolutely and unconditionally assume all of the
Company's and the Subsidiary's obligations thereunder.

Section 4.5 Shares Received in Reorganization or Stock Split. The Restrictions
shall not apply to the exchange of Restricted Shares pursuant to a plan of
reorganization of the Company, but the stock or securities received in exchange
therefor, and any stock received as a result of a stock split or stock dividend
with respect to Restricted Shares, shall also become Restricted Shares subject
to the Restrictions.

Section 4.6 Community Property Interest of Spouse. The community property
interest, if any, of any spouse of Employee in any of the Restricted Shares
shall be subject to all the terms, conditions and restrictions of this
Agreement, and shall be forfeited and surrendered to the Company upon the
occurrence of any of the events requiring Employee's interest in such restricted
Shares to be so forfeited and surrendered pursuant to this Agreement.

Section 4.7 To the extent the lapse of Restrictions results in the receipt of
compensation by Employee for tax purposes, Employee shall be entitled to elect,
at or prior to the time of the lapsing of the Restrictions (the "Tax Date"), to
have the Company withhold from the Shares to be delivered upon the lapsing of
Restrictions the number of shares (based on the Fair Market value of such shares
as of the Tax Date) that is necessary to satisfy any withholding taxes
attributable to the lapsing of the Restrictions. If the Employee does not elect
to satisfy his or her withholding tax obligation in respect of the lapsing of
any Restrictions as contemplated above, Employee shall deliver to the Company
cash in an amount determined by the Company to be sufficient to satisfy any such
withholding requirement, and the Company shall be entitled to withhold from any
cash compensation then or thereafter payable to Employee any additional amounts
required to be withheld by reason of the lapsing of the Restrictions.






   8


         IN WITNESS WHEREOF, the Company has executed this Agreement by its duly
authorized officers, and Employee has executed this Agreement, all as of the day
and year first above written.


                               BMC SOFTWARE, INC.


                               By:
                                  --------------------------------------
                                      M. Brinkley Morse
                                      Senior Vice President, General Counsel


                               EMPLOYEE


                               -----------------------------------------