Oracle announced its plan to acquire Sun in April for $7.4bn.
The deal was approved by US competition regulators after a brief review, but the European Commission said it was concerned about the effects of the acquisition on Sun's MySQL open-source database, which it acquired last year, and began an investigation into the deal.
The Commission, which is the EU's top antitrust regulator, expressed serious concerns about Oracle, the world's largest proprietary database developer, gaining control of MySQL, which has in recent years been stealing market share away from its more expensive rivals: Oracle, IBM and Microsoft.
However, it swept those concerns aside in December after Oracle promised to safeguard MySQL for five years after the deal goes ahead.
Controversially, this pledge was made to vendors, software developers and customers of MySQL, and not to the Commission itself.
Oracle has now been granted unconditional approval to take over Sun Microsystems following the examination of the deal.
The deal still awaits approval in other jurisdictions, including Russia and China, but approval in the European Union is a big step forward for a deal hailed by some as transformational for the entire software industry, and by others as the killer of one of the most successful open source programs in the world, the MySQL database.
Explaining its decision, the Commission said its concerns about MySQL were not as great as it initially suspected.
"The investigation showed that although MySQL and Oracle compete in certain parts of the database market, they are not close competitors in others, such as the high-end segment," it said.
The investigation also showed that another open source database, PostgreSQL, could be a credible alternative to MySQL and could be expected to replace to some extent the competitive force currently exerted by MySQL on the database market.
It also concluded that MySQL itself could be forked by other open source software developers, and these might also develop in future to exercise "a competitive constraint on Oracle in a sufficient and timely manner".
Approval of the deal was secured by Oracle last month when it made 10 public pledges to MySQL users, developers and customers to support the open source database for the next five years.
Oracle announced its pledges on December 14. The same day, the Commission said it was optimistic it could reach a "satisfactory outcome".
Commission spokesman Jonathan Todd played down the importance of Oracle's pledges in securing regulatory approval of the deal. "They (the pledges) are taken into account as one of several factors," he said.
Critics of the deal, and in particular those that opposed Oracle taking control of MySQL, are unhappy with what they consider to be a capitulation by the Commission.
Michael Widenius, one of the founders of MySQL, lobbied hard for the Commission to exclude MySQL from the deal.
Earlier this week he said that the Commission gave up trying to safeguard MySQL in order to save face.
He dismissed the arguments the Commission gave for abandoning its initial concerns about the deal as "dishonest", and claimed that he and other opponents of MySQL's inclusion in the deal were ignored.
"Should Oracle get MySQL unconditionally, then I can only say that as a European I am ashamed of our regulatory system," the Swedish software programmer said.