<PAGE>   1

                                                                   EXHIBIT 10.12

                                 AMENDMENT NO. 1
                                    TO LEASE

        THIS AMENDMENT NO. 1 is made and entered into this 28th day of May,
1997, by and between JOHN ARRILLAGA, Trustee, or his Successor Trustee UTA dated
7/20/77 (JOHN ARRILLAGA SURVIVOR'S TRUST) (previously known as the "John
Arrillaga Separate Property Trust") as amended, and RICHARD T. PEERY, Trustee,
or his Successor Trustee UTA dated 7/20/77 (RICHARD T. PEERY SEPARATE PROPERTY
TRUST) as amended, collectively as LANDLORD, and VERITAS SOFTWARE CORPORATION, a
California corporation, as TENANT.

RECITALS

         A. WHEREAS, by Lease Agreement dated September 2, 1994 Landlord leased
to Tenant approximately 58,958 (plus or minus) square feet of that certain
74,515 (plus or minus) square foot building located at 1600 Plymouth Street,
Suite 101, Mountain View, California, the details of which are more particularly
set forth in said September 2, 1994 Lease Agreement, and

        B. WHEREAS, said Lease was amended by the Commencement Letter dated
January 24, 1995 which changed the Commencement Date of the Lease from November
1, 1994 to January 23, 1995, and changed the Termination Date from October 31,
2001 to January 31, 2002, and

        C. WHEREAS, it is now the desire of the parties hereto to amend the
Lease by (i) increasing the square footage of the Leased Premises by 7,011
square feet effective October 21, 1997, subject to the terms and conditions
herein, (ii) amending the Basic Rent schedule and Aggregate Rent accordingly,
(iii) increasing the Security Deposit required under the Lease, (iv) increasing
Tenant's non-exclusive parking spaces, (v) amending the Management Fee charged
to Tenant, (vi) amending Lease Paragraph 16 ("Assignment and Subletting"), (vii)
replacing Lease Paragraph 36 ("Limitation of Liability"), and (viii) adding a
paragraph ("Authority to Execute") to said Lease Agreement as hereinafter set
forth.

AGREEMENT

        NOW THEREFORE, for valuable consideration, receipt of which is hereby
acknowledged, and in consideration of the hereinafter mutual promises, the
parties hereto do agree as follows:

1. INCREASED PREMISES: Subject to the terms and conditions of this Amendment No.
1, effective October 21, 1997, the size of the Leased Premises will be increased
by 7,011 (plus or minus) square feet, or from 58,958 (plus or minus) square
feet to 65,969 (plus or minus) square feet of space. Total said Premises are 
more particularly shown within the area outlined in Red on Exhibit A. The entire
parcel, of which the Leased Premises is a part, is shown within the area
outlined in Green on Exhibit A. The additional 7,011 (plus or minus) square feet
of space is leased on an "as-is" basis, in its present 

<PAGE>   2

condition and configuration, as set forth in Blue on Exhibit B attached hereto,
with the entire interior leased Premises shown in Red on Exhibit B.

2. AMENDMENT SUBJECT TO LANDLORD'S OBTAINING TERMINATION AGREEMENT WITH CURRENT
TENANT FOR CURRENT TENNANT'S SPACE: This Amendment is subject to Landlord
obtaining from Ariba Technologies, Inc. ("Ariba"), the current tenant occupying
the Premises leased hereunder, a Termination Agreement satisfactory to Landlord
on or before October 20, 1997. In the event Landlord is unable to obtain said
satisfactory Agreement on or before October 20, 1997, and/or in the event Ariba
fails to timely vacate the Premises and surrender same to Landlord free and
clear of its occupancy, this Amendment shall, at Landlord's option: a) be
rescinded, or b) the Commencement Date of the Increased Premises hereof shall be
modified to reflect the date Landlord so obtains said satisfactory Termination
Agreement and receives possession of the Increased Premises free and clear of
Ariba's occupancy; provided, however, that said period of delay caused by Ariba
shall not extend beyond December 19, 1997. In the event Landlord cannot deliver
said Increased Premises by December 19, 1997 (subject only to delays as set
forth in Lease Paragraph 3 ("Possession")), this Amendment No. 1 shall be
automatically rescinded.

        Notwithstanding the above, in the event Ariba vacates the Increased
Premises prior to October 20, 1997, the Commencement Date of the Increased
Premises hereof shall be modified to reflect the date immediately following the
date Ariba vacates the Premises and surrenders the same to Landlord free and
clear of its occupancy.

