0

How do I change tables and views to be dbo instead of DOMAIN\username?

Currently: DOMAIN\username.Data

Preferred: dbo.Data

Leandro Bardelli
  • 10,561
  • 15
  • 79
  • 116
  • see this one: http://stackoverflow.com/questions/1146599/how-do-i-change-db-schema-to-dbo – Mark Wojciechowicz Sep 09 '14 at 15:27
  • I tried the link you suggested but it doesn't work, or I couldn't get it to work for DOMAIN\username. SQL give an error of incorrect syntax near '\'. – Puzzled Sep 09 '14 at 15:39
  • sorry the link is not working for you. It is from stack overflow, just search to "how do i change db schema to dbo" and it will be the top hit – Mark Wojciechowicz Sep 09 '14 at 17:22
  • @Puzzled .. The Stackoveflow is correct but if you have `Domain\username` you need to encase with `[` and `]` .. `ALTER SCHEMA dbo TRANSFER [Domain\username].MovieData;`. – Tak Sep 09 '14 at 17:33

1 Answers1

0
 ALTER SCHEMA dbo TRANSFER [DOMAIN\username].Data;
Naved Ansari
  • 650
  • 2
  • 13
  • 31