title: Sybase - Change a table column datatype on an IDENTITY column which is a User Definied Datatype
body: <p>I'm pretty good around Oracle but I've been struggling to find a decent solution to a problem I'm having with Sybase.</p>
  
  <p>I have a table which has an IDENTITY column which is also a User Defined Datatype (UDD) "id" which is numeric(10,0). I've decided to replace the UDD with the native datatype but I get an error when I do this. </p>
  
  <p>I've found that the only way to do this is:</p>
  
  <ul>
  <li>Rename the original table (table_a to table_a_backup) using the procedure sp_rename </li>
  <li>Recreate the original table (table_a) but use native data types</li>
  <li>Copy the contents of the backup table to the original (i.e insert into table_a select * from table_b) </li>
  </ul>
  
  <p>This works however I have over 10M records and it eventually runs out of log segment and halts (I can't increase the segment any more due to physical requirements).</p>
  
  <p>Does anybody have a solution, preferably not a solution which would involve processing the records as anything but one large set?</p>
  
  <p>Cheers,</p>
  
  <p>JLove</p>