Exhibit 10.47

================================================================================


                               SECOND AMENDMENT TO
                       AMENDED AND RESTATED LOAN AGREEMENT

                             Dated as of May 4, 200l

                                      Among

                              PC CONNECTION, INC.,
                                  the Borrower

                                       and

                         CITIZENS BANK OF MASSACHUSETTS,
                                    as Agent

                                       and

                            THE BANKS PARTIES HERETO


================================================================================



            SECOND AMENDMENT TO AMENDED AND RESTATED LOAN AGREEMENT
             -------------------------------------------------------

     This SECOND AMENDMENT TO AMENDED AND RESTATED LOAN AGREEMENT is entered
into as of May 4, 2001 by and among PC CONNECTION, INC., a Delaware corporation
(the "Borrower"), CITIZENS BANK OF MASSACHUSETTS, CITIZENS BANK NEW HAMPSHIRE,
and FLEET NATIONAL BANK (successor by merger to Fleet Bank - NH) (together, the
"Banks") and CITIZENS BANK OF MASSACHUSETTS as Agent (the "Agent").

                                    Recitals
                                    --------

     The Borrower, the Banks and the Agent are parties to an Amended and
Restated Loan Agreement dated as of February 25, 2000, as amended (the "Loan
Agreement"). The Borrower, the Bank and the Agent desire to amend the Loan
Agreement as set forth below. All capitalized terms used herein and not
otherwise defined shall have the meanings set forth in the Loan Agreement.

     NOW, THEREFORE, subject to the satisfaction of the conditions to
effectiveness specified in Article 3, the Borrower, the Banks and the Agent
hereby amend the Loan Agreement as follows:

     Section 1.  Definitions. Add the following definition to Section 1 of the
Loan Agreement:

          "Permitted Guaranties" shall have the meaning set forth in Section 9.5
hereof.

     Section 2.  Guaranties. Section 9.5 of the Loan Agreement is hereby deleted
                 ----------
in its entirety and replaced as follows:

          Section 9.5.  Assumptions, Guaranties, Etc. of Indebtedness of Other
                        ------------------------------------------------------
          Persons. Assume, guarantee, endorse or otherwise be or become directly
          -------
          or contingently liable (including, without limitation, by way of
          agreement, contingent or otherwise, to purchase, provide funds for
          payment, supply funds to or otherwise invest in any Person or
          otherwise assure the creditors of any such Person against loss) in
          connection with any Indebtedness of any other Person, except
          Guaranties (the "Permitted Guaranties") (i) by endorsement of
          negotiable instruments for deposit or collection or similar
          transactions in the ordinary course of business, (ii) to IBM or DFS in
          connection with Indebtedness permitted under 9.1 l(g), (iii) provided
          for indebtedness of PC Connection Sales Corporation and Merrimack
          Services Corporation as provided for in a Guaranty or Guaranties to
          Dun & Bradstreet, Inc., substantially in the form of Exhibit J hereto,
          and (iv) to individual suppliers of PC Connection Sales Corporation
          and Merrimack Services Corporation, as requested from time to time in
          lieu of the blanket Guaranty in (iii), on their respective obligations
          to such individual suppliers, the guaranteed obligations in (iv) not
          to exceed guaranteed obligations in the amount of $100,000,000.
          Borrower must notify Agent (with copy to Agent's counsel) in writing
          immediately after entering into any Permitted Guaranties.


                                       1



     Section 3.  Miscellaneous.
                 -------------

                 (a)   The Borrower agrees that each of the Loan Documents shall
                       remain in full force and effect after giving effect to
                       this Second Amendment.

                 (b)   This Second Amendment represents the entire agreement
                       among the parties hereto relating to this Second
                       Amendment, and supersedes all prior understandings and
                       agreements among the parties relating to the subject
                       matter of this Second Amendment.

                 (c)   The Borrower agrees to pay on demand all of the Agent's
                       reasonable expenses in preparing, executing and
                       delivering this Second Amendment, and all related
                       instruments and documents, including, without limitation,
                       the reasonable fees and out-of-pocket expenses of the
                       Agent's special counsel.

                 (d)   The Borrower hereby confirms to the Agent that the
                       representations and warranties of the Borrower set forth
                       in Article 5 of the Loan Agreement (as amended and
                       supplemented hereby) are true and correct as of the date
                       hereof, as if set forth herein in full.

                 (e)   The Borrower has reviewed the provisions of this Second
                       Amendment and all documents executed in connection
                       therewith or pursuant thereto or incident or collateral
                       hereto or thereto from time to time and there is no Event
                       of Default thereunder, and no condition which, with the
                       passage of time or giving of notice or both, would
                       constitute an Event of Default thereunder.

                 (f)   The Borrower represents and warrants that the execution,
                       delivery or performance by the Borrower of any of the
                       obligations contained in this Second Amendment or in any
                       Loan Document do not require the consent, approval or
                       authorization of any person or governmental authority or
                       any action by or on account of with respect to any person
                       or governmental authority.

                 (g)   This Second Amendment shall be a Loan Document and shall
                       be governed by and construed and enforced under the laws
                       of The Commonwealth of Massachusetts without regard to
                       principles relating to choice of law.

                                  [END OF TEXT]


                                       2



     IN WITNESS WHEREOF, the Borrower and the Banks have caused this Second
Amendment to Amended and Restated Loan Agreement to be executed by their duly
authorized officers as of the date first set forth above.

                          PC CONNECTION,INC.


                          By:      __________________________________________
                          Name:
                          Title:


                          CITIZENS BANK OF MASSACHUSETTS, as Agent


                          By:      __________________________________________
                          Name:
                          Title:


                          CITIZENS BANK OF MASSACHUSETTS, as Lender


                          By:      __________________________________________
                          Name:
                          Title:

                          100 Summer Street
                          13th Floor
                          Boston, MA 02110
                          Telecopier No:
                          Attention:

                          CITIZENS BANK NEW HAMPSHIRE


                          By:      __________________________________________
                          Name:
                          Title:

                          875 Elm Street
                          Manchester, NH 03101
                          Telecopier No:
                          Attention:

                                       3



                          FLEET NATIONAL BANK (as successor by merger to
                          Fleet Bank - NH)


                          By:      __________________________________________
                          Name:
                          Title:

                          1155 Elm Street
                          Manchester, NH 03101
                          Telecopier No:
                          Attention:

                                       4