<PAGE>

                                                                   EXHIBIT 10.27

                            Top Tier Software, Inc.

                            STOCKHOLDERS' AGREEMENT

     THIS STOCKHOLDERS' AGREEMENT (this "Agreement") is made as of October 6,
1998, by and among Top Tier Software Inc., a Delaware corporation (the
"Company"), the holder of Series B and Series C Preferred Stock of the Company
listed on Exhibit A hereto (the "Investor"), and the investors who have
          ---------
purchased the Company's Series A Preferred Stock listed on Exhibit B hereto
                                                           ---------
(each a "Holder" and collectively the "Holders");

     WHEREAS, the Company and the Holders are parties to the Series A Preferred
Stock Purchase Agreement of even date herewith (the "Series A Agreement"),
pursuant to which the Holders are purchasing shares of the Company's Series A
Preferred Stock;

     WHEREAS, the Investor is the beneficial owner of the number of shares of
Series B Preferred Stock of the Company set forth opposite their name on Exhibit
                                                                         -------
A hereto;
-
     WHEREAS, the Investor wishes to provide a further inducement to the Holders
to purchase the shares of the Company's Series A Preferred Stock pursuant to the
terms of the Series A Agreement; and

     WHEREAS, the term "Stock" with respect to the Holders and the Investor
shall mean shares of Preferred or Common Stock of the Company now owned by such
Holder or Investor together with any additional shares of capital stock or
securities convertible or exchangeable for such shares; provided, however, that
the term "Stock" shall not include Common Stock of the Company issued or
issuable upon the exercise of options.

     NOW, THEREFORE, THE PARTIES HEREBY AGREE AS FOLLOWS:

     1.   CO-SALE RIGHTS IN SALES BY THE INVESTOR.
          ---------------------------------------

          1.1  Notice of Offer. In the event the Investor desires to accept a
               ---------------
bona fide third-party offer for the transfer of any of the Company's outstanding
Stock, the Investor shall promptly deliver to the Company and the Holders a
written notice (the "Co-Sale Notice") describing such bona fide third-party
offer and the basic terms and conditions thereof, including the identity of the
proposed purchaser.

          1.2  Grant of Co-Sale Rights. Except as set forth in Section 1.6
               -----------------------
below, if the Investor proposes to enter into a transaction regarding the sale
of any of the Company's outstanding Stock (the "Target Shares), the Holders
shall have the right, exercisable upon written notice to the Investor within
thirty (30) business days after receipt of such Investor's Co-Sale Notice, to
participate in such sale of the Target Shares on the same terms and conditions
as those set forth in the Co-Sale Notice. To the extent the Holders exercise
such right of participation, the number of Target Shares that the Investor may
sell in the transaction shall be correspondingly reduced. The right of
participation of the Holders shall be subject to the terms and conditions set
forth in this Section.
<PAGE>

               a.   Each Holder may sell in the proposed sale described in the
Holder's Co-Sale Notice a number of shares of Stock equal to the product
obtained by multiplying (i) the aggregate number of shares of Stock described
in the Co-Sale Notice by (ii) a fraction, the numerator of which is the number
of shares of Stock at the time owned by such Holder and the denominator of which
is the combined number of shares of Stock of the Company at the time owned by
the Investor and Holders.

               b.   Each Holder may effect its participation in the sale by
delivering to the Investor written notice described in subsection 1.2 specifying
the number of shares of Stock and it elects to and is entitled to sell pursuant
to subsection 1.2 (the "Co-Sale Shares") along with one or more certificates,
properly endorsed for transfer, which represent the Co-Sale Shares.

          1.3  Payment of Proceeds. The stock certificates that the Holders
               -------------------
deliver to the Investor pursuant to subsection 1.2 shall be transferred by the
Investor to the offeror described in the Co-Sale Notice in consummation of the
sale of the Stock pursuant to the terms and conditions specified in the Co-Sale
Notice, and the Investor shall promptly thereafter remit to the Holders that
portion of the sale proceeds of their participation in such sale.

          1.4  Non-exercise. In the event Holder fails to deliver to the
               ------------
Investor written notice of intent to exercise the co-sale right within thirty
(30) business days following the date of the receipt of the Co-Sale Notice, the
Holders shall be deemed to have waived the co-sale right with respect to such
sale by the Investor. The exercise or non-exercise of the co-sale right by the
Holders shall not adversely affect their rights to participate in subsequent
Stock sales by such Investor.

          1.5  Transfers to Affiliates. Notwithstanding anything herein to the
               ----------------------
