Changing MSSQL Ownership of a Table

Sometimes, you are moving your SQL Server database from one server to another server and you found out the connection string is correct but the database could not be connected.

You may check if your schema set correct from your MS SQL server. To done it, you may refer to the step as below.

1. Open the SQL Query Windows.
2. Use the command as below.
USE mydatabase;
ALTER SCHEMA dbo TRANSFER [schema].mytable;
# replace schema with your old schema, mytable with your table name.
3. Execute it.

You will now found the database is connected.

Published by

Mick Genie

Mick Genie is the founder of and working at ExaBytes Network Sdn Bhd and WPWebHost web host company. He is expertise in Windows and Linux environment especially web hosting related information, tips and trick as well as the IT Information.