mirror of
https://github.com/Microsoft/sql-server-samples.git
synced 2025-12-08 14:58:54 +00:00
@@ -35,7 +35,7 @@ if ($null -ne $dbs -And $dbs.Length -gt 0){
|
||||
}
|
||||
|
||||
$files = $files -join ","
|
||||
$sqlcmd = "sp_detach_db $($db.dbName);CREATE DATABASE $($db.dbName) ON $($files) FOR ATTACH ;"
|
||||
$sqlcmd = "sp_detach_db [$($db.dbName)];CREATE DATABASE [$($db.dbName)] ON $($files) FOR ATTACH ;"
|
||||
|
||||
Write-Verbose "Invoke-Sqlcmd -Query $($sqlcmd) -ServerInstance '.\SQLDEV'"
|
||||
Invoke-Sqlcmd -Query $sqlcmd -ServerInstance ".\SQLDEV"
|
||||
@@ -43,4 +43,4 @@ if ($null -ne $dbs -And $dbs.Length -gt 0){
|
||||
}
|
||||
|
||||
Write-Verbose "Started SQL Server."
|
||||
while ($true) { Start-Sleep -Seconds 3600 }
|
||||
while ($true) { Start-Sleep -Seconds 3600 }
|
||||
|
||||
Reference in New Issue
Block a user