Viewing 15 posts - 436 through 450 (of 7,191 total)
Do you yourself have privileged access to the server? If not, you won't be able to see the sa login, even if it exists. As far as I know, the...
October 4, 2019 at 3:02 pm
You should declare your table variable outside of the WHILE loop, otherwise it will keep getting reinitialized.
Phil, I agree that the table should be declared outside of the loop,...
October 4, 2019 at 2:14 pm
Doing this from memory, so if it's not quite correct then feel free to tweak it.
SELECT 'RESTORE LOG <MyDB> FROM DISK = ''' + f.physical_device_name + '''...
October 4, 2019 at 1:39 pm
Yes, it's possible. Do you have any reason for suspecting that it isn't?
John
October 3, 2019 at 11:25 am
One reason for available memory not being used is inappropriate memory grants. Make sure that you are updating your statistics regularly.
John
October 2, 2019 at 3:56 pm
No, but I'd be surprised if you noticed it. You're filtering before writing to disk, so I think it's quite a lightweight process.
John
October 2, 2019 at 2:15 pm
Just remove the quotes from round GETDATE() in the CREATE TABLE statement. I don't recommend named constraints for temp tables (like in your second example) since it may harm concurrency:...
October 2, 2019 at 2:11 pm
I think you'll need to capture actions from all principals and then filter out the stuff you don't want at server audit level. Here's an example:
CREATE SERVER...
October 2, 2019 at 1:58 pm
Not sure exactly what you're after here - please supply some sample data and expected results. You can use TRY_CONVERT to verify whether a string can be converted to a...
October 2, 2019 at 1:38 pm
Without seeing the execution plans, I'm guessing. What I imagine is happening is that the query optimizer does not know the value of the variable at compile time, and so...
October 1, 2019 at 8:02 am
It is, yes. You'll find the correct syntax here.
John
Edit: even when you get the syntax right, you're always going to get the value "02:30". It looks as if you...
September 30, 2019 at 1:39 pm
If you no longer have your log backups, you can only restore to a full or differential backup. Point-in-time restores are only possible with log backups.
John
September 30, 2019 at 1:29 pm
Those errors couldn't have come from the code you posted. You might want to check the code - it has more close parentheses than opens.
John
September 30, 2019 at 12:44 pm
Yes, sometimes the old CE works better than the new. A third option is to rewrite the query. Are you in a position to post it so that we can...
September 27, 2019 at 3:57 pm
There's a utility from Microsoft called the SQL Server 2016 Upgrade Advisor. I'm not sure how you get hold of it now that SQL Server 2016 is no longer the...
September 27, 2019 at 3:56 pm
Viewing 15 posts - 436 through 450 (of 7,191 total)