0

I want to use the Microsoft Data-Tier Application framework and its associated .Net API to manage the schema of several SQL Server databases, including the model database. However, when I try deploy an updated schema to the model database (using either a SQLCMD script or the DacServices.Deploy(...) method), I receive the following error...

Cannot use full-text search in master, tempdb, or model database.

Is there any way around this?

EDIT

So, I was going over the generated SQLCMD script with my boss, and he saw this...

IF fulltextserviceproperty(N'IsFulltextInstalled') = 1
    EXECUTE sp_fulltext_database 'enable';


GO

Why would that be needed for a schema deployment? It would be easy enough to strip that block out of the script, but what if I want to use the DacServices.Deploy(...) method to update the schema? I don't see anything in the DacDeployOptions class that seems like it would affect this deployment option.

2 Answers 2

1

Edited: It looks like the answer is: No, you cannot create a full-text index in a system database.

You can, of course, run a script to turn on a full-text indexing after the new database is created from model, if that is necessary. But by default all user databases in the more recent versions of SQL Server have full-text indexing turned on automatically.

Note that from SQL Server 2008 forward, the sp_fulltext_database command is a no-op, just supported for script compatibility.

So, there is certainly no reason, unless your are supporting SQL Server 2005 or earlier version, to have this code included in your standard scripts. It is obsolete.

1
0

The solution was to set the DacDeployOptions.ScriptDatabaseOptions property to false. This removed the full-text search logic from the deployment execution (both the SQLCMD script and the DacServices.Deploy(...) method).

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.