contrary, in the event that the Investor proposes to transfer (whether by gift,
sale, merger, sale of assets or otherwise) twenty-five percent (25%) in the
aggregate of its interest in the Company, or the Company proposes to issue
shares (whether with or without consideration) to a party affiliated with the
Investor (other than affiliates described in Section 1.6 below), including
without limitation, Baan Company, N.V. or any of its subsidiaries (an "Affiliate
Transfer"), in addition to the rights provided by this Section 1, the Investor
shall provide notice to the Company and the Holders of such proposed transfer
and the Holders shall have the right to exercise their liquidation rights as
described in Section 2, below. No Affiliate Transfer shall be consummated until
the Holders have had the opportunity to consummate any transaction to which they
are entitled pursuant to Section 2 hereof.

          1.6  Additional Transfers. Notwithstanding anything herein to the
               --------------------
contrary, Investor may transfer (whether by gift, sale, merger, sale of assets
or otherwise) any of its interest in the Company to any entity (other than Baan
Company, N.V. or its successors or assigns) of which Investor owns all of the
outstanding equity interests without complying with any of the other provisions
of this Section 1.


                                      -2-

<PAGE>

     2.   CERTAIN HOLDER LIQUIDATION
          --------------------------

          2.1  Grant.  Notwithstanding any other provisions of this Agreement,
               -----
upon notice of an Affiliate Transfer, or at any time before the fourth
anniversary of the date hereof (the "Liquidation Date") the Holders shall have
the liquidation right as set forth below.

          2.2  Notice. At any time following the Liquidation Date, a majority in
               ------
interest of the Holders (the "Initiating Holders") may provide a notice (the
"Exercise Notice") to the Company and the Investor stating their intention to
exercise its right of liquidation pursuant to this Section 2.

          2.3  Exercise of Right. Upon receipt of the Exercise Notice, the
               -----------------
Investor and the Initiating Holders shall undertake the appraisal process
pursuant to Section 2.4 and if the Appraised Value of the Company (as defined in
Section 2.4) is greater than or equal to $315,000,000, and if a qualified
Investment Banker (as defined below) provides a letter of intent to the Company
stating that it will undertake an initial public offering of the Company shares
at a minimum market capitalization of USD 315,000,000, the Company and the
Investor shall immediately provide notice of such Appraised Value to all Holders
and permit such Holders to participate in the liquidation process described
below, and upon the receipt of the Exercise Notice consummate, at the Investor's
election, one of the following:

               a.   as soon as is commercially reasonable, a bona fide firm
commitment underwritten public offering of the Company's Common Stock held by
the participating Holders registered under the Securities Act of 1933 on Form S-
1 or Form SB-2 (or any successor form designated by the Securities and Exchange
Commission) at a price per share greater than or equal to the Appraised Value
Per Share; or

               b.   within six (6) months of the receipt of the Exercise Notice,
the acquisition of the Company by another entity by means of any transaction or
series of related transactions (including, without limitation, any
reorganization, merger or consolidation) or a sale of all or substantially all
of the assets of the Company with a subsequent liquidation of the Company,
pursuant to which the participating Holders' receive a price per share greater
than or equal to the Appraised Value Per Share; or

               c.   within six (6) months of the receipt of the Exercise Notice
the purchase of the participating Holders' Stock by the Investors or the Company
at a price per share greater than or equal to the Value Per Share.

For purposes of this section, a Qualified Investment Banker shall be defined as
any investment banking firm that has underwritten a dollar volume of initial
public offerings in the United States that aggregate an amount that places the
firm within the top four underwriters based on dollar volume during the last
twelve months.

          2.4  Appraisal Process. The Investor and the Holders shall mutually
               -----------------
agree on the fair market value of the Company (the "Appraised Value"). If the
Holders and the Investor cannot agree on the Appraised Value, such Appraised
Value shall be determined by an appraiser

                                      -3-




<PAGE>

of recognized standing chosen by Holders and the Investors, or, if they cannot
agree on an appraiser, each shall select an appraiser of recognized standing and
the two appraisers shall designate a third appraiser of recognized standing,
whose appraisal shall be determinative of such Appraised Value. The cost of such
appraisal shall be borne by the Company if the Appraised Value is equal to or
greater than $250,000,000. If the Appraised Value is less than $250,000,000, the
cost of such appraisal shall be borne by the Holders. The closing of a
transaction contemplated pursuant to Section 2.3(c) shall occur no later than
thirty (30) days after such Appraised Value shall have been determined. The term
"Appraised Value Per Share" shall mean the Appraised Value divided by the number
of then outstanding shares of Common Stock equivalents then outstanding,
provided however, that any such shares which are subject to vesting or other
contingencies shall not be included in the number of shares of Common Stock
Equivalents then outstanding.

          2.5  Liquidation Right after the Fourth Anniversary. Investor and
               -----------------------------------------------
Holders hereby acknowledge, as of the date of this Agreement, that they can not
agree on an appropriate Appraised Value threshold (which prior to the Fourth
Anniversary is $315,000,000); therefore, after the fourth anniversary of this
Agreement, the Investor and Holders, in their sole discretion, shall mutually
agree on such threshold.

     3    RIGHT OF FIRST REFUSAL.
          ----------------------

          3.1   Grant. The Investor and the Company are hereby each granted a
                ------
right of first refusal with respect to any proposed disposition of Stock by the
Holders (or any permitted transferee of the Stock under paragraph 3.8 hereof,
hereafter collectively included in all references to "Holders"), in the
following order of priority: the Investor shall have the first right to purchase
any Stock proposed to be transferred to a third party by the Holders. In the
event the Investor elects not to exercise its first refusal rights with respect
to all or any portion of such proposed transfer, the Investor agrees to waive
such rights with respect to such portion in favor of the Company's first refusal
right under this Agreement.

          3.2   Notice of the Intended Disposition. In the event a Holder
                -----------------------------------
desires to accept a bona fide third-party offer for the transfer of any or all
of the Stock (the "Target Shares"), the Holder shall promptly deliver to the
Company and the Investor written notice of the intended disposition
("Disposition Notice") and the basic terms and conditions thereof, including the
identity of the proposed purchaser.

          3.3  Exercise of Right by the Investor. The Investor shall, for a
               ----------------------------------
period of fifteen (15) days following receipt of the Disposition Notice, have
the right to purchase the Target Shares upon the same terms and conditions
specified in the Disposition Notice, subject to the following conditions. Such
right shall be exercisable by written notice (the "Exercise Notice") delivered
to the Holder prior to the expiration of the fifteen (15) day exercise period.
If such right is exercised with respect to all the Target Shares specified in
the Disposition Notice, then the Investor shall effect the purchase of such
Target Shares, including payment of the purchase price, not more than ten (10)
business days after the delivery of the Exercise Notice. At such time, the
Holder shall deliver to the Investor exercising such right the certificates

                                      -4-


<PAGE>

representing the Target Shares to be purchased, each certificate to be properly
endorsed for transfer. Alternatively, if such right is exercised with respect to
only a portion of the Target Shares specified in the Disposition Notice, then
this right to purchase shall be contingent upon the Company's election to
purchase the remaining balance of the Target Shares. The Investor shall notify
the Company of its intent to purchase only a portion of the Target Shares within
the fifteen (15) day exercise period above defined. The Investor's purchase of
such Target Shares shall be consummated, if at all, at the time of the Company's
exercise of its purchase rights in accordance with paragraph 3.5 herein. In the
event the Company does not elect to repurchase the remaining Target Shares, the
Investor shall be deemed to have waived their right of first refusal. Any
purchase of the Target Shares pursuant to this right of first refusal shall be
in cash or marketable securities only.

          3.4  Non-Exercise of Right. In the event the Exercise Notice is not
               ---------------------
given by the Investor to the Holders within fifteen (15) days following the date
of the Investor's receipt of the Disposition Notice, the Investor shall be
deemed to have waived their right of first refusal.

          3.5  Exercise of Right by the Company. Subject to the rights of the
               --------------------------------
Investor, the Company shall, for a period of the shorter of (i) thirty (30) days
from receipt of the Disposition Notice or (ii) fifteen (15) days from receipt of
written notice of the Investor's election either to waive its right of first
refusal or to purchase only a portion of the Target Shares, whichever is
shorter, have the right to purchase all, or the remaining balance after the
Investor's purchase, of the Target Shares, upon the terms and conditions
specified in the Disposition Notice. The Company shall exercise this right of
first refusal in the same manner and subject to the same rights and conditions
as the Investor, as more specifically set forth in paragraph 3.3 above.

          3.6  Non-Exercise of Right. In the event the Exercise Notice with
               ---------------------
respect to any portion of the Target Shares is not given to the Holder within
thirty (30) days following the date of the Investor's and the Company's receipt
of the Disposition Notice, such Holder shall have a period of thirty (30) days
thereafter in which to sell the Target Shares upon terms and conditions
(including the purchase price) no more favorable to the third-party transferee
than those specified in the Disposition Notice. The third-party transferee shall
acquire the Target Shares free and clear of subsequent rights of first refusal
under this Section 3. In the event such Holder does not notify the Investor or
consummate the sale or disposition of the Target Shares within the sixty (60)
day period, the Company's and the Investor's first refusal rights shall continue
to be applicable to any subsequent disposition of the Target Shares by such
Holder until such right lapses in accordance with paragraph 5.1 herein.

          3.7  Partial Exercise of Right. In the event that the Investor and/or
               -------------------------
the Company do not exercise the right of first refusal pursuant to this Article
I with respect to all Target Shares described in a particular Disposition
Notice, then such right shall not apply to any Target Shares described in such
Disposition Notice.


          3.8  Limitations of Right of First Refusal. Notwithstanding the above
               -------------------------------------
provisions of this Section 3, the Holder may sell or otherwise assign, with or
without

                                      -5-
<PAGE>

consideration. Stock (i) to any spouse or member of Holder's immediate family,
or to a custodian, trustee (including a trustee of a voting trust), executor, or
other fiduciary for the account of the Holder's spouse or members Holder's
immediate family, or to a trust for the Holder's own self, or a charitable
remainder trust, (ii) in any sale or transfer of shares of Common Stock between
the Holders or (iii) in any sale or transfer to a third party in connection with
such third-party's offer to purchase all of the outstanding capital stock of the
Company; provided that in cases (i) and (iii) above, each such transferee or
assignee, prior to the completion of the sale, transfer, or assignment shall
have executed documents assuming the obligations of the Holder under this
Section of this Agreement with respect to the transferred securities.

     4.   LEGEND REQUIREMENTS.
          -------------------

          4.1  Legend. Each certificate representing the Stock owned by the
               ------
Holders and Investor shall be endorsed with the following legend:

          "THE SALE OR TRANSFER OF THE SECURITIES REPRESENTED BY THIS
CERTIFICATE IS SUBJECT TO THE TERMS AND CONDITIONS OF A CERTAIN STOCKHOLDERS'
AGREEMENT, DATED OCTOBER 6, 1998, BY AND AMONG THE COMPANY, CERTAIN PREFERRED
STOCKHOLDERS OF THE COMPANY AND OTHER INVESTORS IN THE PREFERRED STOCK OF THE
COMPANY. A COPY OF SUCH AGREEMENT IS ON FILE AT THE PRINCIPAL OFFICE OF THE
COMPANY."

          4.2  Removal.  The subsection 4.1 legend shall be removed upon
               -------
termination of this Agreement in accordance with the provisions of subsection
5.1.

     5.   MISCELLANEOUS PROVISIONS.
          ------------------------

          5.1  Termination. The rights of the Company, the Investors and the
               -----------
Holders under this Agreement and the correlative obligations of the Holders with
respect to the Company and the Investors shall terminate at such time as the
Investor and Holders shall no longer be the owner of any shares of Stock of the
Company. Unless sooner terminated in accordance with the preceding sentence,
this Agreement shall terminate immediately prior to the closing of a bona fide
firm commitment underwritten public offering of the Company's Stock registered
under the Securities Act of 1933 on Form S-1 or Form SB-2 (or any successor form
designated by the Securities and Exchange Commission).

          5.2  Notice. Unless otherwise provided, any notice required or
               ------
permitted under this Agreement shall be given in writing and shall be deemed
effectively given (i) upon personal delivery to the party to be notified, (ii)
upon deposit with the United States Post Office, by registered or certified
mail, postage prepaid and addressed to the party to be notified at the address
indicated for such party on the signature page hereof, or at such other address
as such party may designate by ten (10) business days' advance written notice to
the other parties, or (iii) upon delivery by facsimile transmission to the party
to be notified at the facsimile number indicated for such party on the signature
page hereof, or at such other facsimile number as such party may designate by
ten (10) business days' advance written notice to the other parties.

                                      -6-
<PAGE>

          5.3 Severability. In the event one or more of the provisions of this
              ------------
Agreement should, for any reason be held to be invalid, illegal or unenforceable
in any respect, such invalidity, illegality or unenforceability shall not
affect any other provisions of this Agreement, and this Agreement shall be
construed and interpreted in such manner as to be effective and valid under
applicable law.

          5.4 Third-Party Beneficiaries. Except as otherwise expressly provided
              -------------------------
for in this Agreement, nothing herein, expressed or implied, is intended or
shall be construed to confer upon or give to any person, firm, corporation, or
legal entity, other than the parties hereto, any rights, remedies, or other
benefits under or by reason of this Agreement.

          5.5 Waiver or Modification. Any amendment or modification of this
              ----------------------
Agreement shall be effective only if evidenced by a written instrument executed
by the (i) Holders holding a majority of the Stock of the Company then held by
all of the Holders, (ii) the Company and (iii) the Investor.

          5.6 Governing Law. This Agreement shall be governed by and construed
              -------------
in accordance with the laws of the State of California as applied in contracts
among California residents entered into and performed entirely within
California.

          5.7 Attorneys' Fees. In the event of any dispute involving the terms
              ---------------
hereof, the prevailing parties shall be entitled to collect legal fees and
expenses from the other party to the dispute in addition to any other relief
awarded to such parties.

          5.8 Further Assurances. Each party agrees to act in accordance
              ------------------
herewith and not to take any action that is designed to avoid the intention
hereof.

          5.9 Successors and Assigns. This Agreement and the rights and
              ----------------------
obligations of the parties hereunder shall inure to the benefit of, and be
binding upon, their respective successors, assigns and legal representatives.

          5.10 Aggregation of Stock. For the purposes of determining the
               --------------------
availability of any rights under this Agreement, the holdings of transferees and
assignees of an individual or a partnership who are spouses, ancestors, lineal
descendants or siblings of such individual or partners or retired partners of
such partnership (including spouses and ancestors, lineal descendants and
siblings of such partners or spouses who acquire Stock by gift, will or
intestate succession) shall be aggregated together with the individual or
partnership, as the case may be, for the purpose of exercising any rights or
taking any action under this Agreement.

                                      -7-
<PAGE>

     IN WITNESS WHEREOF, the parties have executed this Agreement as of the date
first above written.


                         TOP TIER SOFTWARE, INC.


                         By:  /s/ David Blumstein
                              -----------------------------
                              President


               Address:  6200 San Ignacio Avenue
                         San Jose, CA 95119


                 Signature Page to the Stockholders' Agreement


<PAGE>

     IN WITNESS WHEREOF, the parties have executed this Agreement as of the date
first above written.

                                             INVESTOR:

                                             VANENBURG VENTURES B.V.


                                             By:    /s/ Michael Cornelissen
                                                   -----------------------------
                                             Name:  Michael Cornelissen
                                                   -----------------------------
                                             Title: CFO
                                                   -----------------------------


                                   Address:  _______________________________
                                             _______________________________
                                             _______________________________
                                             _______________________________





                 Signature Page to the Stockholders' Agreement
<PAGE>

     IN WITNESS WHEREOF, the parties have executed this Agreement as of the date
first above written.

                                             HOLDERS:

                                             SHAI AGASSI


                                             /s/ Shai Agassi
                                             --------------------------------
                                             Shai Agassi


                                   Address:  16154 Loretta Ln
                                             ---------------------------------
                                             Los Gatos, CA 25032
                                             ---------------------------------


                                             QUICKSOFT, LTD.



                                             By:   R. Agassi
                                                   ---------------------------
                                             Name:
                                                   ---------------------------

                                             Title: President
                                                    ---------------------------

                                   Address:         8 Grinberg RP.'AVANA
                                             ----------------------------------
                                                    Israel
                                             ---------------------------------



                                             DAVID BLUMSTEIN


                                             /s/ David Blumstein
                                             ---------------------------------
                                             David Blumstein


                                   Address:  1201 Hawkins Way
                                             ----------------------------------
                                             Pebble Beach, CA 93953
                                             ---------------------------------

                 Signature Page to the Stockholders' Agreement