Our database person(or the closest thing we have, anyway) finally got around to trying the script and got the following error, but he doesn't know how to fix it. Any suggestions?
System.Data.SqlClient.SqlException (0x80131904): The CREATE UNIQUE INDEX
statement terminated because a duplicate key was found for the object name
'dbo.UserProfile' and the index name 'IX_UserProfile_PropertyDefinitionID'. The
duplicate key value is (1266, 66).
The statement has been terminated.
at
System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean
breakConnection, Action`1 wrapCloseInAction)
at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at
System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand
cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler,
TdsParserStateObject stateObj, Boolean& dataReady)
at
System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName,
Boolean async, Int32 timeout, Boolean asyncWrite)
at
System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1
completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean
asyncWrite)
at
System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at
DotNetNuke.Data.SqlDataProvider.ExecuteScriptInternal(String connectionString,
String script)
ClientConnectionId:32a95a97-2271-4dce-bd1c-c7f73e583c48
CREATE UNIQUE NONCLUSTERED INDEX
[IX_UserProfile_PropertyDefinitionID] ON dbo.[UserProfile]
([PropertyDefinitionID] ASC, [UserID] ASC)
INCLUDE ([ProfileId], PropertyValue)
System.Data.SqlClient.SqlException
(0x80131904): There is already an object named 'PK_Profile' in the database.
Could
not create constraint. See previous errors.
at
System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean
breakConnection, Action`1 wrapCloseInAction)
at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at
System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand
cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler,
TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String
methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
at
System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1
completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean
asyncWrite)
at
System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at
DotNetNuke.Data.SqlDataProvider.ExecuteScriptInternal(String connectionString,
String script)
ClientConnectionId:be23262b-da54-4f38-a86a-9462f8bce19b
ALTER TABLE dbo.[Profile]
ADD CONSTRAINT PK_Profile PRIMARY KEY CLUSTERED
([ProfileID])