0
votes

I am trying to set database schema to "tts" instead of default "dbo" for Sitefinity Project. But I don't know that this can work or not. Currently my project's database has dbo schema.

Please suggest me how can I change schema to "tts" & sitefinity project keep working well.

Thanks

1
I wouldn't advise so - lot's of unpredictable results may occur. What's your reasoning for this?Veselin Vasilev
wanted to seperate sitefinity tables from other tables which we have in another database but wanted to merge into sitefinity database so wanted to use a different schema but that is fine if that is not an option,user1400290
all Sitefinity tables are prefixed with sf_ so that's something to distinguish them. Exception of this rule are tables created by the Module Builder - they don't have sf_ prefixVeselin Vasilev

1 Answers

0
votes

This post is older but you can still use the section outlined for the database: https://www.sitefinity.com/blogs/gabesumner/posts/gabe-sumners-blog/2011/06/02/how_to_deploy_sitefinity_4_to_shared_hosting

Snippet for changing dbo:

DECLARE tabcurs CURSOR
FOR
    SELECT 'dbo.' + [name]
      FROM sysobjects
     WHERE xtype = 'u'

OPEN tabcurs
DECLARE @tname NVARCHAR(517)
FETCH NEXT FROM tabcurs INTO @tname

WHILE @@fetch_status = 0
BEGIN

    EXEC sp_changeobjectowner @tname, 'charity'

    FETCH NEXT FROM tabcurs INTO @tname
END
CLOSE tabcurs
DEALLOCATE tabcurs