Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2006
    Location
    DC
    Posts
    123

    Unanswered: dropping schema issues Landesk sql account

    I have transferred a database to another sql server box
    but it won't allow me to create a SQL user for the database.
    Saying that the account already exists for that database.
    So I tried dropping the schema for that database. I get this error
    Cannot drop schema 'ldadmin' because it is being referenced by object 'ActiveDirectoryScope'.
    So I queried sysbojects
    Select * From sysobjects Where name like 'ActiveDirectoryScope%'
    And it returns a row for sysobjects.
    I'm stuck from this point not sure what to do to remove this reference so that I can drop the schema and user from the database.
    Any Suggestions

  2. #2
    Join Date
    Mar 2003
    Location
    Reading, UK
    Posts
    70
    Check under which schema all the other objects are created.(assuming x)
    Drop the current object and recreate the same object with the above schema(x).Drop the schema now, and then recreate it with appropriate perm.

  3. #3
    Join Date
    Jun 2006
    Location
    DC
    Posts
    123
    Quote Originally Posted by pavan_kashyap
    Check under which schema all the other objects are created.(assuming x)
    Drop the current object and recreate the same object with the above schema(x).Drop the schema now, and then recreate it with appropriate perm.
    Most of the schemas are under dbo and ldadmin
    i would like all of them to be under the dboschema

  4. #4
    Join Date
    Jun 2006
    Location
    DC
    Posts
    123
    Quote Originally Posted by pavan_kashyap
    Check under which schema all the other objects are created.(assuming x)
    Drop the current object and recreate the same object with the above schema(x).Drop the schema now, and then recreate it with appropriate perm.

    The tables don't even exist. they are just referenced in the sys.objects sys.schemas.
    I cannot drop what doesn't exist is the error I'm getting now

  5. #5
    Join Date
    Mar 2003
    Location
    Reading, UK
    Posts
    70
    ok, try like this (assuming its a procedure)
    drop <procedure> [ldadmin].<procedure_name>
    once succeeds, then
    create procedure [dbo].<procedure_name>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •