database owner again

Results 1 to 3 of 3

Thread: database owner again

  1. #1
    Join Date
    Dec 1969

    Default database owner again

    The asp pages dont work they give a error says stored procedure not found. The sql has all the stored procedures. Heres wat i did<BR>I have a db with some tables half tables are owned by a user &#039;brij&#039; and other half by dbo. The stored procedures are owned by &#039;brij&#039;. I backed up the db and restored it in a new machine .Everything was intact after the restore.In login screen in ENterprise manager there is no login except &#039;sa&#039; when i try creating the same user &#039;brij&#039; in new machine it says login exists and &#039;brij&#039; appears in login screen just at that moment. No modification of rights and permissions is allwoed in that user it always says login exists. <BR>IS this a rights and permission problem or something else <BR><BR>brij <BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: database owner again

    sp_changeobjectowner (T-SQL)<BR>Changes the owner of an object in the current database.<BR><BR>Syntax<BR>sp_changeobjectowner [@objname =] &#039;object&#039;, [@newowner =] &#039;owner&#039;<BR><BR>Arguments<BR>[@objname =] &#039;object&#039; <BR>Is the name of an existing table, view, or stored procedure in the current database. object is nvarchar(517), with no default. object can be qualified with the existing object owner, in the form existing_owner.object. <BR>[@newowner =] &#039;owner&#039; <BR>Is the name of the security account that will be the new owner of the object. owner is sysname, with no default. owner must be a valid Microsoft® SQL Server™ user or role, or Microsoft Windows NT® user or group in the current database. When specifying Windows NT users or groups, specify the name the Windows NT user or group is known by in the database (added using sp_grantdbaccess). <BR>Return Code Values<BR>0 (success) or 1 (failure)<BR><BR>Remarks<BR>The owner of an object (or the members of the group or role owning the object) has special permissions for the object. Object owners can execute any of the Transact-SQL statements related to the object (for example, INSERT, UPDATE, DELETE, SELECT, or EXECUTE) and can also manage the permissions for the object.<BR><BR>Use sp_changeobjectowner to change the owner of an object if the security account that owns the object has to be dropped but the object must be retained.<BR><BR>Use sp_changedbowner to change the owner of a database.<BR><BR>Permissions<BR>Only members of the db_owner fixed database role, or a member of both the db_ddladmin and db_securityadmin fixed database roles can execute sp_changeobjectowner.<BR><BR>Examples<BR>This example changes the owner of the authors table to CorporateGeorgeW.<BR><BR>EXEC sp_changeobjectowner &#039;authors&#039;, &#039;CorporateGeorgeW&#039;<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default that is what I said yesterday! <eop>


Posting Permissions

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