Check out the 'UAE Handbook', available in any bookstore. Published annually by the Governement and includes all information about where and what the main income of the UAE is.
Abu Dhabi and Ras Al Khiamah are actually the only 2 Emirates to actively drill for and refine oil. Dubai has a limited amount of gas, as does Sharjah and Ajman, but the wealth is distributed evenly between the Emirates, which is why the country is an alliance of families.
When the UAE was founded in 1971, having been previously a British protectorate called the Trucial States, HE Sheikh Zayed pulled together the various tribes and offered them the chance to form an alliance and thereby a stronger bargaining position on the international market. Initially, Abu Dhabi, Dubai, Sharjah and Umm Al Quwain were the only members, however Ajman, Ras Al Khaimah (due to the family links with Sharjah) and Fujeirah joined in 1972. Some other families decided to ally themselves with Sultan Qaboos of Oman, hence the reason there are small pockets of Omani territory within the UAE such as Masafi, Buraimi and the Mussandam Peninisula.
To state that Dubai has built its wealth on oil alone is a flasehood. Yes, there is oil investment in Dubai from the Al Nayhan family in Abu Dhabi, but the majority of the wealth was and is from trading as S&O correctly points out. Today, the largest investment income is in real estate and tourism.
Knight