我想使用Visual Studio数据库项目在我的数据库中启用更改跟踪.
命令是
ALTER DATABASE ##database name##
SET CHANGE_TRACKING = ON
(CHANGE_RETENTION = 2 DAYS, AUTO_CLEANUP = ON)
Run Code Online (Sandbox Code Playgroud)
但我无法弄清楚格式字符串以获取数据库名称
Error 431 SQL71561:
Computed Column: [dbo].[ViewAlertFrequency].[BeginDate] contains an unresolved
reference to an object.
Either the object does not exist or the reference is ambiguous because it could
refer to any of the following objects:
[Lookup].[dbo].[AlertFrequency].[AlertFrequency]::[BeginDate]
or [Lookup].[dbo].[AlertFrequency].[BeginDate]
Run Code Online (Sandbox Code Playgroud)
当前数据库是Lookup,因此找不到此对象应该没有任何问题.这是从现有视图导入的.似乎整个数据库都是这样的.我不确定:: syntax是什么.
这是观点:
CREATE VIEW [dbo].[ViewAlertFrequency]
AS
--###
--ViewAlertFrequency
--###
--###
--used by: eobResolve
--###
SELECT DISTINCT TOP 100
AlertFrequency.[ID] AS [ID],
AlertFrequency.Code AS Code,
AlertFrequency.[Name] AS [Name],
AlertFrequency.[Description] AS [Description],
AlertFrequency.[Rank] AS [Rank],
AlertFrequency.BeginDate AS BeginDate,
AlertFrequency.EndDate AS EndDate
FROM
Lookup.dbo.AlertFrequency AS …Run Code Online (Sandbox Code Playgroud) 我们可以用TFS和SSDT创建一个SQLServer部署脚本,但有没有办法创建回滚脚本,以便我们可以回滚部署?谢谢
我想在Jenkins中创建一个发布任务,以自动发布我的数据库更改以及我的应用程序.
如果我理解正确,通常的做法是创建一个发布配置文件,其中包括数据库名称以及用于部署的帐户的帐户(登录名和密码).
这意味着部署帐户用户名和密码将以明文形式存储在每台开发人员计算机以及版本控制服务器和持续集成服务器上.
即使我为部署创建了特定的登录名和密码,但对我来说似乎相当不安全.
有解决方法吗?我只能考虑在持续集成服务器上的msbuild命令行中替换密码.
database security passwords publish-profiles sql-server-data-tools
我在Visual Studio 2013中使用SSDT.
我为开发服务器创建了一些发布前和发布后脚本.预部署脚本从表中清空数据并重新设置所有自动标识字段.部署后脚本使用静态和示例数据填充表.
现在我需要将数据库发布到我们的登台和实时数据库服务器.我为这些服务器创建了新的"publish.xml"配置文件.但显然我不希望运行相同的前后脚本.
如何根据发布配置文件指定不同的脚本,或使脚本知道目标并执行不同的操作.
我最关心的是发布到实时服务器并意外破坏数据.
提前致谢.
道格
我们使用PowerShell脚本部署SQL数据库。该脚本使用SqlPackage.exe实用工具来发布我们的主数据库,在我们将SSDT升级到最新版本SSDT 2015时,它工作正常,当时它声明抛出以下错误。
PowerShell脚本行:
& "C:\Program Files (x86)\Microsoft SQL Server\120\DAC\bin\SqlPackage.exe" /Action:Publish /SourceFile:"$DatabaseDacpacLocation" /TargetServerName:$DataServerSqlInstance /TargetDatabaseName:$Database /Variables:master="$MasterDatabase" /v:DatabaseName="$pDatabaseName" /p:ExcludeObjectType=Sequences
Run Code Online (Sandbox Code Playgroud)
错误:
未处理的异常:System.TypeInitializationException:Microsoft.SqlServer.Dac.DacPackage的类型初始值设定项引发了异常。---> System.TypeInitializationException:Microsoft.SqlServer.Dac.DacServices的类型初始值设定项引发了异常。---> System.TypeInitializationException:'SqlSchemaModelStaticState'的类型初始值设定项引发了异常。---> System.IO.FileNotFoundException:无法加载文件或程序集'Microsoft.SqlServer.TransactSql.ScriptDom,Version = 12.0.0.0,Culture = neutral,PublicKeyToken = 89845dcd8080cc91'或其依赖项之一。该系统找不到指定的文件。
deployment powershell dacpac sqlpackage sql-server-data-tools
Tools: Visual Studio 2015, SSDT
I have an Visual Studio SQL Project which works fine on it's own. I run my build and the dacpac file is in debug\bin\*.dacpac as expected.
The problem is this SQL project is part of a WinForms solution.
I have included the SQL project as a project reference in the Winforms Project.
It looks like visual studio only copies dlls from project reference bin folders into the output path bin\debug folder.
How can I configure …
SSDT和SSDT-商业智能有什么区别?
我已经安装了SQL Server 2017,然后继续下载Business Intelligence Development Studio,但发现它被SSDT/SSDT-BI取代(如果有的话,不知道区别).
我只需要SSDT或SSDT-BI吗?我只能为Visual Studio 2012和2013找到SSDT-BI,而不是VS 2017,而VST的SSDT可用.
自从我使用SQL Server 2017以来,这会产生任何问题吗?
我是一个完全的初学者,这只是一个单项目.请保持答案尽可能简单.非常感谢你.
当我尝试打开SSAS项目文件时,Visual Studio 2015抛出以下异常:
无法打开“ projectfile.dwproj”,因为此版本的应用程序不支持其项目类型(.dwproj)。
要打开它,请使用支持此类项目的版本。
屏幕截图
有什么建议么?
sql-server ssas visual-studio sql-server-data-tools visual-studio-2015
我有一个Visual Studio 2015解决方案,其中包含一个Reporting Services项目(* .rptproj),该项目用于在我们的TFS Build Server上很好地构建。
我将解决方案升级到了Visual Studio 2017,现在在CI生成过程中失败,出现以下错误:
<Reporting-Services-Project-Path>\<Reporting-Services-Project-Name>.rptproj (57, 11)
The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\Reporting Services\Microsoft.ReportingServices.MSBuilder.targets" was not found. Also, tried to find "Reporting Services\Microsoft.ReportingServices.MSBuilder.targets" in the fallback search path(s) for $(MSBuildExtensionsPath) - "C:\Program Files (x86)\MSBuild" . These search paths are defined in "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\msbuild.exe.Config". Confirm that the path in the <Import> declaration is correct, and that the file exists on disk in one of the search paths.
Process 'msbuild.exe' exited …Run Code Online (Sandbox Code Playgroud) sql-server ×4
dacpac ×2
msbuild ×2
bids ×1
c# ×1
database ×1
deployment ×1
passwords ×1
powershell ×1
publish ×1
security ×1
sqlpackage ×1
ssas ×1
ssdt-bi ×1
tfs ×1
tfsbuild ×1