[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1620
  • Last Modified:

Drop User error in SQL 2005

I am trying to drop a user in SQL 2005 with the following script.

USE [CentrePointSoftware]
GO
/****** Object:  User [MASTER]    Script Date: 10/04/2007 16:24:56 ******/
IF  EXISTS (SELECT * FROM sys.database_principals WHERE name = N'MASTER')
DROP USER [MASTER]

I receive error:
Msg 15138, Level 16, State 1, Line 1
The database principal owns a fulltext catalog in the database, and cannot be dropped.

Any help please
0
Shezad Ahmed
Asked:
Shezad Ahmed
  • 2
2 Solutions
 
ptjcbCommented:
You must change the ownership of any object owned by the user before you can drop the user.

FROM BOL

sp_changeobjectowner [ @objname = ] 'object' , [ @newowner = ] 'owner'

Example

EXEC sp_changeobjectowner 'authors', 'Corporate\GeorgeW';
GO

0
 
ptjcbCommented:
You could also drop the full-text catalog and then drop the user

FROM BOL

To remove a full-text catalog from a database
In Object Explorer, expand the server group, expand Databases, and expand the database that contains the full-text catalog you want to remove.

Expand Storage, and expand Full Text Catalogs.

Right-click the full-text catalog that you want to remove, and then select Delete.

In the Delete Objects dialog box, click OK.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now