We mainly use MS SQL 2014, and simply script the stored procedure in the database under programmability\stored procedures....here's sample code in SQL database:
while @pt_num < = @Geog_Comp.STNumPoints()
begin
INSERT INTO [COMPONENT_CL] (COMP_ID, MEASURE, LONGITUDE, LATITUDE)
VALUES (@Comp_ID, @Geog_Comp.STPointN(@pt_num).M, @Geog_Comp.STPointN(@pt_num).Long, @Geog_Comp.STPointN(@pt_num).Lat)
--Set @meas_cur = @Geog_Comp.STPointN(@pt_num).M
--print @meas_cur
set @pt_num = @pt_num + 1
end