Activities

November 2009
M T W T F S S
« Oct   Dec »
 1
2345678
9101112131415
16171819202122
23242526272829
30  

MSSQL – Transferring ownership of a table

Got another issue with the MSSQL migration.

I have restored the MSSQL 2005 database from one hosting company to another hosting. Then I modify the web.config to make the changes. But the site is not connecting even though all the access details are correct

<

add name="ConnString" connectionString="Server=tcp:hostglobe-sql1.hostglobe.com;Database=mydatabase;User ID=myusername;Password=mypassword;Trusted_Connection=False;"/>

After few discussion with the developer they informed that error showing because of application can’t connect the database. If so what will be the reason ??

Solution

issue is with the schema. The schema is owned the database user name and not by the user ‘dbo”. I think that this “schema” means the table ownership of the ‘dbo’ user which is application use to connect it. Sorry, I am not fully confidence with MSSQL administration.

1. Open sql query window and execute the following scripts against each table even though it’s making angry.

USE mydatabase;
GO
ALTER SCHEMA dbo TRANSFER [myoldschema].mytable;

The following example modifies the schema “dbo” by transferring the table “mytable” from schema
“myoldschema” into the schema.

Note: Pls note that it’s a not a good idea to keep webiste and it’s database on different network

-Enjoy

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>