Two major Virginia-based bank holding companies have reported higher earnings for both the second quarter and the first half of 1986.

United Virginia Bankshares Inc. of Richmond reported a 16 percent gain in net income for the second quarter, with earnings of $20.8 million (74 cents a share) this year, compared with $17.9 million (71 cents) in the same period in 1985. For the first six months, earnings rose 22 percent to $40.7 million ($1.45), the bank said.

As of June 30, UVB had $8.4 billion in total assets and deposits of $6.2 billion. The figures for 1985 were restated to reflect acquisition of two banks and a 2-for-1 common stock dividend that was effective May 23, the announcement said.

First Virginia Banks Inc. of Falls Church said that it earned $11.8 million (69 cents a share) in the second quarter, a 14 percent increase over last year's income of $10.36 million (61 cents) during the same period.

For the first six months, earnings were up 19 percent to $23.79 million ($1.39), compared with $20.07 million ($1.18) in the first half of 1985. Total assets as of June 30 were $3.603 billion, up 14 percent from $3.156 billion on the same date a year earlier. The 1985 results were restated to include four banks acquired since the middle of last year, the bank said.