将数据库迁移到 Azure SQL 数据库时出现错误,不支持扩展属性“MS_Description”,因此就如何操作扩展属性进行在此记录。

 

查询扩展属性

SELECT *,OBJECT_NAME(major_id) AS obj_name FROM sys.extended_properties

 

添加扩展属性

EXEC sp_addextendedproperty 
@name = N'MS_Description',
@value = N'This is a table description on [T8](2).',
@level0type = N'SCHEMA', @level0name = N'dbo',
@level1type = N'TABLE', @level1name = N'T8'
GO

 

修改扩展属性

EXEC sp_updateextendedproperty 
@name = N'MS_Description',
@value = N'This is a column description on [id](3).',
@level0type = N'SCHEMA', @level0name = N'dbo',
@level1type = N'TABLE', @level1name = N'T8',
@level2type = N'COLUMN', @level2name = N'id'
GO

 

 

删除扩展属性

EXEC sp_dropextendedproperty 
@name = N'MS_Description',
@level0type = N'SCHEMA', @level0name = N'dbo',
@level1type = N'TABLE', @level1name = N'FilterPageItem',
@level2type = N'COLUMN', @level2name = N'ColIndex'
GO

 

相关文章:

  • 2022-12-23
  • 2021-09-08
  • 2022-12-23
  • 2021-08-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-03-11
猜你喜欢
  • 2021-09-12
  • 2022-12-23
  • 2022-12-23
  • 2021-08-12
  • 2022-01-16
  • 2021-09-14
  • 2022-12-23
相关资源
相似解决方案