Help Admin Gurus

  • Hi all,

       We have a Login 'TmoSystem' which is part of the Public and db_owner roles and not associated with any fixed server role.

    So based on the Books online article for 'dbo' whenever we create an object using a login which is not associated with sysadmin fixed server role then those objects belong to the corresponding login, not to the 'dbo'.

    Here When we create an object, say table1 using the login 'Tmosystem' from Query Analyser then 'table1' belongs to 'Tmosystem'. But if we create the same object using Enterprise Manager which is register using the same login,'Tmosystem', then table1 belongs to 'dbo'.

    My question is, what is the difference between these two approaches.

    Jag

  • Hi jag

    Really nice observation/experience..

    I'll be also waiting for answer...

     

    Vidyadhar

     

  • EM detects your user is member of DB-Owner and therefor gives the default objectowner dbo. EM does that kind of stuff

    With QA you run "create table mytable ..." and only the actual dbowner will get dbo. as prefix (unless other specified).

    exec sp_changedbowner @loginame = 'mydbouser' ,@map = 'true'

    So, it's a good practise to always include the objectowner.

    create table dbo.mytable ....

    create table myschema.mytable ...

     

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

Viewing 3 posts - 1 through 2 (of 2 total)

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