PowerDeisnger16下匯出到sqlserver2005以上出現sysproperties錯誤的解決辦法
[if exists (select 1
from sys.extended_properties
where major_id = object_id('[%QUALIFIER%]%TABLE%')
and minor_id = 0)
begin
[%OWNER%?[.O:[execute ][exec ]]sp_dropextendedproperty [%R%?[N]]'MS_Description',
[%R%?[N]]'user', [%R%?[N]]%.q:OWNER%, [%R%?[N]]'table', [%R%?[N]]%.q:TABLE%
:declare @CurrentUser sysname
select @CurrentUser = user_name()
[.O:[execute ][exec ]]sp_dropextendedproperty [%R%?[N]]'MS_Description',
[%R%?[N]]'user', [%R%?[N]]@CurrentUser, [%R%?[N]]'table', [%R%?[N]]%.q:TABLE%
]
end
][%OWNER%?[.O:[execute ][exec ]]sp_addextendedproperty [%R%?[N]]'MS_Description',
[%R%?[N]]%.q:COMMENT%,
[%R%?[N]]'user', [%R%?[N]]%.q:OWNER%, [%R%?[N]]'table', [%R%?[N]]%.q:TABLE%
:select @CurrentUser = user_name()
[.O:[execute ][exec ]]sp_addextendedproperty [%R%?[N]]'MS_Description',
[%R%?[N]]%.q:COMMENT%,
[%R%?[N]]'user', [%R%?[N]]@CurrentUser, [%R%?[N]]'table', [%R%?[N]]%.q:TABLE%
]
---------------------------------ColumnComment-----------------------------
[if exists (select 1
from sys.extended_properties
where major_id= object_id('[%QUALIFIER%]%TABLE%')
and value = [%R%?[N]]%.q:COMMENT%)
begin
[%OWNER%?[.O:[execute ][exec ]]sp_dropextendedproperty [%R%?[N]]'MS_Description',
[%R%?[N]]'user', [%R%?[N]]%.q:OWNER%, [%R%?[N]]'table', [%R%?[N]]%.q:TABLE%, [%R%?[N]]'column', [%R%?[N]]%.q:COLUMN%
:declare @CurrentUser sysname
select @CurrentUser = user_name()
[.O:[execute ][exec ]]sp_dropextendedproperty [%R%?[N]]'MS_Description',
[%R%?[N]]'user', [%R%?[N]]@CurrentUser, [%R%?[N]]'table', [%R%?[N]]%.q:TABLE%, [%R%?[N]]'column', [%R%?[N]]%.q:COLUMN%
]
end
][%OWNER%?[.O:[execute ][exec ]]sp_addextendedproperty [%R%?[N]]'MS_Description',
[%R%?[N]]%.q:COMMENT%,
[%R%?[N]]'user', [%R%?[N]]%.q:OWNER%, [%R%?[N]]'table', [%R%?[N]]%.q:TABLE%, [%R%?[N]]'column', [%R%?[N]]%.q:COLUMN%
:select @CurrentUser = user_name()
[.O:[execute ][exec ]]sp_addextendedproperty [%R%?[N]]'MS_Description',
[%R%?[N]]%.q:COMMENT%,
[%R%?[N]]'user', [%R%?[N]]@CurrentUser, [%R%?[N]]'table', [%R%?[N]]%.q:TABLE%, [%R%?[N]]'column', [%R%?[N]]%.q:COLUMN%
]
檢視改動如下:
原先的指令碼:
[if exists (select 1
from sysproperties
where id = object_id('[%QUALIFIER%]%VIEW%')
and type = 3)
begin
[%OWNER%?[.O:[execute ][exec ]]sp_dropextendedproperty [%R%?[N]]'MS_Description',
[%R%?[N]]'user', [%R%?[N]]%.q:OWNER%, [%R%?[N]]'table', [%R%?[N]]%.q:VIEW%
:declare @CurrentUser sysname
select @CurrentUser = user_name()
[.O:[execute ][exec ]]sp_dropextendedproperty [%R%?[N]]'MS_Description',
[%R%?[N]]'user', [%R%?[N]]@CurrentUser, [%R%?[N]]'view', [%R%?[N]]%.q:VIEW%
]
end
][%OWNER%?[.O:[execute ][exec ]]sp_addextendedproperty [%R%?[N]]'MS_Description',
[%R%?[N]]%.q:COMMENT%,
[%R%?[N]]'user', [%R%?[N]]%.q:OWNER%, [%R%?[N]]'table', [%R%?[N]]%.q:VIEW%
:select @CurrentUser = user_name()
[.O:[execute ][exec ]]sp_addextendedproperty [%R%?[N]]'MS_Description',
[%R%?[N]]%.q:COMMENT%,
[%R%?[N]]'user', [%R%?[N]]@CurrentUser, [%R%?[N]]'view', [%R%?[N]]%.q:VIEW%
]
改為:
[if exists (select 1
from sys.extended_properties
where major_id = object_id('[%QUALIFIER%]%VIEW%')
and minor_id = 3)
相關文章
- SqlServer2005/2008下sysproperties無效的解決辦法SQLServer
- scp出現錯誤的解決辦法
- Mysql出現連線錯誤解決辦法MySql
- NPM run dev 出現這樣錯誤我的解決辦法NPMdev
- git add .出現錯誤LF will be replaced by CRLF in 解決辦法Git
- dns錯誤怎麼辦 dns錯誤的解決辦法DNS
- ubuntu下import matplotlib錯誤解決辦法UbuntuImport
- 關於IIS安裝後出現500錯誤的解決辦法
- springMVC資料驗證出現404錯誤解決辦法SpringMVC
- 出現可怕的NoSuchMethodError錯誤的解決辦法 -Gunnar MorlingError
- sqoop匯出hive資料到mysql錯誤ava.util.NoSuchElementException解決辦法OOPHiveMySqlException
- SAP錯誤提示解決辦法
- man出錯解決辦法
- 伺服器出現500錯誤的原因和解決辦法伺服器
- 資料庫升級後匯出報EXP-00056錯誤解決辦法資料庫
- Linux下安裝oracle,遇到錯誤的解決辦法LinuxOracle
- samba一個錯誤的解決辦法!Samba
- photoshop匯出png發生未知錯誤的解決方案,ps匯出發生未知錯誤怎麼解決
- 連線oracle錯誤解決辦法Oracle
- nginxFastCGI錯誤Primaryscriptunknown解決辦法NginxAST
- Unable to locate package錯誤解決辦法Package
- oracle 1455 錯誤解決辦法Oracle
- 畢設之錯誤解決辦法
- Windows環境下EXP-00091錯誤的解決辦法Windows
- iOS路上遇到的錯誤及解決辦法iOS
- ORA-12705,錯誤的解決辦法
- SPFILE引數修改錯誤的解決辦法
- ORA-12170錯誤的解決辦法
- 升級informix資料庫到10.0出現KAIO錯誤的解決辦法ORM資料庫AI
- Fedora 8下永中Office安裝出錯的解決辦法
- 在impdp匯入報編譯錯誤ORA-39082的解決辦法編譯
- Idea編譯錯誤解決辦法Idea編譯
- PHP編譯錯誤及解決辦法PHP編譯
- ORA-29339錯誤解決辦法
- ORA-54013錯誤解決辦法
- MySQL匯入資料亂碼、出錯等問題的解決辦法MySql
- linux下oracle的TNS-12546錯誤解決辦法LinuxOracle
- Win7 IIS7.5執行ASP時出現500錯誤的解決辦法Win7