Exhibit 99.2

HERITAGE BANKSHARES, INC.

Certification of Chief Financial Officer

Pursuant to Section 111(b)(4) of the

Emergency Economic Stabilization Act of 2008, as amended

I, John O. Guthrie, certify ,
based on my knowledge, that:

(i) The compensation committee of Heritage Bankshares, Inc. (the Company) has discussed, reviewed,
and evaluated with senior risk officers at least every six months during any part of the most recently completed fiscal year that was a TARP period, the senior executive officer (SEO) compensation plans and the employee compensation plans and the
risks these plans pose to the Company;

(ii) The compensation committee of the Company has identified and limited during any part of the most
recently completed fiscal year that was a TARP period any features of the SEO compensation plans that could lead SEOs to take unnecessary and excessive risks that could threaten the value of the Company and has identified any features of the
employee compensation plans that pose risks to the Company and has limited those features to ensure that the Company is not unnecessarily exposed to risks;

(iii) The compensation committee has reviewed, at least every six months during any part of the most recently completed fiscal year that was a TARP period, the terms of each employee compensation plan and
identified any features of the plan that could encourage the manipulation of reported earnings of the Company to enhance the compensation of an employee, and has limited any such features;

(iv) The compensation committee of the Company will certify to the reviews of the SEO compensation plans and employee compensation plans required under (i) and (iii) above;

(v) The compensation committee of the Company will provide a narrative description of how it limited during any part of the most recently completed
fiscal year that included a TARP period the features in:

(A) SEO compensation plans that could lead SEOs to take unnecessary
and excessive risks that could threaten the value of the Company;

(B) Employee compensation plans that unnecessarily expose
the Company to risks; and

(C) Employee compensation plans that could encourage the manipulation of reported earnings of the
Company to enhance the compensation of an employee;

(vi) The Company has required that bonus payments of the SEOs and twenty next most highly
compensated employees, as defined in the regulations and guidance established under section 111 of EESA (bonus payments), be subject to a recovery or clawback provision during any part of the most recently completed fiscal
year that was a TARP period if the bonus payments were based on materially inaccurate financial statements or any other materially inaccurate performance metric criteria;

(vii) The Company has prohibited any golden parachute payment, as defined in the regulations and guidance established under section 111 of EESA, to an SEO or any of the next five most highly compensated
employees during any part of the most recently completed fiscal year that was a TARP period;

(viii) The Company has limited bonus payments to
its applicable employees in accordance with section 111 of EESA and the regulations and guidance established thereunder during any part of the most recently completed fiscal year that was a TARP period;

(ix) The Company and its employees have complied with the excessive or luxury expenditures policy, as defined in the regulations and guidance established
under section 111 of EESA, during any part of the most recently completed fiscal year that was a TARP period; and any expenses that, pursuant to the policy, required approval of the board of directors, a committee of the board of directors, an
SEO, or an executive officer with a similar level of responsibility were properly approved;

(x) The Company will permit a non-binding
shareholder resolution in compliance with any applicable Federal securities rules and regulations on the disclosures provided under the Federal securities laws related to SEO compensation paid or accrued during any part of the most recently
completed fiscal year that was a TARP period;



84



---

(xi) The Company will disclose the amount, nature, and justification for the offering during any part of the
most recently completed fiscal year that was a TARP period, of any perquisites, as defined in the regulations and guidance established under section 111 of EESA, whose total value exceeds $25,000 for any employee who is subject to the bonus
payment limitations identified in paragraph (viii);

(xii) The Company will disclose whether the Company, the board of directors of the
Company, or the compensation committee of the Company has engaged during any part of the most recently completed fiscal year that was a TARP period a compensation consultant; and the services the compensation consultant or any affiliate of the
compensation consultant provided during this period;

(xiii) The Company has prohibited the payment of any gross-ups, as defined in the
regulations and guidance established under section 111 of EESA, to the SEOs and the next twenty most highly compensated employees during any part of the most recently completed fiscal year that was a TARP period;

(xiv) The Company has substantially complied with all other requirements related to employee compensation that are provided in the agreement between the
Company and Treasury, including any amendments;

(xv) The Company has submitted to Treasury a complete and accurate list of the SEOs and the
twenty next most highly compensated employees for the current fiscal year, with the non-SEOs ranked in descending order of level of annual compensation, and with the name, title, and employer of each SEO and most highly compensated employee
identified; and

(xvi) I understand that a knowing and willful false or fraudulent statement made in connection with this certification may be
punished by fine, imprisonment, or both. (See,for example, 18 U.S.C. 1001.)



|                     |  |                        
|-------------------- |  | -----------------------
|Date: March 28, 2011 |  | /s/ John O. Guthrie    
|                     |  | John O. Guthrie,       
|                     |  | Chief Financial Officer



85