« first day (3173 days earlier)      last day (1713 days later) » 

2:01 AM
Skull measured, 23.5" so fitted hat size is 7 1/2
 
 
3 hours later…
5:26 AM
morning
 
 
1 hour later…
6:26 AM
morning
 
6:54 AM
morning
 
7:04 AM
morning
 
 
1 hour later…
8:06 AM
morning
 
8:26 AM
m
 
let me do it for you
...orning
 
@billinkc and how about your liver? My Albanian friends are looking for one
@ConcernedOfTunbridgeWells thanks, you are my official career counsellor now
 
8:42 AM
Glad to be of service.
 
on an unrelated note, judging from the noise my colleague's laptop is making, he must be mining bitcoins while away from his desk
 
Might just need new heatsink gunk on the CPU. Is it a Thinkpad?
 
it is
 
 
1 hour later…
10:04 AM
Morning
 
10:22 AM
@dezso Unless it's an X1 Carbon you can probably replace the heatsink gunk on it.
 
10:52 AM
@ypercubeᵀᴹ I deleted (my) comment. Thanks.
 
11:10 AM
@hot2use first I had the same thought as you.
 
 
1 hour later…
12:19 PM
@ypercubeᵀᴹ good to know
I then re-read the question and .... AHA
 
 
1 hour later…
1:31 PM
Could someone help me with a newbie question about log shipping?
I've configured it for a test database where I chose the target to be in the In Recovery state. Obviously that makes the database inaccessible. I then wanted to take a look at its contents, just to make sure I configured everything correctly and its contents are the same as the source. So I used this solution, and it worked well. (Except I used RESTORE LOG instead of RESTORE DATABASE.)
Now I want to resume the log shipping process, so I need to put the target DB in the In Recovery state again. Trying it the same way as in that answer but using WITH NORECOVERY instead of WITH RECOVERY didn't work. I guess I could re-apply all the backups, starting from the last full backup and including all the transaction log backups that have been applied so far, but is that the only option in this scenario?
 
Did you try the official documentation? Configure Log Shipping (SQL Server) (Microsoft | Docs | SQL Server)
You need to put the database in the "apply additional transaction log backups" -state which is `NORECOVERY.
The database is then displayed as RECOVERING.
RESTORE DATABASE [TEST] FROM DISK='TEST_Backup.bak?' WITH .... NORECVOERY
 
1:48 PM
@dezso I figured kidneys were still the optimal organs for enterprising pirate doctors
 
RESTORE LOG [TEST] FROM DISK='TEST_Log_Backup.trn' WITH .... NORECOVERY
The database is then in the ' RECOVERING' state and additional Transaction Log backups can be applied.
If you apply RECOVERY after the RESTORE DATABASE then you can't apply additional TLOG backups.
IF you apply RECOVERY after RESTORE LOG then you can't apply additional TLOG backups.
 
Yes, I tried the RESTORE ... WITH NORECOVERY option after I finished inspecting the database, and it said:
Msg 3117, Level 16, State 4, Line 4
The log or differential backup cannot be restored because no files are ready to rollforward.
Msg 3013, Level 16, State 1, Line 4
RESTORE LOG is terminating abnormally.
So yes, I figured I couldn't do it like that.
And I also believe I should be able to achieve my goal by re-applying all the backups with no recovery starting from the last full backup. My question is whether that's my only option.
 
@AndriyM Running recovery is a one-way process unless you specify a STANDBY file.
 
@PaulWhite Got it
So that seems to imply that I really do have to restore all the backups, very well then.
Thank you guys
 
2:07 PM
@AndriyM Yes you'll need to start again
 
Noted, thanks
 
It's been a while since I did this for real, but I believe you only need to specify STANDBY on the final restore when you want to be able to inspect the data.
It's good to try these things with a small test database, with changes between log backups, so you get a good feel for how it all works, and what the optimal strategy is.
 
So rather than WITH RECOVERY I could have run WITH STANDBY = ... and then I would have been able to go back to NORECOVERY?
 
@AndriyM Using STANDBY allows read-only access to the database. You can then choose to fully recover, or proceed with further restores.
But to answer the question literally, no, you cannot go from standby to norecovery. The point is you don't ever need to.
Oh, maybe you can with restore database with norecovery. I don't recall ever trying it.
 
2:29 PM
@PaulWhite I don't think I'll need to either, not this time anyway as I've already verified that my configuration works fine. But it could come in handy in the future. I'll just try it then and see what happens. Thanks again.
 
@AndriyM I'd be curious to know if it works, and if so, if it deletes the standby file
 
@PaulWhite Oh, then it makes two of us. In that case I'm going to find this out very soon and report back.
 
3:27 PM
Another one of those sneaky questions with links: dba.stackexchange.com/q/248649/23721
That was quick...
 
4:03 PM
@PaulWhite Yes, you can do RESTORE ... WITH NORECOVERY after RESTORE ... WITH STANDBY = ..., and yes, it deletes the standby file.
 
@mustaccio if they are smart, they use an AI for posting such questions, and using data science to figure out how dumb it is
 
4:26 PM
@dezso The question did look like something a nascent AI would compose...
 
5:20 PM
@AndriyM Sorry for not getting back. Was on the road.
 
@hot2use No problem!
 
 
2 hours later…
7:41 PM
@AndriyM Thanks!
 
No worries
 

« first day (3173 days earlier)      last day (1713 days later) »