数据库项目-设置特定设置ANSI_NULL_DEFAULT / sp_fulltext_database

问题描述 投票:2回答:1

我们目前正在将.sqlproject用于Visual Studio中的现有数据库。

[构建dacpac并运行命令sqlpackage.exe / Action:script时,我得到了以下脚本化更改:

2019-09-11T15:28:56.5658868Z :setvar DatabaseName "MyDb"
2019-09-11T15:28:56.5658868Z GO
2019-09-11T15:28:56.5658868Z USE [$(DatabaseName)];
2019-09-11T15:28:56.5658868Z GO
2019-09-11T15:28:56.5658868Z IF EXISTS (SELECT 1
2019-09-11T15:28:56.5658868Z            FROM   [master].[dbo].[sysdatabases]
2019-09-11T15:28:56.5658868Z            WHERE  [name] = N'$(DatabaseName)')
2019-09-11T15:28:56.5658868Z     BEGIN
2019-09-11T15:28:56.5658868Z         ALTER DATABASE [$(DatabaseName)]
2019-09-11T15:28:56.5658868Z             SET ANSI_NULLS ON,
2019-09-11T15:28:56.5658868Z                 ANSI_PADDING ON,
2019-09-11T15:28:56.5658868Z                 ANSI_WARNINGS ON,
2019-09-11T15:28:56.5658868Z                 ARITHABORT ON,
2019-09-11T15:28:56.5658868Z                 CONCAT_NULL_YIELDS_NULL ON,
2019-09-11T15:28:56.5658868Z                 QUOTED_IDENTIFIER ON,
2019-09-11T15:28:56.5658868Z                 ANSI_NULL_DEFAULT ON,
2019-09-11T15:28:56.5658868Z                 CURSOR_DEFAULT LOCAL 
2019-09-11T15:28:56.5658868Z             WITH ROLLBACK IMMEDIATE;
2019-09-11T15:28:56.5658868Z     END
2019-09-11T15:28:56.5658868Z 
2019-09-11T15:28:56.5658868Z 
2019-09-11T15:28:56.5658868Z GO
2019-09-11T15:28:56.5658868Z IF EXISTS (SELECT 1
2019-09-11T15:28:56.5658868Z            FROM   [master].[dbo].[sysdatabases]
2019-09-11T15:28:56.5658868Z            WHERE  [name] = N'$(DatabaseName)')
2019-09-11T15:28:56.5658868Z     BEGIN
2019-09-11T15:28:56.5658868Z         ALTER DATABASE [$(DatabaseName)]
2019-09-11T15:28:56.5658868Z             SET PAGE_VERIFY NONE 
2019-09-11T15:28:56.5658868Z             WITH ROLLBACK IMMEDIATE;
2019-09-11T15:28:56.5658868Z     END
2019-09-11T15:28:56.5658868Z 
2019-09-11T15:28:56.5658868Z 
2019-09-11T15:28:56.5658868Z GO
2019-09-11T15:28:56.5658868Z IF fulltextserviceproperty(N'IsFulltextInstalled') = 1
2019-09-11T15:28:56.5658868Z     EXECUTE sp_fulltext_database 'enable';
2019-09-11T15:28:56.5658868Z 
2019-09-11T15:28:56.5658868Z 
2019-09-11T15:28:56.5658868Z GO
2019-09-11T15:28:56.5658868Z PRINT N'Update complete.';
2019-09-11T15:28:56.5658868Z 
2019-09-11T15:28:56.5658868Z 
2019-09-11T15:28:56.5658868Z GO
2019-09-11T15:28:56.5658868Z ##[warning] END SQL SCRIPT TO DEPLOY
2019-09-11T15:28:56.5658868Z ##[section]Finishing: Confirm SQL Deploy Script

我设法找到设置并进行更改以匹配以下内容:

  • ANSI_NULLS
  • ANSI_PADDING
  • ANSI_WARNINGS
  • ARITHABORT
  • CONCAT_NULL_YEILDS_NULL
  • QUOTED_IDENTIFIER
  • CURSOR_DEFAULT
  • SET_PAGE_VERIFY

但是我一生无法找到最后几个属性将其更改为与实时数据库匹配的位置。

  • ANSI_NULL_DEFAULT
  • sp_fulltext_database

关于在哪里可以找到这最后两个的任何想法,以便我们所有的环境都与实时数据库匹配?

sql sql-server dacpac
1个回答
0
投票

我也在寻找ANSI_NULL_DEFAULT设置,但我认为在下面的数据库项目设置中启用/禁用了“ sp_fulltext_database”

项目设置->数据库设置...

在“其他”标签下]

“启用全文搜索”

编辑:抱歉,没有看到您在sqlpackage而不是Visual Studio下执行此操作。但希望这会为您指明正确的方向。

© www.soinside.com 2019 - 2024. All rights reserved.