Home > Forum > Installation > Warning: Check default schema of database user used for installation/upgrade

Warning: Check default schema of database user used for installation/upgrade
4

MVP

Hello everyone,

before you install/upgrade BPS check the default schema of the database user under which the installation/upgrade will be executed. Make sure that the default schema is dbo. If this is a different schema new objects may be created using this schema.
This may lead to unexpected errors later on which will be hard to debug.

Here's a little script to change it.
SELECT name AS [Name],
SCHEMA_NAME(schema_id) AS schema_name,
type_desc,
create_date,
modify_date,
'Alter schema dbo transfer ['+SCHEMA_NAME(schema_id) +'].'+name
from sys.objects
where SCHEMA_NAME(schema_id) not in ('dbo','sys')

I did this in two steps so that I can verify what will be changed.


Best regards,
Daniel

Nobody has replied in this thread yet.