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

Enable Remote Database on cPanel

Remote database hanya berlaku pada Mysql.Dalam hal ini terdapat beberapa langkah untuk melakukan...

Mysql dengan storage engine MyISAM atau InnoDB

Dua Storage Engine utama penyimpanan tabel untuk database MySQL adalah InnoDB dan MyISAM....

Penamaan Database MySQL dan User Database di cPanel

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

Add User and Privileges into a Database(s)

Didalam pembuatan database mysql / posgresql, terdapat user dan password yang memiliki akses...

Membuat Database MySQL

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

Powered by WHMCompleteSolution