3. BASIC RENT SCHEDULE: The Basic Rent schedule, as shown in Paragraph 4(A) of
the Lease Agreement, shall be amended as follows:

On October 1, 1997, the sum of ONE HUNDRED THIRTEEN THOUSAND THREE HUNDRED
THIRTY TWO AND 83/100 DOLLARS ($113,332.83) shall be due, representing the
prorated Basic Rent due for the period of October 1, 1997 through October 31,
1997.

On November 1, 1997, the sum of ONE HUNDRED TWENTY SIX THOUSAND FOUR HUNDRED
THIRTY NINE AND 08/100 DOLLARS ($126,439.08) shall be due, and a like sum due on
the first day of each month thereafter, through and including January 1, 1998.

On February 1, 1998, the sum of ONE HUNDRED TWENTY NINE THOUSAND THREE HUNDRED
EIGHTY SIX AND 98/100 DOLLARS ($129,386.98) shall be due, and a like sum due on
the first day of each month thereafter, through and including October 1, 1998.

On November 1, 1998, the sum of ONE HUNDRED TWENTY NINE THOUSAND SEVEN HUNDRED
THIRTY SEVEN AND 53/100 DOLLARS ($129,737.53) shall be due, and a like sum due
on the first day of each month thereafter, through and including January 1,
1999.

On February 1, 1999, the sum of ONE HUNDRED THIRTY TWO THOUSAND SIX HUNDRED
EIGHTY FIVE AND 43/100 DOLLARS ($132,685.43) shall be due, and a like sum due on
the first day of each month thereafter, through and including October 1, 1999.

<PAGE>   3

On November 1, 1999, the sum of ONE HUNDRED THIRTY THREE THOUSAND THIRTY FIVE
AND 98/100 DOLLARS ($133,035.98) shall be due, and a like sum due on the first
day of each month thereafter, through and including January 1, 2000.

On February 1, 2000, the sum of ONE HUNDRED THIRTY FIVE THOUSAND NINE HUNDRED
EIGHTY THREE AND 88/100 DOLLARS ($135,983.88) shall be due, and a like sum due
on the first day of each month thereafter, through and including October 1,
2000.

On November 1, 2000, the sum of ONE HUNDRED THIRTY SIX THOUSAND THREE HUNDRED
THIRTY FOUR AND 43/100 DOLLARS ($136,334.43) shall be due, and a like sum due on
the first day of each month thereafter, through and including January 1, 2001.

On February 1, 2001, the sum of ONE HUNDRED THIRTY EIGHT THOUSAND SIX HUNDRED
NINETY TWO AND 75/100 DOLLARS ($138,692.75) shall be due, and a like sum due on
the first day of each month thereafter, through and including October 1, 2001.

On November 1, 2001, the sum of ONE HUNDRED THIRTY NINE THOUSAND FORTY THREE AND
30/100 DOLLARS ($139,043.30) shall be due, and a like sum due on the first day
of each month thereafter, through and including January 1, 2002.

As a result of the increase in square feet leased, the Aggregate Rental shall be
increased by $1,072,703.31, or from $7,973,943.49 to $9,046,646.80.

4. INCREASED PARKING: Tenant's nonexclusive parking spaces shall be increased by
28 spaces or from 216 spaces to 244 spaces. In addition, Tenant shall retain its
4 exclusive parking spaces.

5. SECURITY DEPOSIT: Tenant's Security Deposit shall be increased by $43,433.76,
or from $234,652.84 to $278,086.60, payable upon Tenant's execution of this
Amendment No. 1.

6. MANAGEMENT FEE: Beginning October 21, 1997, Tenant shall pay to Landlord, in
addition to the Basic Rent and Additional Rent, a fixed monthly management fee
("Management Fee") equal to three percent (3%) of the Basic Rent due for each
month throughout the remaining Lease Term. Tenant shall remain liable for the
five percent (5%) management fee previously charged against Additional Rent
through October 20, 1997.

7. ASSIGNMENT AND SUBLETTING: Lease Paragraph 16 ("Assignment and Subletting")
shall be amended to include the following language:

        "Any and all sublease agreement(s) between Tenant and any and all
        subtenant(s) (which agreements must be consented to by Landlord,
        pursuant to the requirements of this Lease) shall contain the following
        language:

