0

I have restored a DB from "mixed authentication" MS SQL Server into "windows authentication only" SQL Server.

My application is configured for windows authentication which uses 'dbo' for accessing DB.

But in the restored DB , all the tables, views are NOT owned by 'dbo'

Hanumanth
  • 1,197
  • 2
  • 10
  • 14

1 Answers1

0

Im not really sure if i understood the question, but i guess when you accessing database, you are/was creating the tables. Most possibly your statements was like:

Create Table TableName (...)

To create tables in specific schema, you should add schema prefix (or change the default schema of user you are using):

Create Table dbo.TableName (...)

To move tables to other schema, see Alter Schema.

Jānis
  • 2,216
  • 1
  • 17
  • 27
  • Thanks for your reply Janis. My requirement is I need to change the schema for all tables and views as well,because they are not owned by 'dbo'. – Hanumanth Jun 05 '12 at 06:09