Take a look at the source code for the sp_helpsegment stored proc.
Generally speaking you'll be joining master..sysusages with <dbname>..syssegments.
Take a look at the source code for the sp_helpsegment stored proc.
Generally speaking you'll be joining master..sysusages with <dbname>..syssegments.