DB object dependents.

  • Hello,

    Hope someone can answer this. Would I be right in saying that it is not possible for DB objects to be dependent on a User? This is for SQL 2000 and 2005.

    Thanks for any answers.

    Kind Regards,

    D.

  • I'm not sure what you mean. Objects are owned by a user, so in that sense they are dependent.

    In 2005 you have Execute As, which I think introduces a dependency.

  • Thanks for getting back, so how would I find out if an object is dependent on a user? Do I just have to go through them all and click 'View Dependencies'?

    Regards,

    D.

  • They each have an owner. this is separate from the schema.

    As far as who owns an object, this doesn't come into play unless you try to delete a user. Then you would get an error. Otherwise, it's an irrelevant thing to know. You might want to check for security auditing, in which case you would go look at the object itself.

    If might help if you explain what you are trying to accomplish here.

  • maybe you are comparing it to the way oracle works? oracle is very user centric...delete a user, and you delete all the data owned by that user. could be gigs of data.

    SQL not like that...is more data centric...you assign data to a schema, which may be a default schema of dbo, or a schema specific to a user.

    Like Steve said, you can't delete a user if a schema is tied to the user...there is an expectation that you'd move the data to a different schema before you delete a user that has a schema tied to them.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply