This is a solution I developed to solve this issue. All you need is SQL access to your database. You should be able to copy and paste this into your SQL editor. It was developed for SQL Server. Slight variance would be needed for Oracle.
/*** Create a table in which to store the results. Table will have a shape field and query will create shape so it can be drawn in ArcGIS ***/
CREATE TABLE NearestNeighbor
(
Coordinates nvarchar(max),
ToLongitude float,
ToLatitude float,
ObjectID smallint,
TargetObjectID smallint,
FromLongitude float,
FromLatitude float,
LengthFeet float,
Shape geometry
);
/*** Update FeatureClass1 and FeatureClass2 to reflect the names of the two point coverages you want to use ***/
/*** Note this script assumes data is in WGS84 or a similar unprojected format. If your data is projected into units measured in feet or meters then you will need to update the geography line accordingly ***/
DECLARE @g geometry;
DECLARE @count smallint = 1
WHILE @count < (SELECT MAX(ObjectID) FROM FeatureClass1) + 1 -- Set to run through each record of the 'From Location' feature class
BEGIN
SET @g = (SELECT Shape FROM FeatureClass1 WHERE ObjectID = @count); -- Select a shape from the 'From Location' feature class
INSERT INTO NearestNeighbor
SELECT TOP(1) a.shape.ToString() as Coordinates -- Returns the coordinates of the closest feature to the 'From Location' feature
, a.shape.STX as ToLongitude
, a.shape.STY as ToLatitude
, @count as ObjectID
, objectid as TargetObjectID
, @g.STX as FromLongitude
, @g.STY as FromLatitude
, geography::STGeomFromText(geometry::STLineFromText('LINESTRING('+cast(@g.STX as varchar) +' '+cast(@g.STY as varchar) +','+cast(a.shape.STX as varchar) +' '+cast(a.shape.STY as varchar)+')', 4326).STAsText(),4326).STLength() * 3.28084 as LengthFeet
, geometry::STLineFromText('LINESTRING('+cast(@g.STX as varchar) +' '+cast(@g.STY as varchar) +','+cast(a.shape.STX as varchar) +' '+cast(a.shape.STY as varchar)+')', 4326) as Shape
FROM FeatureClass2 a -- 'To Location' feature class
WHERE a.shape.STDistance(@g) IS NOT NULL -- Search To Location feature class for nearest point to 'From Location' feature
ORDER BY a.shape.STDistance(@g) -- Select closest point
SET @count=@count+1 -- Set counter for next record in 'From Location' feature class
END