大家好,我的SQL SERVER(2005)數據庫執行所有ALTER(ALTER TABLE,ALTER PROC,ALTER FUNCTION) 語句都報以下錯誤
Msg 208, Level 16, State 1, Procedure sp_MStran_ddlrepl, Line 82
Invalid object name 'sysarticles'.
謝謝!
------解决方案--------------------
这是源代码,按照我的猜测,你的库兼容级别应该还是2000,所以没有这个系统表
SET QUOTED_IDENTIFIER ON
SET ANSI_NULLS ON
GO
create procedure sys.sp_MStran_ddlrepl
(
@EventData xml
,@procmapid int
)
AS
begin
set nocount on
declare @retcode int
-- validate the procmapid
if @procmapid not in (1,2,3,4)
begin
raiserror(15021, 16, -1, '@procmapid')
goto FAILURE
end
--if transactional replication is not enabled for this db, don't do anything
if (sys.fn_MSrepl_istranpublished (db_name(),0) != 1)
return 0
declare @object_name sysname
,@object_owner sysname
,@qual_object_name nvarchar(512) --qualified 2-part-name
,@objid int
,@objecttype varchar(32)
,@encrypted nvarchar(32)
,@pass_through_scripts nvarchar(max)
,@eventDoc int
,@dbname sysname
,@targetobject nvarchar(51)
,@debug_print bit
if object_id('MSrepl_debug_DDL') is not null
set @debug_print = 1
else
set @debug_print = 0
set @targetobject = N''
select @object_name = event_instance.value('ObjectName[1]', 'sysname')
,@object_owner = event_instance.value('SchemaName[1]', 'sysname')
,@objecttype = event_instance.value('ObjectType[1]', 'varchar(32)')
,@encrypted = event_instance.value('(TSQLCommand/SetOptions/@ENCRYPTED)[1]', 'nvarchar(32)')