SQL Server - storing ulong as primary key
I'm assuming by ulong that you mean a 64-bit unsigned integer.

Your best option if you truly need to span the entire range of a ulong is to use NUMERIC(20,0) or larger.  If you need to enforce the range of values to those valid for your data type, use a check constraint to restrict the values to between 0 and 18,446,744,073,709,551,615.  Alternately, you could use VARBINARY(8), but your application would have to be base-aware.