We are having this problem on one server and not on others - hoping someone has an answer. There test table consists of two columns:
create table test
(
col1 int IDENTITY(1,1) NOT NULL,
col2 char(10) NULL,
constraint [PK_Test] PRIMARY KEY
(col1)
)
When we try to change the data type of col2 to anything else through Enterprise Manager, the following error displays:
'Test' table
- Unable to create index 'PK_Test'.
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Table 'Test' already has a primary key defined on it.
[Microsoft][ODBC SQL Server Driver][SQL Server]Could not create constraint. See previous errors.
However, if we save the change script and run it, it works fine.