Can't get rid of locked user in SQL Server 2005

Posted on 2007-07-20
Last Modified: 2008-01-09
I'm having an issue deleting a user out of SQL Server 2005. This user is created by an application at install time and given access to the app's database. Somehow, the user got locked. I can uninstall the app, rid the registry of all evidence of the app, delete the login, and delete the database... but when I reinstall the app and it creates the user and database, it denies the user access back to the database. If I try to look at the user's properties in SQL, I get this message:

Property IsLocked is not available for Login '[HRSQL]'. This property may not exist for this object, or may not be retrievable due to insufficient access rights.  (Microsoft.SqlServer.Smo)

I think I could probably unlock with an "alter login" but I don't know the password of the user and there isn't a way to figure it out.

The server is Windows 2k3 SP2 and I'm running SQL Server 2005 with the following info:

Microsoft SQL Server Management Studio                                    9.00.1399.00
Microsoft Analysis Services Client Tools                                    2005.090.1399.00
Microsoft Data Access Components (MDAC)                                    2000.086.3959.00 (srv03_sp2_rtm.070216-1710)
Microsoft MSXML                                    2.6 3.0 4.0 6.0
Microsoft Internet Explorer                                    7.0.5730.11
Microsoft .NET Framework                                    2.0.50727.42
Operating System                                    5.2.3790
Question by:cowanbenefits
    LVL 38

    Accepted Solution

    I think you are running into a bug in SQL Server. The  9.00.1399.00 is the RTM of SQL2K5. Update the SP of SQL and then try it.

    Author Comment

    Nice. That's what I get for assuming that MS Update got me up to date.
    LVL 38

    Expert Comment

    by:Jim P.
    Well I have a bug on my XP workstation that won't let it take the SQL 2K5 SP2. It seems like that it is workstations with the 2K EM are choking. A workstation with a fresh install works fine.
    LVL 38

    Expert Comment

    by:Jim P.
    Glad to be of assistance. May all your days get brighter and brighter.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Creating and Managing Databases with phpMyAdmin in cPanel.
    Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
    Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
    Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now