This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BACKUP DATABASE [AxDB] TO DISK = N'D:\Backups\axdb_golden.bak' WITH NOFORMAT, NOINIT, NAME = N'AxDB_golden-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, COMPRESSION, STATS = 10 | |
GO | |
RESTORE DATABASE [AxDB_CopyForExport] FROM DISK = N'D:\Backups\axdb_golden.bak' WITH FILE = 1, | |
MOVE N'AXDBBuild_Data' TO N'F:\MSSQL_DATA\AxDB_CopyForExport.mdf', | |
MOVE N'AXDBBuild_Log' TO N'G:\MSSQL_LOGS\AxDB_CopyForExport_Log.ldf', | |
NOUNLOAD, STATS = 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
update sysglobalconfiguration | |
set value = 'SQLAZURE' | |
where name = 'BACKENDDB' | |
update sysglobalconfiguration | |
set value = 1 | |
where name = 'TEMPTABLEINAXDB' | |
drop procedure if exists XU_DisableEnableNonClusteredIndexes | |
drop procedure if exists SP_ConfigureTablesForChangeTracking |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin\ | |
SqlPackage.exe /a:export /ssn:localhost /sdn:<database to export> /tf:D:\Exportedbacpac\my.bacpac /p:CommandTimeout=1200 /p:VerifyFullTextDocumentTypesSupported=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE USER axdeployuser FROM LOGIN axdeployuser | |
EXEC sp_addrolemember 'db_owner', 'axdeployuser' | |
CREATE USER axdbadmin FROM LOGIN axdbadmin | |
EXEC sp_addrolemember 'db_owner', 'axdbadmin' | |
CREATE USER axmrruntimeuser FROM LOGIN axmrruntimeuser | |
EXEC sp_addrolemember 'db_datareader', 'axmrruntimeuser' | |
EXEC sp_addrolemember 'db_datawriter', 'axmrruntimeuser' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALTER DATABASE [your database name] SET CHANGE_TRACKING = ON (CHANGE_RETENTION = 6 DAYS, AUTO_CLEANUP = ON); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Net; | |
using System.Text; | |
namespace FTPLibrary | |
{ | |
//DTO to hold required info for FTP call | |
public class ServiceInfo | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin\ | |
SqlPackage.exe /a:import /sf:D:\Exportedbacpac\my.bacpac /tsn:localhost /tdn:AxDB_fromUAT /p:CommandTimeout=1200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd k:\AosService\PackagesLocalDirectory\Bin\ | |
SyncEngine.exe -syncmode=fullall -metadatabinaries=k:\AosService\PackagesLocalDirectory -connect="Data Source=DBServer;Initial Catalog=AxDB;Integrated Security=True;Enlist=True;Application Name=SyncEngine" -fallbacktonative=False >C:\Temp\synclog.txt 2>&1 |