To change the owner user (owner) of a set of tables in SQL Server need to run the following SQL statement:
select 'exec sp_changeobjectowner'' dbo.' + Name +'' ','' gxportal''' + nchar (10) + ';'
from sysobjects
where xtype = 'U'
This generates as many sentences as tables (with dbo owner) has the database. Statements that are generated as follows and must to select them, copy them, paste them into a SQL statement and then execute them.
sp_changeobjectowner exec 'dbo. <TABLE>', 'gxportal'
In this example dbo is the current user and user gxportal to be assigned as owner.