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:host-sql1.diantara.net;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

Apakah Jawaban ini membantu?

 Cetak Artikel Ini

Baca Juga

Pengenalan MySQL

MySQL adalah sebuah server database open source yang paling populer keberadaannya. MySQL umumnya...

Error Import MySQL Dengan Type=MyISAM

Jika pada saat anda melakukan import database MySQL melalui PhpMyAdmin dan menemukan error kurang...

Membuat Database MySQL

Membuat database MySQL di akun hosting berbeda dengan membuat database di localhost. Di localhost...

Penamaan Database MySQL dan User Database di cPanel

Masalah nama database MySQL dan username MySQL ini sering membingungkan bagi pemula dan pada...

Powered by WHMCompleteSolution