delete from sysxlogins where name='sa' and xstatus | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

delete from sysxlogins where name=’sa’ and xstatus

When i am running these action statements
delete from sysxlogins where name=’sa’ and xstatus=64
delete from syslogins where name=’sa’ and xstatus=10
im getttin this err
Server: Msg 259, Level 16, State 2, Line 1
Ad hoc updates to system catalogs are not enabled. The system administrator must reconfigure SQL Server to allow this.
pls suggest..what to do and the steps to reconfigure sql server,
1. why are you deleteing sa?
2. you need to allow ad-hoc updates to the system catalogs.. sp_configure ‘allow updates’, 1 3. *sure* you know what you’re doing? you should do things like this using system stored procedure, e.g. sp_droplogin – NOT by deleting from system tables. Messing about with system tables like that can have dire consequences. Tom Pullen
DBA, Oxfam GB
Thnx for this infornmation.Now if i drop a login using the sp_droplogin ,is this make sure that it will be deleted from system tables and frees the memory.
Logins in sysxlogins do not consume "memory". They exist on disk in the master database. Why on earth do you want to delete sa? Is it for security purposes? sp_droplogin does delete the login, yes, in the same way sp_dropuser deletes a user from sysusers. Tom Pullen
DBA, Oxfam GB
ys its for special security, the mgmt wants that simply choosing a strong sa pwd wont b help ful they want no sa should be there.
Security is a good thing, stupidity is not. If your management doesn’t trust your DBA, you’re in deeper trouble than simply viewing some data, I’d say. Anyway, see if this helps you getting started with security:<a target="_blank" href=http://www.sqlsecurity.com>http://www.sqlsecurity.com</a><br />As a CYA strategy document *everything* in that context in written. Management will forget this requirement in case of a disaster. And guess whom they will make responsible? [<img src=’/community/emoticons/emotion-5.gif’ alt=’;)‘ />]<br /><br />–<br />Frank<br /<a target="_blank" href=http://www.insidesql.de>http://www.insidesql.de</a><br />
]]>