Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2005 > SQL Server 2005
|
SQL Server 2005 General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 12th, 2007, 10:26 AM
Authorized User
 
Join Date: Feb 2007
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default drop user from sys.server_principals

how can we drop an user from sys.server_principals . I did once before , but i forgot the sqls now

thanks
 
Old March 12th, 2007, 10:42 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Is this what you are looking for?
Code:
IF  EXISTS (SELECT * FROM sys.server_principals WHERE name = N'some_user')
    DROP LOGIN [some_user]


_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
IE Errormessege Error "Sys" undefined chandana ASP.NET 2.0 Professional 1 August 12th, 2008 11:35 AM
Email Problem - CDO SYS Error itHighway Classic ASP Basics 1 August 25th, 2005 05:14 AM
Compare values of several drop boxes, notify user SoC Javascript How-To 1 April 21st, 2005 10:17 AM
Filter drop-down by user barmanvarn BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 October 26th, 2004 01:33 PM
How do we differentiate b/w User and Sys tables softwarearchitect SQL Server 2000 5 May 30th, 2004 08:39 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.