SQL Tutorials

How To Change DB Schema In Sql 2008

How To Change DB Schema In Sql 2008

Description:

After restoring the database from my local system to live server database is restored successfully but database tables schema was chnged.In previous verions of SQL there are providing the option in Properties fo tables window to change the prefix.But in sql 2008 this option was disabled.

How To Change DB Schema In Sql 2008

Solution:

– Log in to the server.

– Open SQl server with the windows Authentication Mode.

– Expand the database and click on Tables.

– Click on New query.

– In the query window excute the below mention command.

ALTER SCHEMA dbo TRANSFER Schemaname.Tablename;

– Above command will change the dbo scheme for the table to dbo.tablename.

– After execute this command check the properties of the database for the database user.In some times database user name will turn as default user.

Tags:dbo,schem,sql 2008,sql commands,SQL 2008,Sql 2008,SQL installation,SQL server,SQL management.

About the author

admin

Add Comment

Click here to post a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.