You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Insight doesn't natively support the full text catalog/index types. So I thought I'd do something like:
-- SCRIPT [FullTextCatalog]
IF NOT EXISTS (
SELECT*FROMsys.fulltext_catalogsWHERE NAME ='FullTextCatalog1'
)
CREATE FULLTEXT CATALOG [FullTextCatalog1]
But, SQL server complains
Cannot create SQL object [FullTextCatalog]: CREATE FULLTEXT CATALOG statement cannot be used inside a user transaction.
My current workaround is to have this method execute previously ignored scripts after SchemaInstaller.Install:
// SchemaObjectCollection.Load is ignoring names like *.POSTEXEC.*/// <summary>/// Runs scripts after and outside of insight's installation process./// </summary>privatestaticvoidPostExecuteScripts(IDbConnectionconnection){varassembly=Assembly.GetExecutingAssembly();varscripts=assembly.GetManifestResourceNames().Where(x =>x.IndexOf(".POSTEXEC.",StringComparison.OrdinalIgnoreCase)!=-1).OrderBy(x =>x).Select(name =>{using(varstream=assembly.GetManifestResourceStream(name))using(varreader=newStreamReader(stream))returnnew{Name=name,SQL=reader.ReadToEnd()};});foreach(varscriptinscripts){Console.WriteLine("Post Exec Script: "+script.Name);connection.ExecuteSql(script.SQL);}}
I'm wondering:
Do you have a better workaround for now?
Can Insight support full text search objects natively?
Must all --SCRIPT's run within a user transaction?
The text was updated successfully, but these errors were encountered:
Installs are done in a transaction to make sure that the database is always done in a consistent state.
I'd love to support fulltext, but as you found out, it's not supported within a transaction. (I found this out last week.)
Your solution is the best option at this point, but let me think about supporting non-transactional installs with some sort of rollback/compensating mechanism.
Insight doesn't natively support the full text catalog/index types. So I thought I'd do something like:
But, SQL server complains
My current workaround is to have this method execute previously ignored scripts after
SchemaInstaller.Install
:I'm wondering:
--SCRIPT
's run within a user transaction?The text was updated successfully, but these errors were encountered: