Friday, August 18, 2017

Publishing sql server database project(SQLDB/SSIS/SSRS)

Databases


SqlPackage /Action:Publish
/SourceFile:“.\SubProj.Database.dacpac”
/Profile:”.\SubProj.Database.publish.xml"


"%programfiles(x86)%\Microsoft SQL Server\130\DAC\bin\SqlPackage.exe" /Action:Publish  /p:ScriptDatabaseOptions=False /p:BlockOnPossibleDataLoss=False /SourceFile:".\DacPacSource.dacpac" /TargetServerName:"ServerName" /TargetDatabaseName:"TargetDatabaseToDeploy" /Variables:DatabaseReference="OtherDatabaseName" /Variables:DatabaseReference2="AnotherDatabaseName"

SSIS


IsDeploymentWizard /S /SP:".\YourIspac.ispac" /DS:"ServerName" /DP:"/SSISDB/Folder/ProjectName"

REM Copyright@subratsamal@yahoo.com
pushd %~dp0
set ssisFolder=SubProj
set serverName="."
set project="SubProjSSIS"
set isPacPath=".\xx.ispac"
set envSqlPath=".\xx.sql"
set sqlcmdpath="%ProgramFiles%\Microsoft SQL Server\110\Tools\Binn\sqlcmd.exe"
set isdeploymentwizard="%ProgramFiles(x86)%\Microsoft SQL Server\140\DTS\Binn\ISDeploymentWizard.exe"
%sqlcmdpath% -S %serverName% -d ssisdb -Q "if not exists(select 1 from internal.folders where name = '%ssisFolder%') exec catalog.create_folder %ssisFolder%"
%isdeploymentwizard% /S /ST:File /SP:%isPacPath% /DS:%serverName% /DP:/SSISDB/%ssisFolder%/%project%
%sqlcmdpath% -S %serverName% -d ssisdb -i %envSqlPath%

xcopy "$(ProjectDir)bin\$(ConfigurationName)\Install.bat" "$(SolutionDir)BSS.SubProj.SSIS\bin\Development"
xcopy "$(ProjectDir)bin\$(ConfigurationName)\SsisEnvironment.sql" "$(SolutionDir)BSS.SubProj.SSIS\bin\Development"

SSRS




"%programfiles(x86)%\Microsoft SQL Server\140\Tools\Binn\rs.exe" -i \Path\To\RssFile.rss -s ServerName/SSRSInstance -v ReportFolder="ReportFolder" -v DataSourceFolder="DataSourceFolder" -v DataSetFolder="DataSetFolder" -v DataSourcePath="/DataSourcePath" -v filePath="\Path\To\ReportFolder" -eMgmt2010

SSAS(tabular model)

"%programfiles(x86)%\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\Microsoft.AnalysisServices.Deployment.exe" \Path\To\ProjectName.asdatabase /s:\Path\To\Logfile


No comments:

Post a Comment

Encrypt/Decrypt the App.Config

Program.cs using System; using System.Diagnostics; using System.IO; namespace EncryptAppConfig {     internal class Program     {         pr...