On 1 August 1940, two months after the entry of Italy into World War II, Oliva became deputy commander of the Submarine Squadron Command, and in 1941 he was promoted to Vice Admiral. On April 24, 1943 he left the submarine service and was appointed commander of the 7th Naval Division, replacing AdmiralAlberto Da Zara. 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. The ships would sail from Genoa, making a stop in La Maddalena 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. 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. On August 4, 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. The operation began on August 6; 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. On September 9, 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 herself to be the most senior officer left in the squadron, and therefore took command, taking responsibility and the task of fulfilling the armistice orders. In compliance with the armistice terms, he raised the black flag, had blacks 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. 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 September 11. Here Oliva passed the command to Admiral Da Zara, his senior, who had come from Taranto with a naval group consisting of the battleship Caio Duilio, the light cruiserLuigi Cadorna and Pompeo Magno and the destroyer Nicoloso da Recco. 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, which he held until September 1946, a year after the war's end. Meanwhile, he was promoted to Admiral. 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. He left the active service on 1 January 1952 after reaching the age limits, and died in Rome on May 17, 1975.