I need to get access to a shelveset that TFS and TF Sidekicks can't access and I'm trying to figure out how the data is stored in the database so I can change the shelveset owner.
Ok, I found some information for you. Shelvesets are stored as workspaces in tbl_Workspace with the type = 1.
The following SQL will show you all of your shelvesets:
use TfsVersionControl;
select * from tbl_workspace where type = 1
Once you find the shelveset, you may want to try the TFS Power Tools to do the unshelve.
Power tools link: