On 1 August 1940, two months after the entry of Italy into World War II, Oliva became deputy commander of the Submarine Squadron Command (the Italian submarine fleet), and in 1941 he was promoted to vice admiral.[2][1] On 24 April 1943 he left the submarine service and was appointed commander of the 7th Naval Division (with flag on the light cruiser Eugenio di Savoia), replacing Admiral Alberto Da Zara.[1]
In August 1943, during the last stages of the battle for Sicily, Admiral Luigi Sansonetti contacted Admiral Carlo Bergamini to submit him a plan of attack against the Allied fleet anchored in Palermo and Bona. In fact the planned attack was mostly intended to overcome the friction that were being created between the Italian and German forces, showing that the Regia Marina could still take the initiative.[3] The ships (light cruisers of the 7th and 8th Naval Divisions) would sail from Genoa, making a stop in La Maddalena (Sardinia) to deceive the enemy about their true intentions, and then shelling the ports of Palermo and Bona. When Bergamini received these orders, he expressed his opposition to the operation against Bona, because, in his view, chances of a successful outcome would be low.[4] He thereafter proposed at least to reverse the tasks assigned to the two divisions to be deployed, using the faster 7th Division against Bona and the 8th against Palermo. Bergamini also explained his doubts to Admiral Giuseppe Sparzani, and therefore on that evening he was contacted by Sansonetti, who told him of the temporary suspension of all operations.[5] On 4 August it was decided that the operation would only target the port of Palermo, where, according to aerial reconnaissance, there was a considerable concentration of enemy shipping.[6]
The operation began on 6 August; the 7th Division, under the command of Admiral Oliva, ventured near the island of Ustica, where it met a small convoy of British landing craft. Oliva ordered to open fire on them, but soon after, realizing he had compromised the surprise, he reversed course and returned to La Spezia.[7]
On 9 September 1943, following the announcement of the armistice of Cassibile, Oliva set sail from La Spezia heading for La Maddalena with his Seventh Division, as part of the squadron of Admiral Bergamini. When a German air attack, on that afternoon, sank the battleship Roma, causing the death of Admiral Bergamini, Oliva found himself to be the most senior officer left in the squadron, and therefore took command, taking responsibility and the task of fulfilling the armistice orders.[2][8][1] In compliance with the armistice terms, he raised the black flag, had black circles drawn on the decks, and sailed towards Bona, in Algeria, as Supermarina had ordered; he managed to convince Admiral Luigi Biancheri, reluctant to follow such orders, to do the same.[9][1] Off the Algerian coast he met the Allied naval squadron carrying Admiral Andrew Browne Cunningham and General Dwight Eisenhower; the Italian fleet then headed for Malta, where it arrived on 11 September. Here Oliva passed the command to Admiral Da Zara, his senior, who had come from Taranto with a naval group consisting of the battleship Duilio, the light cruiser Luigi Cadorna and Pompeo Magno and the destroyer Nicoloso da Recco.[1]
Oliva left the command of the 7th Division on 1 September 1944, during the co-belligerence, and in February 1945 he was given command of the Southern Tyrrhenian Naval Department (headquartered in Naples), which he held until September 1946, a year after the war's end.[1] Meanwhile, he was promoted to admiral.[1]
He subsequently commanded the Taranto Naval Department until March 1948, and then was commander in chief of the fleet of the newly formed Marina Militare until 14 December 1950.[1]
He left the active service on 1 January 1952 after reaching the age limits, and died in Rome on 17 May 1975.[1]