1
                                                                     EXHIBIT 4.2


                      AMENDED AND RESTATED LIMITED GUARANTY

         THIS AMENDED AND RESTATED LIMITED GUARANTY ("Guaranty"), is made and
entered into effective as of March 22, 1999 by DOUGLAS A. P. HAMILTON
("Guarantor"), for the benefit of COMPASS BANK, a Texas state chartered banking
institution ("Bank").

                              W I T N E S S E T H:

         WHEREAS, on the date hereof, Bank has advanced or will advance certain
funds to CARRIZO OIL & GAS, INC., a Texas corporation ("Borrower") pursuant to
that certain Fifth Amendment dated effective March 22, 1999 (the "Fifth
Amendment") to the First Amended, Restated, and Combined Loan Agreement dated
August 28, 1997, as amended by the First Amendment thereto dated December 23,
1997, the Second Amendment thereto dated December 30, 1997, the Third Amendment
thereto dated July 30, 1998, the Fourth Amendment thereto dated September 24,
1998 and said Fifth Amendment (collectively, the "Loan Agreement"), specifically
including the indebtedness evidenced by that certain term promissory note dated
of even date with the Fifth Amendment, executed by Borrower and payable to Bank,
in the principal amount of $9,000,000.00 and all other notes given in
substitution therefor or in modification, renewal or extension thereof in whole
or in part (the "Second Term Note");

         WHEREAS, as a condition to Bank's entry into the Fifth Amendment, and
its advance of funds to Borrower thereunder, Guarantor has agreed to enter into
this Guaranty of certain indebtedness owed or to be owed by Borrower to Bank;

         WHEREAS, Guarantor is a senior executive and substantial shareholder of
Borrower; and

         WHEREAS, Guarantor will directly and indirectly benefit from the Second
Term Loan, as defined in the Loan Agreement, and evidenced by the Second Term
Note.

         NOW, THEREFORE, for and in consideration of the premises and the
extension of credit by Bank to Borrower pursuant to the Loan Agreement, and for
TEN AND NO/100 DOLLARS ($10.00) and other good and valuable consideration, the
receipt and sufficiency of which are hereby acknowledged, and to induce Bank to
execute the Fifth Amendment, Bank and Guarantor hereby agree as follows:

         1. Guarantor unconditionally guarantees the prompt payment to Bank of
the following (the "Guaranteed Indebtedness"):

         (a)      Any and all indebtedness, obligations (including reimbursement
                  obligations) and liabilities of Borrower to Bank now existing
                  or hereafter incurred in connection with or incident to the
                  Second Term Loan, under or arising out of or in connection
                  with any documents executed in connection with any
                  indebtedness of Borrower to Bank in connection with the Second
                  Term Loan or any promissory note or notes executed by Borrower
                  at any time in connection with the Second Term Loan, whether
                  for principal, interest,

   2

                  penalty interest, fees, expenses or otherwise, including,
                  without limitation, all sums, principal, accrued interest and
                  other amounts owing with respect to the Second Term Note,
                  together with any and all renewals, extensions and/or
                  rearrangements thereof, whether with or without notice to
                  Guarantor;

         (b)      All interest, charges, expenses, attorneys' or other fees and
                  any other sums payable to or incurred by the Bank in
                  connection with the execution, administration or enforcement
                  of the Bank's rights and remedies under the Second Term Note;
                  and

         (c)      All post-petition interest on the Guaranteed Indebtedness in
                  the event of a bankruptcy or insolvency of the Borrower.

Provided, however, that Guarantor's obligation hereunder shall never exceed
$4,500,000.00. Guarantor shall at all times maintain at least $5,000,000.00 in
Liquid Assets (defined below). To evidence such maintenance of Liquid Assets,
Guarantor shall deliver to Bank, on or before the forty-fifth (45th) day after
the end of each calendar quarter, a Certificate of Liquidity in the form
attached hereto as Exhibit "A", certifying the value of such Guarantor's Liquid
Assets effective as of the end of each calendar quarter. "Liquid Assets" shall
mean Cash on hand and balances in checking accounts available for immediate
withdrawal, the value, from time to time, of short-term, highly liquid
investments that are readily convertible to Cash (defined below), such as
treasury bills, commercial paper and money market funds, and the value, from
time to time, of unrestricted shares of stock that are publicly traded on the
New York Stock Exchange, the American Stock Exchange, or NASDAQ, and otherwise
acceptable to the Bank, but only to the extent the foregoing are free from all
liens, claims and encumbrances, including liens or security interests in favor
of the Bank. "Cash" shall mean legal tender of the United States of America.

         2. If the Guaranteed Indebtedness is not paid by Guarantor when due, as
required herein, and this Guaranty is placed in the hands of an attorney for
collection, or if this Guaranty is enforced by suit or through the Bankruptcy
Court or through any judicial proceedings, Guarantor shall pay to Bank an amount
equal to its reasonable attorneys' fees and collection costs incurred by Bank in
the collection of the Guaranteed Indebtedness.

         3. This is an absolute, complete and continuing Guaranty, and no notice
of the Guaranteed Indebtedness or any extension of credit already or hereafter
contracted by or extended to Borrower need be given to Guarantor, nor shall
anything herein contained be a limitation upon the amount of credit which may be
extended to Borrower, the numbers of transactions with Borrower, repayments by
Borrower to Bank, or the allocation by Bank of repayment by Borrower, it being
the understanding of the Guarantor that Guarantor's liability shall continue
hereunder so long as any of the Guaranteed Indebtedness remains unpaid. Borrower
and Bank may rearrange, increase, decrease, extend and/or renew the Guaranteed
Indebtedness without notice to Guarantor and in such event Guarantor will remain
fully bound hereunder on the Guaranteed Indebtedness. The obligations of
Guarantor hereunder shall not be released, impaired or diminished by any
amendment, modification or alteration of the Loan Agreement or the Second Term
Note. Guarantor expressly waives all notices of any kind, presentment for
payment, demand for payment, protest, notice of protest, notice of intent to
accelerate, notice of acceleration, dishonor, diligence, notice of any amendment
of the Loan Agreement, notice of any adverse change in the financial condition
of 


                                        2
   3

Borrower, notice of any adjustment, indulgence, forbearance or compromise
that might be granted or given by Bank to Borrower, and also notice of
acceptance of this Guaranty, acceptance on the part of Bank being conclusively
presumed by its request for this Guaranty and delivery of the same to it. The
liability and obligations of Guarantor hereunder shall not be affected or
impaired by any action or inaction by Bank in regard to any matter waived or
notice of which is waived by Guarantor in this paragraph or in any other
paragraph of this Guaranty.

         4. Guarantor authorizes Bank, without notice or demand and without
affecting Guarantor's liability hereunder, (a) to take and hold security for the
payment of this Guaranty and/or the Guaranteed Indebtedness, and to exchange,
enforce, waive and/or release any such security; (b) to apply such security and
direct the order or manner of sale thereof as Bank in its discretion may
determine; (c) to obtain a guaranty of the Guaranteed Indebtedness from any one
or more other persons, corporations or entities whomsoever and to enforce,
waive, rearrange, modify, limit or release at any time or times such other
persons, corporations or entities from their obligations under such guaranties;
(d) to waive or delay the exercise of any of its rights or remedies against the
Borrower or any other person or entity; (e) to renew, extend, or modify the
terms of any of the Guaranteed Indebtedness or any instrument or agreement
evidencing the same; and (f) to fully or partially release at any time any
Guarantor which executes this Guaranty whether with or without consideration.

         5. Guarantor waives any right to require Bank to (a) proceed against,
or make any effort at the collection of the Guaranteed Indebtedness from
Borrower or any other guarantor or party liable for the Guaranteed Indebtedness;
(b) proceed against or exhaust any collateral held by Bank; or (c) pursue any
other remedy in Bank's power whatsoever. Guarantor further waives any and all
rights and remedies which Guarantor may have or be able to assert by reason of
the provisions of Chapter 34 of the Texas Business and Commerce Code. Guarantor
waives any defense arising by reason of any disability, lack of corporate
authority or power, or other defense of Borrower or any other guarantor of the
Guaranteed Indebtedness, and Guarantor shall remain liable under this Guaranty
regardless of whether Borrower or any other guarantor be found not liable on the
Guaranteed Indebtedness for any reason including, without limitation, insanity,
minority, disability, bankruptcy, insolvency, death or corporate dissolution,
even though rendering the Guaranteed Indebtedness void or unenforceable or
uncollectible as against Borrower or any other guarantor. This Guaranty shall
continue to be effective or be reinstated, as the case may be, if at any time
any payment of any of the Guaranteed Indebtedness is rescinded or must otherwise
be returned by Bank upon the insolvency, bankruptcy or reorganization of
Borrower or otherwise, all as though such payment had not been made and will,
thereupon, guarantee payment of such amount as to which refund or restitution
has been made, together with interest accruing thereon subsequent to the date of
refund or restitution at the applicable rate under the Loan Agreement and
collection costs and fees (including, without limitation, attorneys' fees)
applicable thereto, subject to the limitations set forth in Sections 1 and 10
hereof.

         6. The liability and obligations of Guarantor hereunder shall not be
affected or impaired by (a) the failure of Bank or any other party to exercise
diligence or reasonable care in the preservation, protection or other handling
or treatment of all or any part of the collateral securing payment of all or any
part of the Guaranteed Indebtedness, (b) the failure of any security interest or
lien intended to be granted or created to secure the Guaranteed Indebtedness to
be properly perfected 


                                       3
   4

or created or the unenforceability of any security interest or lien for any
other reason, or (c) the subordination of any such security interest or lien to
any other security interest or lien.

         7. Bank may pursue any remedy without altering the obligations of
Guarantor hereunder and without liability to Guarantor, even though Bank's
pursuit of such remedy may result in Guarantor's loss of rights of subrogation
or to proceed against others for reimbursement or contribution or any other
right. In no event shall any payment by Guarantor entitle it, by subrogation or
otherwise, to any rights against Borrower or any right to participate in any
security now or hereafter held by Bank prior to payment in full of all of the
Guaranteed Indebtedness and, in any event, not until 367 days after the making
of any payment and/or the granting of any security interest by Borrower or any
other guarantor to Bank in connection with the Guaranteed Indebtedness.

         8. Should the status of Borrower change in any way, including, without
limitation, as a result of any dissolution of Borrower, any sale, lease or
transfer of any or all of the assets of Borrower, any changes in the
shareholders of Borrower, or any reorganization of Borrower, this Guaranty shall
continue, and shall cover the Guaranteed Indebtedness under the new status.

         9. The liability of Guarantor for the payment of the Guaranteed
Indebtedness shall be primary and not secondary.

         10. Guarantor is familiar with and has independently reviewed the books
and records regarding the financial condition of Borrower and is familiar with
the value of any and all collateral intended to be granted as security for the
payment of the Guaranteed Indebtedness; Guarantor is not, however, relying on
such financial condition or such collateral as an inducement to enter into this
Guaranty. As of the date hereof, and after giving effect to this Guaranty and
the contingent obligations evidenced hereby, Guarantor is, and will be, solvent,
and has and will have assets and property which, valued fairly, exceed such
Guarantor's obligations, debts and liabilities, and has and will have assets and
property sufficient to satisfy, repay and discharge the same. Notwithstanding
the definition of Guaranteed Indebtedness herein, the liability of Guarantor
hereunder is limited to (a) the lowest amount that would render this Guaranty
void against creditors or creditors' representatives under any fraudulent
conveyance or similar law or under Sections 544 or 548 of the Bankruptcy Code of
1978, as revised, minus (b) $1.00.

         11. If Borrower shall at any time or times be or become obligated to
Bank for payment of any indebtedness other than the Guaranteed Indebtedness,
Bank (without in any way impairing its rights hereunder or diminishing
Guarantor's liability) shall be at liberty at any time or times to apply to such
other indebtedness any amounts paid to or received by or coming into the hands
of Bank from or attributable to Borrower or any other person or party liable for
any of such other indebtedness or from or attributable to or representing
proceeds of any property or security held by Bank securing payment of such other
indebtedness or any credits, deposits or offsets due Borrower or other party
liable on any of such other indebtedness (whether or not the Guaranteed
Indebtedness or such other indebtedness are then due), it being intended to give
Bank the right to apply all payments, credits and offsets and amounts becoming
available for application on or credit against the indebtedness of Borrower to
Bank (now or hereafter existing) first toward payment and satisfaction of the
Borrower's indebtedness not hereby guaranteed, before making application thereof
on or against the Guaranteed Indebtedness.


                                       4
   5

         12. Guarantor represents and warrants that this Guaranty accurately and
completely embodies the entire agreement between Guarantor and Bank with respect
to the respective rights, obligations and liabilities of Guarantor and Bank
hereunder, and supersedes all prior agreements and understandings, if any,
relating to the subject matter hereof. Guarantor acknowledges that Guarantor is
not relying on any representations (oral or otherwise) of Bank, or any other
party, other than as expressly described in this Guaranty.

         13. This Guaranty was reviewed by Guarantor, and Guarantor acknowledges
and agrees that Guarantor (a) understands fully all of the terms of this
Guaranty and the consequences and implications of Guarantor's execution of this
Guaranty, and (b) has been afforded an opportunity to have this Guaranty
reviewed by, and to discuss the terms, consequences and implications of this
Guaranty with an attorney or other such persons as Guarantor may have desired.

         14. This Guaranty is and shall be in every particular available to the
successors and assigns of Bank and is and shall always be fully binding upon the
heirs, executors, administrators, successors and assigns of Guarantor. This
Guaranty is intended for and shall inure to the benefit of Bank and each and
every other person who shall from time to time be or become the owner or holder
of any of the Guaranteed Indebtedness, and each and every reference herein to
"Bank" shall also include and refer to each and every successor or assignee of
Bank at any time holding or owning any part of or interest in any part of the
Guaranteed Indebtedness. This Guaranty shall be transferable and negotiable,
with the same force and effect and to the same extent that the Guaranteed
Indebtedness is transferable, it being understood and stipulated that upon the
assignment or transfer by Bank of any of the Guaranteed Indebtedness the legal
or beneficial owner of the Guaranteed Indebtedness (or part thereof or interest
therein thus transferred or assigned by Bank) shall also, unless provided
otherwise by Bank in its assignment, have and may exercise all of the rights
granted to Bank under this Guaranty to the extent of the part of or interest in
the Guaranteed Indebtedness thus assigned or transferred to such person or
entity. Guarantor expressly waives notice of transfer or assignment of the
Guaranteed Indebtedness, or any part thereof, or of the rights of Bank
hereunder.

         15. All amounts becoming payable by Guarantor to Bank under this
Guaranty shall be payable at Bank's offices in the City of Houston, Harris
County, Texas.

         16. Any notice hereunder to Guarantor shall be in writing, duly stamped
and addressed to Guarantor at the address shown below Guarantor's signature
hereto, or at such other address as Guarantor may by written notice, received by
Bank, have designated as Guarantor's address for such purpose. Any notice
provided for herein shall become effective upon the earlier of (a) the first
business day of Bank following the deposit in a regularly maintained postal
deposit box of the United States Postal Service, or (b) the day of its receipt
by Guarantor; but actual notice, however given or received, shall always be
effective. The preceding sentence shall not be construed in any way to affect or
impair any waiver of notice or demand herein provided or to require giving of
notice or demand to or upon Guarantor in any situation or for any reason.

         17. It is the intention of the parties hereto to comply strictly with
all applicable usury laws; accordingly, it is agreed that notwithstanding any
provisions to the contrary in this Guaranty, or in any documents securing
payment hereof or otherwise relating hereto, in no event shall this Guaranty or
such documents require the payment or permit the collection of an aggregate
amount 


                                       5
   6

of interest in excess of the maximum amount permitted by such laws, including
the laws of the State of Texas and the laws of the United States of America. If
any such excess of interest is contracted for, charged or received under this
Guaranty or under the terms of any documents securing payment hereof or
otherwise relating hereto, or if under any circumstances, the amount of interest
(including all amounts payable hereunder which are not denominated as interest
but which constitute interest under the applicable laws) contracted for, charged
or received under this Guaranty shall exceed the maximum amount of interest
permitted by the applicable usury laws, then in any such event (a) the
provisions of this paragraph shall govern and control, (b) Guarantor shall not
be obligated to pay the amount of such interest to the extent that it is in
excess of the maximum amount of interest permitted by the applicable usury laws,
(c) any such excess interest which may have been collected shall be either
applied as a credit against the then unpaid Guaranteed Indebtedness or, if the
Guaranteed Indebtedness shall have been paid in full, refunded to Guarantor, and
(d) the effective rate of interest shall be automatically reduced to the maximum
lawful contract rate allowed under the applicable usury laws as now or hereafter
construed by the courts having jurisdiction thereof. It is further agreed that
without limitation of the foregoing, all calculations of the rate of interest
contracted for, charged or received under this Guaranty or under such other
documents which are made for the purpose of determining whether such rate
exceeds the maximum lawful contract rate, shall be made, to the extent permitted
by applicable usury laws, by amortizing, prorating, allocating and spreading in
equal parts during the full period during which this Guaranty is to be in
effect, all interest at any time contracted for, charged or received from
Guarantor or otherwise by the holder or holders hereof in connection with this
Guaranty.

         18. In case any of the provisions of this Guaranty shall for any reason
be held to be invalid, illegal, or unenforceable, such invalidity, illegality,
or unenforceability shall not affect any other provisions hereof, and this
Guaranty shall be construed as if such invalid, illegal, or unenforceable
provision had never been contained herein.

         19. In all instances herein, the singular shall be construed to include
the plural and the masculine to include the feminine.

         20. This Guaranty may be executed in multiple counterparts each of
which shall constitute an original, but all of which when taken together shall
constitute one and the same Guaranty.

         21. THIS GUARANTY SHALL BE GOVERNED BY AND CONSTRUED IN ACCORDANCE WITH
THE LAWS OF THE STATE OF TEXAS AND THE UNITED STATES OF AMERICA. All actions or
proceedings with respect to the Guaranteed Indebtedness or this Guaranty may be
instituted in the Courts of the State of Texas located in Harris County, Texas,
or the United States District Court for the Southern District of Texas, and by
execution and delivery of this Guaranty, Guarantor irrevocably and
unconditionally submits to the jurisdiction (both subject matter and personal)
of each such Court, and irrevocably and unconditionally waives (a) any objection
Guarantor may now or hereafter have to the laying of venue in any such Courts,
(b) any claim that any action or proceeding brought in any of such Courts has
been brought in an inconvenient forum, and (c) any right to bring any action or
proceeding with respect to the Guaranteed Indebtedness or this Guaranty in any
forum other than the courts of the State of Texas located in Harris County,
Texas, or the United States District Court for the Southern District of Texas.


                                       6
   7

         22. GUARANTOR HEREBY RELEASES AND AGREES TO INDEMNIFY AND HOLD BANK AND
ITS OFFICERS, EMPLOYEES, DIRECTORS, AGENTS AND ATTORNEYS (COLLECTIVELY THE "BANK
PARTIES") HARMLESS, FROM AND AGAINST ALL CLAIMS, DAMAGES, LIABILITIES AND
EXPENSES, KNOWN OR UNKNOWN, ACCRUED AND UNACCRUED, INCLUDING ANY OF THE
FOREGOING ALLEGED TO HAVE RESULTED FROM NEGLIGENCE OF ANY OF THE BANK PARTIES,
UNLESS ATTRIBUTABLE TO BANK PARTIES' OWN GROSS NEGLIGENCE OR WILFUL MISCONDUCT,
THAT MAY NOW OR HEREAFTER BE ASSERTED AGAINST ANY OF BANK PARTIES IN CONNECTION
WITH OR ARISING OUT OF ANY INVESTIGATION, LITIGATION OR PROCEEDING DIRECTLY OR
INDIRECTLY RELATING TO OR ARISING OUT OF ANY OF THE TRANSACTIONS CONTEMPLATED BY
THE LOAN AGREEMENT OR THIS GUARANTY.

         23. Guarantor represents and warrants to Bank that this Guaranty is a
valid, binding and enforceable obligation of Guarantor and does not violate any
provisions of any law, rule, regulation, contract or agreement enforceable
against Guarantor.

         24. Guarantor hereby agrees that a counterpart of this Guaranty bearing
the signature of Guarantor may be effectively delivered to the Bank by the
delivery of an electronic facsimile sent via telecopier; and that Guarantor
shall be bound by his facsimile signature thereon.

         25. This Guaranty amends, restates and replaces that certain Limited
Guaranty dated September 24, 1998 previously executed and delivered by Guarantor
in connection with the Loan Agreement.

         EXECUTED this day of March, 1999.

                                   GUARANTOR:


                                   --------------------------------------------
                                   DOUGLAS A. P. HAMILTON

                                   Address: c/o Anatar Investments, Inc.
                                            485 Madison Avenue
                                            23rd Floor
                                            New York, NY 10022


                                       7
   8

STATE OF TEXAS

COUNTY OF HARRIS



         We _________________________, and _______________________, sign our
names to this instrument as witnesses to the signature of DOUGLAS A. P. HAMILTON
(the "Signor"), and being duly sworn, do hereby declare to the undersigned
authority that we are personally acquainted with the Signor, that we know the
Signor to be the person that he purports to be through his signature, that he
has signed this instrument willingly, and that each of us, in the presence and
hearing of the Signor, the undersigned authority, and each other, hereby execute
this instrument as witnesses to the Signor's signing, and that to the best of
our knowledge, the Signor is twenty-one years of age or older, of sound mind,
and under no constraint or undue influence.


                                         WITNESSES:



                                         --------------------------------------
                                         Printed Name:



                                         --------------------------------------
                                         Printed Name:



                                       8
   9

STATE OF TEXAS

COUNTY OF HARRIS


         The foregoing instrument was subscribed, sworn to and acknowledged
before me by DOUGLAS A. P. HAMILTON this 30th day of March, 1999.



                                         --------------------------------------
                                         Notary Public in and for
                                         The State of Texas


[Notarial Seal or Stamp]


                                       9