日期:2014-05-18 浏览次数:20571 次
有这样这样一个存储过程 sp_startupForMedia use master go IF exists(select 1 from sysobjects where [name] = 'sp_startupForMedia') drop proc sp_startupForMedia GO create procedure sp_startupForMedia as --这里是清除表中数据 delete from karaok..MediasSequence delete from karaok..MediasSequence2 delete from karaok..MediasSequence3 delete from karaok..MediasSequence4 delete from karaok..MediasSequence5 delete from karaok..MediasSequence6 delete from karaok..MediasSequence7 delete from karaok..MediasSequence8 --这里是向 karaok..MediasSequence 表中添加数据 execute karaok..sp_dbmaintaintimer null, null, null, null, 1, 200 execute karaok..sp_dbmaintaintimer null, null, 2, null, 1, 200 execute karaok..sp_dbmaintaintimer null, null, 3, null, 1, 200 execute karaok..sp_dbmaintaintimer null, null, 4, null, 1, 200 execute karaok..sp_dbmaintaintimer null, null, 5, null, 1, 200 execute karaok..sp_dbmaintaintimer null, null, 6, null, 1, 200 execute karaok..sp_dbmaintaintimer null, null, 7, null, 1, 200 execute karaok..sp_dbmaintaintimer null, null, 8, null, 1, 200 --sp_dbmaintaintimer 代码就不贴了,主要是求个为什么会出现这个问题 GO exec sp_procoption 'sp_startup', 'startup', 'true' GO