Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2003
    Posts
    111

    Unanswered: URGENT HELP Required

    Hi

    I am setting up a site in win XP professional and I am getting problem connecting to a local sql server 2000 installation (developer version)

    The problem is that if i specify objects in my select query without an owner name, it can't recognize the object. I need to be able to do this.

    Any one know how to fix this? is this a sql server setting??

    Thank you.
    James

  2. #2
    Join Date
    May 2003
    Location
    UK
    Posts
    220
    Nope.

    To read from a table, the correct format is for reading all columns is :

    select * from owner.table_name

    You have probably done the typical mistake of having objects owned by someone other than dbo. If all objects are owned by dbo, you dont need to specify the owner name.

    As a result, you now have to either :

    (1) Specify the full owner.table_name as above
    or
    (2) Change the owner of each of the objects using a system stored procedure.

    In addition, in future if you have ownership chains on these objects, with someone other than dbo owning the object you run the risk of orphaned objects and broken apps.

    In short - if an app is installing a database, make sure you are doing it as sa user in SQL then you will automatically have all objects owned by dba, as sa is automatically dbo in all databases.

    HTH.


    Cheers,

  3. #3
    Join Date
    Aug 2003
    Posts
    111

    Thank, one more question

    Thanks for that.

    I've been wondering about the same thing for a while now, however I am not sure what you've suggested is a good practice in general. i.e. if all objects in a database is to be owned by sa, what if say we get a third party hosting company to host our database, what does it mean to have objects that are owned by sa??

    I guess to rephrase my question, If databases should only be owned by sa, then why did MSSQL server allow us to specify a different owner in the first place.

    Cheers
    James

Posting Permissions

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