AND ArchivedTime is null OPEN relations FETCH NEXT FROM relations INTO @relation WHILE @fetch_status = 0 BEGIN - 列の名前を変更します ...

'
                  AND ArchivedTime is null
                  OPEN relations
                  FETCH NEXT FROM relations INTO @relation
                  WHILE @@fetch_status = 0
                  BEGIN
                  -- 列の名前を変更します
                  SET @tableChangeSql = N'EXEC sp_rename N''' + @relation + N'.[OtherActivityName]'', ''ReferenceName'', ''COLUMN'''
                  EXEC sp_executesql @tableChangeSql

                  SET @tableChangeSql = N'EXEC sp_rename N''' + @relation + N'.[OtherActivityID]'', ''ReferenceData'', ''COLUMN'''
                  EXEC sp_executesql @tableChangeSql

                  -- ReferenceType と LongReferenceData という 2 つの列を追加します
                  SET @tableChangeSql = N'ALTER TABLE ' + @relation + N' ADD ReferenceType NVARCHAR(128) DEFAULT N''BizTalkService'' WITH VALUES, LongReferenceData NTEXT NULL'
                  EXEC sp_executesql @tableChangeSql

                  -- OtherActivityName が 'BizTalkOrchestration' ではない場合、ReferenceType を 'Activity' に更新します
                  SET @tableChangeSql = N'UPDATE ' + @relation + N' SET ReferenceType = N''Activity'' WHERE ReferenceName <> N''BizTalkOrchestration'''
                  EXEC sp_executesql @tableChangeSql
                  
                  -- OtherActivityName が 'BizTalkOrchestration' の場合、ReferenceType を 'BizTalkService' に更新します
                  -- ReferenceName を管理サーバー + 管理データベース + リレーションシップに更新します
                  SET @tableChangeSql = N'UPDATE ' + @relation + N' SET ReferenceName = N''' + @ReferenceName + N''' WHERE ReferenceName = N''BizTalkOrchestration'''
                  EXEC sp_executesql @tableChangeSql

              FETCH NEXT FROM relations INTO @relation
          END

          CLOSE relations
          DEALLOCATE relations
          GO

          -- プレースホルダーであり、コードで変更されます
          ALTER VIEW
English
English (United States)
Deutsch (Deutschland)
German (Germany)
Español (España)
Spanish (Spain)
Français (France)
French (France)
日本語
Japanese
한국어
Korean