Context. The present epoch of the Gaia success gives us a possibility to predict the dynamical evolution of our Solar System in the global Galactic framework with high precision. Aims. We statistically investigated the total interaction of globular clusters with the Solar System during six billion years of look-back time. We estimated the gravitational influence of globular clusters’ flyby onto the Oort cloud system. Methods. To perform the realistic orbital dynamical evolution for each individual cluster, we used our own high-order parallel dynamical N-body φ-GPU code that we developed. To reconstruct the orbital trajectories of clusters, we used five external dynamical time variable galactic potentials selected from the IllustrisTNG-100 cosmological database and one static potential. To detect a cluster’s close passages near the Solar System, we adopted a simple distance criteria of below 200 pc. To take into account a cluster’s measurement errors (based on Gaia DR3), we generated 1000 initial positions and velocity randomisations for each cluster in each potential. Results. We found 35 globular clusters that have had close passages near the Sun in all the six potentials during the whole lifetime of the Solar System. We can conclude that at a relative distance of 50 pc between a GC and the SolS, we obtain on average ∼15% of the close passage probability over all six billion years, and at dR = 100 pc, we get on average ∼35% of the close passage probability over all six billion years. The globular clusters BH 140, UKS 1, and Djorg 1 have a mean minimum relative distance to the Sun of 9, 19, and 17 pc, respectively. We analysed the gravitational energetic influence on the whole Oort cloud system from the closest selected globular cluster flyby. We generally found that a globular cluster with a typical mass above a few times 105 M⊙ and with deep close passages in a 1–2 pc immediately results in the ejection more than ∼30% of particles from the Oort cloud system. Conclusions. We can assume that a globular cluster with close passages near the Sun is not a frequent occurrence but also not an exceptional event in the Solar System’s lifetime.