-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenvironment.bat
More file actions
30 lines (29 loc) · 1.26 KB
/
environment.bat
File metadata and controls
30 lines (29 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
rem --add DACFx directory to PATH variable - this is the directory which contains sqlpackage.exe
SET PATH="C:\SqlPackage";%PATH%;
rem --directory for mdf
SET DefaultDataPath="c:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\"
rem --directory for ldf
SET DefaultLogPath="c:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\"
rem --SQL Server Name
SET SourceServer=(local)
rem --SQL Server Name
SET TargetServer=(local)
rem --Path of this project
SET ProjectPath=C:\SOURCE\SQLOps\TestProject1
rem --directory in project to output create scripts
SET DbsPath=DATABASES
rem --directory in project to output dacpac files
SET DacPath=DAC
rem --directory in project to output sql scripts
SET SQLPath=MIGRATIONS
rem --sourece database name
SET Source=TEST1
rem --target database name
SET Target=TEST2
rem --version string for Migration Script file name
SET MigrationTag=2018-11-10
SET SourceConnString=Server=%SourceServer%;Database=%Source%;TRUSTED_CONNECTION=True;
SET TargetConnString=Server=%TargetServer%;Database=%Target%;TRUSTED_CONNECTION=True;
SET SourceDacpac=%ProjectPath%\%DacPath%\%Source%_source.dacpac
SET TargetDacpac=%ProjectPath%\%DacPath%\%Target%_target.dacpac
SET OutFile=%ProjectPath%\%SqlPath%\%Target%_Migration_%MigrationTag%.sqlcmd.sql