Skip to content

Commit

Permalink
Allow special characters in database name
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenfuqua committed Aug 28, 2020
1 parent 52a9196 commit 77feffb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions TestRunner.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ function Reset-OdsDatabase {
Import-Module SQLPS

Invoke-SqlCmd -Database "master" `
-Query "ALTER DATABASE $databaseName SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
-Query "ALTER DATABASE [$databaseName] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
RESTORE DATABASE $databaseName FROM DISK = '$sqlBackupPath\$backupFilename'
RESTORE DATABASE [$databaseName] FROM DISK = '$sqlBackupPath\$backupFilename'
WITH
MOVE 'EdFi_Ods_Empty' TO '$sqlDataPath\$($databaseName).mdf',
MOVE 'EdFi_Ods_Empty_log' TO '$sqlDataPath\$($databaseName)_log.ldf',
REPLACE;
ALTER DATABASE $databaseName SET MULTI_USER;" -QueryTimeout 0
ALTER DATABASE [$databaseName] SET MULTI_USER;" -QueryTimeout 0

Invoke-SqlCmd -Database $databaseName -Query "
DECLARE @ReorganizeOrRebuildCommand NVARCHAR(MAX);
Expand Down

0 comments on commit 77feffb

Please sign in to comment.