PDA

View Full Version : این پیغام خطا چیست ؟ (Ad hoc updates to system catalogs are not allowed)



sayanpro
سه شنبه 25 آذر 1393, 09:17 صبح
سلام من این اسکریت در SQL 2008 r2 میخوام که اجرا کنم پیغام خطا میدهد


exec sp_configure 'allow updates', 1


RECONFIGURE WITH OVERRIDE





declare @dbName varchar(255),


@sqltext varchar(255)





select @dbName = 'myDataBaseName'


select @sqltext =


' update ' + @dbName + '.sys.sysusers' +


' set sid = l.sid' +


' from '+@dbName+'.sys.sysusers u, [master].sys.syslogins l ' +


' where u.status <> 0' +


' and u.name = l.name COLLATE SQL_Latin1_General_CP1256_CI_AS' +


' and isNull (u.sid ,0) <> isNull (l.sid ,0)'


exec (@sqltext)





===========================
متن خطا

Configuration option 'allow updates' changed from 0 to 1. Run the RECONFIGURE statement to install.
Msg 259, Level 16, State 1, Line 1
Ad hoc updates to system catalogs are not allowed.
Configuration option 'allow updates' changed from 1 to 0. Run the RECONFIGURE statement to install.