2

I created some objects in MS SQL Server 2008 using SubSonic 3. It created them based on the user specified in connection string like:

test_user.table1

but for some reason I am not able to test_user account. Now I am not able to access the tables within test_user schema. Is there any way to transfer schema from test_user to dbo so that any login can access it?

TheVillageIdiot
  • 287
  • 1
  • 4
  • 8

1 Answers1

3

ALTER AUTHORIZATION ON test_user.table1 TO dbo

OR

ALTER SCHEMA dbo TRANSFER test_user.table1

The older sp_changeobjectowner is deprecated

Some FYI: SQL: transfer database schema

gbn
  • 69,809
  • 8
  • 163
  • 243
  • I had used Alter Schema dbo Transfer..., Alter Authorization is new thing for me. But I think Alter Authorization should be better as Schema Transfer can cause problem if sys.objects is used for any functions as per MSDN – TheVillageIdiot Sep 01 '11 at 03:55