You can create a stored procedure on your linked server that will return the identity.
You should be using SCOPE_IDENTITY()
rather than @@IDENTITY
, by the way.
See this related question (Best way to get identity of inserted row?).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…