<PAGE>   4

               "If Landlord and Tenant jointly and voluntarily elect, for any
        reason whatsoever, to terminate the Master Lease prior to the scheduled
        Master Lease termination date, then this Sublease (if then still in
        effect) shall terminate concurrently with the termination of the Master
        Lease. Subtenant expressly acknowledges and agrees that (1) the
        voluntary termination of the Master Lease by Landlord and Tenant and
        the resulting termination of this Sublease shall not give Subtenant any
        right or power to make any legal or equitable claim against Landlord,
        including without limitation any claim for interference with contract or
        interference with prospective economic advantage, and (2) Subtenant
        hereby waives any and all rights it may have under law or at equity
        against Landlord to challenge such an early termination of the Sublease,
        and unconditionally releases and relieves Landlord, and its officers,
        directors, employees and agents, from any and all claims, demands,
        and/or causes of action whatsoever (collectively, "Claims"), whether
        such matters are known or unknown, latent or apparent, suspected or
        unsuspected, foreseeable or unforeseeable, which Subtenant may have
        arising out of or in connection with any such early termination of this
        Sublease. Subtenant knowingly and intentionally waives any and all
        protection which is or may be given by Section 1542 of the California
        Civil Code which provides as follows: "A general release does not extend
        to claims which the creditor does not know or suspect to exist in his
        favor at the time of executing the release, which if known by him must
        have materially affected his settlement with debtor."

               The term of this Sublease is therefore subject to early
        termination. Subtenant's initials here below evidence (a) Subtenant's
        consideration of and agreement to this early termination provision, (b)
        Subtenant's acknowledgement that, in determining the net benefits to be
        derived by Subtenant under the terms of this Sublease, Subtenant has
        anticipated the potential for early termination, and (c) Subtenant's
        agreement to the general waiver and release of Claims above.

               Initials:___________         Initials: ___________"
                         Subtenant                      Tenant

8. LIMITATION OF LIABILITY: Lease Paragraph 36 ("Limitation of Liability") shall
be deleted and replaced in its entirety by the following:

"36. LIMITATION OF LIABILITY In consideration of the benefits accruing
hereunder, Tenant and all successors and assigns covenant and agree that, in the
event of any actual or alleged failure, breach or default hereunder by Landlord:

(i)     the sole and exclusive remedy shall be against Landlord's interest in
        the Premises leased herein;

(ii)    no partner of Landlord shall be sued or named as a party in any suit or
        action (except as may be necessary to secure jurisdiction of the
        partnership);

(iii)   no service of process shall be made against any partner of Landlord
        (except as may be necessary to secure jurisdiction of the partnership);

<PAGE>   5

(iv)    no partner of Landlord shall be required to answer or otherwise plead to
        any service of process:

(v)     no judgment will be taken against any partner of Landlord:

(vi)    any judgment taken against any partner of Landlord may be vacated and
        set aside at any time without hearing;

(vii)   no writ of execution will ever be levied against the assets of any
        partner of Landlord;

(viii)  these covenants and agreements are enforceable both by Landlord and also
        by any partner of Landlord.

        Tenant agrees that each of the foregoing covenants and agreements shall
be applicable to any covenant or agreement either expressly contained in this
Lease or imposed by statute or at common law."

9. AUTHORITY TO EXECUTE. The parties executing this Agreement hereby warrant and
represent that they are properly authorized to execute this Agreement and bind
the parties on behalf of whom they execute this Agreement and to all of the
terms, covenants and conditions of this Agreement as they relate to the
respective parties hereto.

        EXCEPT AS MODIFIED HEREIN, all other terms, covenants, and conditions of
said September 2, 1994 Lease Agreement shall remain in full force and effect.

        IN WITNESS WHEREOF, Landlord and Tenant have executed this Amendment 
No. 1 to Lease as of the day and year last written below.


LANDLORD:                                TENANT:

JOHN ARRILLAGA SURVIVOR'S TRUST          VERITAS SOFTWARE CORPORATION
                                         a California corporation

By /s/ John Arrillaga                    By /s/ Jay A. Jones
   --------------------------------         ------------------------------------
   John Arrillaga, Trustee                  Jay A. Jones

Date:  10/21/97                          Title:  VP, General Counsel, Secretary
       ----------------------------              -------------------------------

RICHARD T. PEERY SEPARATE
PROPERTY TRUST

By  /s/ Richard Peery                    Date:  9/17/97
    -------------------------------             --------------------------------
    Richard T. Peery, Trustee

Date:  10/22/97
       ----------------------------