**Abstract** : Context. The first observations of the GRAVITY instrument obtained in 2016, have shown that it should become possible to probe the spacetime close to the supermassive black hole Sagittarius A* (Sgr A*) at the Galactic center by using accurate astrometric positions of the S2 star.Aims. The goal of this paper is to investigate the detection by GRAVITY of different relativistic effects affecting the astrometric and/or spectroscopic observations of S2 such as the transverse Doppler shift, the gravitational redshift, the pericenter advance and higher-order general relativistic (GR) effects, in particular the Lense-Thirring effect due to the angular momentum of the black hole.Methods. We implement seven stellar-orbit models to simulate both astrometric and spectroscopic observations of S2 beginning near its next pericenter passage in 2018. Each model takes into account a certain number of relativistic effects. The most accurate one is a fully GR model and is used to generate the mock observations of the star. For each of the six other models, we determine the minimal observation times above which it fails to fit the observations, showing the effects that should be detected. These threshold times are obtained for different astrometric accuracies as well as for different spectroscopic errors.Results. Transverse Doppler shift and gravitational redshift can be detected within a few months by using S2 observations obtained with pairs of accuracies (σA,σV) = (10−100 μas, 1−10 km s-1) where σA and σV are the astrometric and spectroscopic accuracies, respectively. Gravitational lensing can be detected within a few years with (σA,σV) = (10 μas, 10 km s-1). Pericenter advance should be detected within a few years with (σA,σV) = (10 μas, 1−10 km s-1). Cumulative high-order photon curvature contributions, including the Shapiro time delay, affecting spectroscopic measurements can be observed within a few months with (σA,σV) = (10 μas, 1 km s-1). By using a stellar-orbit model neglecting relativistic effects on the photon path except the major contribution of gravitational lensing, S2 observations obtained with accuracies (σA,σV) = (10 μas, 10 km s-1), and a black hole angular momentum (a,i′,Ω′) = (0.99,45°,160°), the 1σ error on the spin parameter a is of about 0.4, 0.2, and 0.1 for a total observing run of 16, 30, and 47 yr, respectively. The 1σ errors on the direction of the angular momentum reach σi′ ≈ 25° and σΩ′ ≈ 40° when considering the three orbital periods run. We found that the uncertainties obtained with a less spinning black hole (a = 0.7) are similar to those evaluated with a = 0.99.Conclusions. The combination of S2 observations obtained with the GRAVITY instrument and the spectrograph SINFONI (Spectrograph for INtegral Field Observations in the Near Infrared) also installed at the VLT (Very Large Telescope) will lead to the detection of various relativistic effects. Such detections will be possible with S2 monitorings obtained within a few months or years, depending on the effect. Strong constraints on the angular momentum of Sgr A* (e.g., at 1σ = 0.1) with the S2 star will be possible with a simple stellar-orbit model without using a ray-tracing code but with approximating the gravitational lensing effect. However, long monitorings are necessary, and we thus must rely on the discovery of closer-in stars near Sgr A* if we want to efficiently constrain the black hole parameters with stellar orbits in a short time, or monitor the flares if they orbit around the black hole.Key words: black hole physics / relativistic processes / Galaxy: center / astrometry / infrared: stars