Issue resolved. Issue was due to java 1.8. i degraded the java version to 1.7 then it is upgraded without any issue. i don't know why it was not working with java 1.8? i think it is product bug.
I think you should not be using java 1.8. And can you try using FQDN instead of the "localhost" ?
According to the Documentation its clearly mentioned(http://pubs.vmware.com/vra-62/topic/com.vmware.ICbase/PDF/vrealize-automation-62-upgrading.pdf).
Upgrade the Database
An administrator must upgrade the database with the DBUpgrade.exe command before upgrading the IaaS
components.
The DBUpgrade command requires the names of the SQL Server database instance and the
vRealize Automation database and the port number if you are using a port other than the default SQL port.
It can use Windows authentication or it accepts credentials to access the database using SQL authentication.
It creates a log file named dbupgrade.log in the current directory if you do not provide a path name for a
different log file.
IMPORTANT Run this command only once during an upgrade.
If the correct Java version is not installed, or if the JAVA_HOME environment is set incorrectly, you see a
message similar to the following one:
Upgrading VMware vCAC or vCloud Automation Center IaaS SQL database
fails with the error: Java version 1.7(64-bit) must be installed,
the environment variable JAVA_HOME must be set to the Java install folder, and
%JAVA_HOME%\bin\java.exe (2089329)
For information about resolving the error, see the VMware Knowledge Base article at
Issue resolved. Issue was due to java 1.8. i degraded the java version to 1.7 then it is upgraded without any issue. i don't know why it was not working with java 1.8? i think it is product bug.