set@errb=cast(@errasvarbinary(4)) exec master..xp_varbintohexstr @errb,@re out set@re=''''错误号: ''''+@re +char(13)+''''错误源: ''''+@src +char(13)+''''错误描述: ''''+@desc return(@re) end go
declare@namevarchar(250) declare #aa cursorfor select name from sysobjects where xtype notin(''''S'''',''''PK'''',''''D'''',''''X'''',''''L'''') open #aa fetchnextfrom #aa into@name while@@fetch_status=0 begin