Even the case where you know the isomorphism type of the underlying topological space of $X=\operatorname{Spec} R$ and the isomorphism type of every local ring $\mathcal{O}_{X,x}$, this is not enough information to determine $X$ uniquely. Consider $\operatorname{Spec} \Bbb C[t]$ and $\operatorname{Spec} \Bbb C[t,t^{-1}]$. As topological spaces, these are homeomorphic (each have one generic point, $|\Bbb C|$ closed points, and the open sets consist of the empty set and sets who's complement is finitely many closed points) and every local ring is isomorphic to either $\Bbb C(t)$ (the generic point), or $\Bbb C[t]_{(t)}$ (the closed points). But $\Bbb C[t]\not\cong\Bbb C[t,t^{-1}]$.
In the more general situation where you only know some of the local rings, things are even worse: you could have nilpotents supported at the points where you don't know the local rings and you will never be able to detect these. The basic issue here is that while local rings tell you a lot (any single local ring of an irreducible, generically reduced scheme determines the function field and thus the birational class of such a variety), you still have a wide latitude to alter your scheme on closed subsets. In some sense, this is the foundational question of birational geometry: if we know two varieties are birational, how much more can we say?
Your question about tangent spaces suffers from the same issues because knowing dimensions of tangent spaces is a strictly weaker condition that knowing isomorphism types of local rings. For instance, any two smooth curves have all tangent spaces of dimension one at each closed point, but there's a smooth curve of every non-negative integer genus and they are all non-isomorphic.