Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2004

    Unanswered: Database objects ownership


    When I load a database from one server to my other db server, i do get a lot of messages saying

    Object 'SP_xxxxxxxxxx' in database 'xxxx' is owned by login 'xxxxxxxxx' who does not exist in this server.

    These logins (DBAs which were working before on this db server)were there in the database but then were deleted after they were replcaed with other DBAs.For our system DBAs do all database object migrations.

    Although everything works fine, I just wanna get rid of these stupid messages.

    As per sybooks, its error#3141 but I couldn't find much on the error 3141,Severity 16.

    So could you please help me in this regard?



    Edit: Just got something...there is a column in sysobjects table which stores the loginame who created that object.So I guess I need to update that table to get rid of such msgs.
    Last edited by Wilson77; 01-26-05 at 12:31.

  2. #2
    Join Date
    Sep 2002
    Sydney, Australia
    ... "Object 'SP_xxxxxxxxxx' in database 'xxxx' is owned by login 'xxxxxxxxx' who does not exist in this server." on load database
    This is an old issue which cannot be addressed by Sybase (ASE servers are independent of each other; logins are server-specific, not customer- or site-specific). The problem (along with several others) is easily avoided by a thoughtful approach and scripts, and is particularly relevant where you are dumping dbs from one server and loading onto another (again not addressable by Sybase), or where you have dev/test/prod object migration and synchronisation requirements. The method is, from the very first installation of the servers:
    - when you add a login to one server, add it to every other server (preserving the login:suid [suser_id()] across all servers)
    - lock the login on the servers to disable as required (ie. lock the developers out of production and the users out of developemnt, etc)
    - when you drop a login from one server, drop it from all servers
    - where a new server is added to an existing set of (login-synchronised) servers, add the existing logins in the correct sequence before adding dbs

    Where you are starting with an existing set of login-unsynchronised servers:
    - choose one server (eg. production) as primary
    - for each secondary server:
    --- dump all dbs
    --- drop all dbs
    --- drop all logins (except sa, etc as per initial installation)
    --- add the logins as per primary server in the correct sequence
    --- lock logins as necessary
    --- add the dbs (gives you the chance to clean up dev/db allocations)
    --- load all dbs

    Another good standard to implement is always have all objects (tables, views, sps) in a database owned by the dbo and not any particular user (except in development where the reverse is true). And of course, set the dbo to the true owner (eg. department executive), not the DBA.

    ... So I guess I need to update that table to get rid of such msgs.
    Absolutely definitely never ever update system tables directly (until you have reached guru status, which you have not, by virtue of your question).
    Derek Asirvadem
    Senior Sybase DBA/Information Architect derekATsoftwaregemsDOTcomDOTau
    Anything worth doing is worth doing Right The First Time
    Spend your money on standards-compliant development or spend 10 times more fixing it

Posting Permissions

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