{"action":"created","issue":{"url":"https://api.github.com/repos/sqlcollaborative/dbatools/issues/995","repository_url":"https://api.github.com/repos/sqlcollaborative/dbatools","labels_url":"https://api.github.com/repos/sqlcollaborative/dbatools/issues/995/labels{/name}","comments_url":"https://api.github.com/repos/sqlcollaborative/dbatools/issues/995/comments","events_url":"https://api.github.com/repos/sqlcollaborative/dbatools/issues/995/events","html_url":"https://github.com/sqlcollaborative/dbatools/issues/995","id":217454589,"number":995,"title":"Restore-DBADatabase without recovery","user":{"login":"PsPsam","id":20344934,"avatar_url":"https://avatars0.githubusercontent.com/u/20344934?v=3","gravatar_id":"","url":"https://api.github.com/users/PsPsam","html_url":"https://github.com/PsPsam","followers_url":"https://api.github.com/users/PsPsam/followers","following_url":"https://api.github.com/users/PsPsam/following{/other_user}","gists_url":"https://api.github.com/users/PsPsam/gists{/gist_id}","starred_url":"https://api.github.com/users/PsPsam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PsPsam/subscriptions","organizations_url":"https://api.github.com/users/PsPsam/orgs","repos_url":"https://api.github.com/users/PsPsam/repos","events_url":"https://api.github.com/users/PsPsam/events{/privacy}","received_events_url":"https://api.github.com/users/PsPsam/received_events","type":"User","site_admin":false},"labels":[{"id":173004247,"url":"https://api.github.com/repos/sqlcollaborative/dbatools/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":{"login":"Stuart-Moore","id":5613670,"avatar_url":"https://avatars3.githubusercontent.com/u/5613670?v=3","gravatar_id":"","url":"https://api.github.com/users/Stuart-Moore","html_url":"https://github.com/Stuart-Moore","followers_url":"https://api.github.com/users/Stuart-Moore/followers","following_url":"https://api.github.com/users/Stuart-Moore/following{/other_user}","gists_url":"https://api.github.com/users/Stuart-Moore/gists{/gist_id}","starred_url":"https://api.github.com/users/Stuart-Moore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stuart-Moore/subscriptions","organizations_url":"https://api.github.com/users/Stuart-Moore/orgs","repos_url":"https://api.github.com/users/Stuart-Moore/repos","events_url":"https://api.github.com/users/Stuart-Moore/events{/privacy}","received_events_url":"https://api.github.com/users/Stuart-Moore/received_events","type":"User","site_admin":false},"assignees":[{"login":"Stuart-Moore","id":5613670,"avatar_url":"https://avatars3.githubusercontent.com/u/5613670?v=3","gravatar_id":"","url":"https://api.github.com/users/Stuart-Moore","html_url":"https://github.com/Stuart-Moore","followers_url":"https://api.github.com/users/Stuart-Moore/followers","following_url":"https://api.github.com/users/Stuart-Moore/following{/other_user}","gists_url":"https://api.github.com/users/Stuart-Moore/gists{/gist_id}","starred_url":"https://api.github.com/users/Stuart-Moore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stuart-Moore/subscriptions","organizations_url":"https://api.github.com/users/Stuart-Moore/orgs","repos_url":"https://api.github.com/users/Stuart-Moore/repos","events_url":"https://api.github.com/users/Stuart-Moore/events{/privacy}","received_events_url":"https://api.github.com/users/Stuart-Moore/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2017-03-28T05:48:42Z","updated_at":"2017-04-22T16:08:55Z","closed_at":null,"body":"### Is this a *feature* OR *bug*:\r\n\r\nBug\r\n\r\n### System Details\r\n\r\n- Operating system name and version:\r\n- Output from `$PSVersionTable`:\r\n\r\n```\r\nName                           Value                                                                                                                                                                                           \r\n----                           -----                                                                                                                                                                                           \r\nPSVersion                      5.1.14393.953                                                                                                                                                                                   \r\nPSEdition                      Desktop                                                                                                                                                                                         \r\nPSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                                                                                                         \r\nBuildVersion                   10.0.14393.953                                                                                                                                                                                  \r\nCLRVersion                     4.0.30319.42000                                                                                                                                                                                 \r\nWSManStackVersion              3.0                                                                                                                                                                                             \r\nPSRemotingProtocolVersion      2.3                                                                                                                                                                                             \r\nSerializationVersion           1.1.0.1  \r\n```\r\n\r\n- Output of dbatools version:\r\n\r\n```\r\nMajor  Minor  Build  Revision\r\n-----  -----  -----  --------\r\n0      8      943    -1      \r\n0      8      942    -1      \r\n0      8      933    -1      \r\n0      8      901    -1      \r\n0      8      900    -1      \r\n0      8      692    -1      \r\n0      8      65     -1 \r\n```\r\n\r\n- SQL Server version for source/target\r\n12.0.4502.0/12.0.4502.0\r\n\r\n### Steps to Reproduce\r\n```powershell\r\nRestore-DbaDatabase -SqlServer 'Name' -path \\\\server\\Path-MaintenanceSolutionBackup \r\n-RestoreTime $restoretime -UseDestinationDefaultDirectories \r\n-DatabaseName db_Powershellrestore -DestinationFilePrefix 'test_' \r\n-OutputScriptOnly -WithReplace -verbose\r\n```\r\n\r\n### Action Results\r\nRestore without recovery\r\n\r\n\r\n### Expected Results\r\nRestore with recover\r\n\r\n### Attached Logs or any exception errors\r\n\r\n- Use of Start-Transcript can help collection of console output and exceptions\r\n- Certain commands will generate an exception log that you can find in following directory: `dir $env:USERPROFILE\\Documents\\dbatools-exceptions.txt`\r\nI didnt add all the verbose when it just scanned all the files :)\r\n\r\n\r\n> VERBOSE: Get-FilteredRestoreFile - 804 Files to filter\r\n> VERBOSE: Get-FilteredRestoreFile - 1 database to process\r\n> VERBOSE: Get-FilteredRestoreFile - Find Newest Full backup\r\n> VERBOSE: Get-FilteredRestoreFile - Got a Full backup, now to find diffs if they exist\r\n> VERBOSE: Get-FilteredRestoreFile - we have at least one diff so look for tlogs after the last one\r\n> VERBOSE: Get-FilteredRestoreFile - Got a Full/Diff backups, now find all Tlogs needed\r\n> VERBOSE: Get-FilteredRestoreFile - Filtered 768 down to 2\r\n> VERBOSE: Get-FilteredRestoreFile - 3 Transaction Log backups found\r\n> VERBOSE: Get-FilteredRestoreFile - Returning Results to caller\r\n> VERBOSE: Restore-DbaDatabase -  dbs to restore\r\n> VERBOSE: Restore-DbaDatabase - Starting FileSet\r\n> VERBOSE: Test-DbaLsnChain - Testing LSN Chain\r\n> VERBOSE: Test-DbaLsnChain - Passed LSN Chain checks\r\n> VERBOSE: Test-DbaRestoreVersion - RestoreVersion is 12\r\n> VERBOSE: Restore-DBFromFilteredArray - Starting\r\n> VERBOSE: RPcount = 5\r\n> VERBOSE: Restore-DBFromFilteredArray - Restoring DB_Powershellrestore backup starting at order 1 - LSN 202885000042010500145 in \\\\sodra.com\\sql-backup\\Produktion\\vax-vs563\\DB\\FULL\\VAX-VS563_DB_FULL_20170226_210000.b\r\n> ak\r\n> VERBOSE: Restore-DBFromFilteredArray - Beginning Restore of DB_Powershellrestore\r\n> VERBOSE: Restore-DBFromFilteredArray - restoring to 03/26/2017 00:00:00\r\n> VERBOSE: Restore-DBFromFilteredArray - restore action = Database\r\n> VERBOSE: Restore-DBFromFilteredArray - More files to restore, NoRecovery set\r\n> VERBOSE: Restore-DBFromFilteredArray - Adding device\r\n> VERBOSE: Restore-DBFromFilteredArray - Performing restore action\r\n> RESTORE DATABASE [DB_Powershellrestore] FROM  DISK = N'\\\\sodra.com\\sql-backup\\Produktion\\vax-vs563\\DB\\FULL\\VAX-VS563_DB_FULL_20170226_210000.bak' WITH  FILE = 1,  MOVE N'DBPDT' TO N'G:\\Data\\test_DBPDT.mdf',  M\r\n> OVE N'DBPDT_log' TO N'H:\\Data\\test_DBPDT_log.LDF',  NORECOVERY,  NOUNLOAD,  REPLACE,  STATS = 1,  STOPAT = N'03/26/2017 00:00:00'\r\n> VERBOSE: Restore-DBFromFilteredArray - Succeeded, Closing Server connection\r\n> VERBOSE: Restore-DBFromFilteredArray - Restoring DB_Powershellrestore backup starting at order 2 - LSN 206251000024462100167 in \\\\share\\olahallengren\\\\DIFF\\VAX-VS563_DB_DIFF_20170325_211000.b\r\n> ak\r\n> VERBOSE: Restore-DBFromFilteredArray - Beginning Restore of DB_Powershellrestore\r\n> VERBOSE: Restore-DBFromFilteredArray - restoring to 03/26/2017 00:00:00\r\n> VERBOSE: Restore-DBFromFilteredArray - restore action = Database\r\n> VERBOSE: Restore-DBFromFilteredArray - More files to restore, NoRecovery set\r\n> VERBOSE: Restore-DBFromFilteredArray - Adding device\r\n> VERBOSE: Restore-DBFromFilteredArray - Performing restore action\r\n> RESTORE DATABASE [DB_Powershellrestore] FROM  DISK = N'\\\\share\\olahallengren\\\\DIFF\\VAX-VS563_DB_DIFF_20170325_211000.bak' WITH  FILE = 1,  MOVE N'DBPDT' TO N'G:\\Data\\test_DBPDT.mdf',  M\r\n> OVE N'DBPDT_log' TO N'H:\\Data\\test_DBPDT_log.LDF',  NORECOVERY,  NOUNLOAD,  REPLACE,  STATS = 1,  STOPAT = N'03/26/2017 00:00:00'\r\n> VERBOSE: Restore-DBFromFilteredArray - Succeeded, Closing Server connection\r\n> VERBOSE: Restore-DBFromFilteredArray - Restoring DB_Powershellrestore backup starting at order 206251000023479400001 - LSN 206251000023479400001 in \\\\share\\olahallengren\\\\LOG\\VAX-VS563_DB_LOG\r\n> _20170325_220000.trn\r\n> VERBOSE: Restore-DBFromFilteredArray - Beginning Restore of DB_Powershellrestore\r\n> VERBOSE: Restore-DBFromFilteredArray - restoring to 03/26/2017 00:00:00\r\n> VERBOSE: Restore-DBFromFilteredArray - restore action = Log\r\n> VERBOSE: Restore-DBFromFilteredArray - More files to restore, NoRecovery set\r\n> VERBOSE: Restore-DBFromFilteredArray - Adding device\r\n> VERBOSE: Restore-DBFromFilteredArray - Performing restore action\r\n> RESTORE LOG [DB_Powershellrestore] FROM  DISK = N'\\\\share\\olahallengren\\\\LOG\\VAX-VS563_DB_LOG_20170325_220000.trn' WITH  FILE = 1,  MOVE N'DBPDT' TO N'G:\\Data\\test_DBPDT.mdf',  MOVE N'A\r\n> xxosPDT_log' TO N'H:\\Data\\test_DBPDT_log.LDF',  NORECOVERY,  NOUNLOAD,  STATS = 1,  STOPAT = N'03/26/2017 00:00:00'\r\n> VERBOSE: Restore-DBFromFilteredArray - Succeeded, Closing Server connection\r\n> VERBOSE: Restore-DBFromFilteredArray - Restoring DB_Powershellrestore backup starting at order 206251000029313800001 - LSN 206251000029313800001 in \\\\share\\olahallengren\\\\LOG\\VAX-VS563_DB_LOG\r\n> _20170325_230000.trn\r\n> VERBOSE: Restore-DBFromFilteredArray - Beginning Restore of DB_Powershellrestore\r\n> VERBOSE: Restore-DBFromFilteredArray - restoring to 03/26/2017 00:00:00\r\n> VERBOSE: Restore-DBFromFilteredArray - restore action = Log\r\n> VERBOSE: Restore-DBFromFilteredArray - More files to restore, NoRecovery set\r\n> VERBOSE: Restore-DBFromFilteredArray - Adding device\r\n> VERBOSE: Restore-DBFromFilteredArray - Performing restore action\r\n> RESTORE LOG [DB_Powershellrestore] FROM  DISK = N'\\\\share\\olahallengren\\\\LOG\\VAX-VS563_DB_LOG_20170325_230000.trn' WITH  FILE = 1,  MOVE N'DBPDT' TO N'G:\\Data\\test_DBPDT.mdf',  MOVE N'A\r\n> xxosPDT_log' TO N'H:\\Data\\test_DBPDT_log.LDF',  NORECOVERY,  NOUNLOAD,  STATS = 1,  STOPAT = N'03/26/2017 00:00:00'\r\n> VERBOSE: Restore-DBFromFilteredArray - Succeeded, Closing Server connection\r\n> VERBOSE: Restore-DBFromFilteredArray - Restoring DB_Powershellrestore backup starting at order 206251000035130800001 - LSN 206251000035130800001 in \\\\share\\olahallengren\\\\LOG\\VAX-VS563_DB_LOG\r\n> _20170326_000001.trn\r\n> VERBOSE: Restore-DBFromFilteredArray - Beginning Restore of DB_Powershellrestore\r\n> VERBOSE: Restore-DBFromFilteredArray - restoring to 03/26/2017 00:00:00\r\n> VERBOSE: Restore-DBFromFilteredArray - restore action = Log\r\n> VERBOSE: Restore-DBFromFilteredArray - Doing Recovery on last file\r\n> VERBOSE: Restore-DBFromFilteredArray - Adding device\r\n> VERBOSE: Restore-DBFromFilteredArray - Performing restore action\r\n> RESTORE LOG [DB_Powershellrestore] FROM  DISK = N'\\\\share\\olahallengren\\\\LOG\\VAX-VS563_DB_LOG_20170326_000001.trn' WITH  FILE = 1,  MOVE N'DBPDT' TO N'G:\\Data\\test_DBPDT.mdf',  MOVE N'A\r\n> xxosPDT_log' TO N'H:\\Data\\test_DBPDT_log.LDF',  NOUNLOAD,  STATS = 1,  STOPAT = N'03/26/2017 00:00:00'\r\n> VERBOSE: Restore-DBFromFilteredArray - Succeeded, Closing Server connection\r\n> VERBOSE: Database DB_Powershellrestore restored successfully\r\n"},"comment":{"url":"https://api.github.com/repos/sqlcollaborative/dbatools/issues/comments/296383450","html_url":"https://github.com/sqlcollaborative/dbatools/issues/995#issuecomment-296383450","issue_url":"https://api.github.com/repos/sqlcollaborative/dbatools/issues/995","id":296383450,"user":{"login":"potatoqualitee","id":8278033,"avatar_url":"https://avatars2.githubusercontent.com/u/8278033?v=3","gravatar_id":"","url":"https://api.github.com/users/potatoqualitee","html_url":"https://github.com/potatoqualitee","followers_url":"https://api.github.com/users/potatoqualitee/followers","following_url":"https://api.github.com/users/potatoqualitee/following{/other_user}","gists_url":"https://api.github.com/users/potatoqualitee/gists{/gist_id}","starred_url":"https://api.github.com/users/potatoqualitee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/potatoqualitee/subscriptions","organizations_url":"https://api.github.com/users/potatoqualitee/orgs","repos_url":"https://api.github.com/users/potatoqualitee/repos","events_url":"https://api.github.com/users/potatoqualitee/events{/privacy}","received_events_url":"https://api.github.com/users/potatoqualitee/received_events","type":"User","site_admin":false},"created_at":"2017-04-22T16:08:55Z","updated_at":"2017-04-22T16:08:55Z","body":"@PsPsam - do you consider this issue resolved? If so, I will close it.\r\n\r\nThanks!"}}
{"actor":{"display_login":"potatoqualitee"}}