Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do I change schema owner in ms sql server?

I currently have a website hosted developed with kentico 7. I tried importing the exported website into my localhost and that failed. In my findings, i realised that each table in the online version has a bvs (the database user created) prefix. I have tried creating the same scenario on my localhost without any luck. Does anyone have an idea ?

Here is the error displayed at importation.

enter image description here

like image 221
Peter Avatar asked Apr 22 '15 15:04

Peter


1 Answers

Try this out:

USE MyDB
GO
ALTER AUTHORIZATION ON SCHEMA::bvs TO dbo;
GO 
SP_DROPUSER 'bvs'
GO
SP_CHANGEDBOWNER 'bvs'
like image 110
FutbolFan Avatar answered Sep 23 '22 01:09

FutbolFan