Other options for using gdal on windows include the osgeo4win option. I'm not a fan of this option as it doesn't cooperate well with other code external to the osgeo4win sandbox. For example python.
This doc identifies how you can configure your paths so that you can use the gdal version that comes bundled with QGIS installs.
My preferred option for installing qgis is using chocolatey
Once chocolately is installed its just:
choco install qgis -y
And to update:
choco upgrade qgis -y
or to update all your choco packages:
choco upgrade -all -y
Once qgis is installed set up the following environment variables:
set QGIS_HOME="C:\Program Files\QGIS 3.10" set PROJ_LIB=%QGIS_HOME%\share\proj set GDAL_DATA=%QGIS_HOME%\share\gdal set GDAL_DRIVER_PATH=%QGIS_HOME%\bin\gdalplugins set PATH=%PROJ_LIB%;%QGIS_HOME%\bin;%QGIS_HOME%\python;%QGIS_HOME%\apps\qgis\bin;%QGIS_HOME%\apps\Qt5\bin;PATH%
After setting the following paths, if you installed QGIS 3.10 then the bundled version of gdal should be 2.4.1
>gdalinfo --version
GDAL 2.4.1, released 2019/03/15
And now double check that you have the OCI drivers setup
>ogrinfo --formats | grep OCI
OCI -vector- (rw+): Oracle Spatial
And finally the ultimate test... can we connect to oracle and dump a table to shape file:
ogr2ogr -f "ESRI Shapefile" <path to shp file> OCI:"<username>/<password>@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=<db host>)(PORT=<db port>)))(CONNECT_DATA=(SERVICE_NAME=<db service name>))):<oracle schema>.<oracle table to dump>"