title: Change Auto-Increment, Primary Key field from SMALLINT to INT in SQL Server
body: <p>What is the best way (low impact/low risk) to change a primary key field from SMALLINT to INT?  The field is configured to use "Identity Increment" to auto-increment.</p>
  
  <p>I'm starting with the following SQL:</p>
  
  <pre><code>ALTER TABLE category_types ALTER COLUMN id INT NOT NULL;
  </code></pre>
  
  <p>However, it generates the following error:</p>
  
  <blockquote>
    <p>ALTER TABLE ALTER COLUMN id failed because one or more objects access this column.</p>
  </blockquote>
  
  <p>What else is required?  Do I need to drop the keys then recreate them?  Will this impact the auto-incrementation?</p>
  
  <p><em>Note: the table doesn't have too many rows, so the performance of the solution is not critical.</em></p>