Viewing 15 posts - 76 through 90 (of 13,463 total)
so SQL server has a lock on the mdf/ndf/ldf files because they are in use, so are you really, really sure the mdf was encrypted?
is the database currently up and...
September 9, 2020 at 10:26 am
no help for the specific error, but structure wise, here's some help.
If you are using SUM,MIN,MAX,AVG you need a GROUP BY statement, and a column to group by.
All columns in...
September 9, 2020 at 10:14 am
i think sp_helprev_login has been the go to solution for years for logins.
database permissions are stored in the databases themselves, and those are scriptable from SSMS , and if you...
August 4, 2020 at 7:09 pm
well, for items that are not in index stats at all, you could use something like this:
SELECT name
FROM sys.[databases]
WHERE [database_id] NOT IN(
SELECT database_id FROM [sys].[dm_db_index_usage_stats]...
August 4, 2020 at 6:57 pm
in order to keep things ATOMic, nolock is ignored in INSERT/UPDATE/DELETE operations.
even if you added it, it would be ignored.
August 4, 2020 at 10:22 am
Well for MaxDop recommendations, I've been using this pair of scripts which have calculations that someone else came up with.
this script takes into account numa nodes and microsofts recommendations, and...
August 1, 2020 at 2:08 am
multi-threading is completely unrelated to how SQL server internally uses multiple cores.
a multi threaded operation is how the applciation does it's thing, SQL server is a black box as far...
July 31, 2020 at 5:41 pm
sys.dm_db_index_usage_stats already has all the index usage for all databases and all tables inside it, so you can get all the Databases all at once. no need for a loop...
July 31, 2020 at 2:00 am
you would need to add some code to specifically stop execution in the loop if an error is encountered.
you might want to change the logic to be all-or-nothing, instead of...
July 30, 2020 at 1:29 pm
it looks to me like you declare one variable, but use one that never existed a few lines later:
i think you declared "SQL", but dynamically create "strSQL" a few lines...
July 24, 2020 at 7:26 pm
I hope this example helps.
in this case, i am looping through all *.sql files in a given folder.
the output to a log file creates a set pf Starting $scriptname /...
July 24, 2020 at 12:16 pm
Thanks Jeff, I think my script is fine though, I don't think a unique index that is not part of a constraint requires any additional logic or exceptions.
a unique index...
May 27, 2020 at 3:31 am
well i remember a time where we used to provide scripts, and then an explanation of what not to do....
try my flavor of unused indexes. don't blindly execute them, evaluate...
May 26, 2020 at 9:02 pm
going forward, you could add something like this extended event as an example.
assume you want to track what [mydomain\IzaguirreL] is querying.
you don't need to identify the domain, as that is...
May 21, 2020 at 6:48 pm
without already having added something specifically to capture that, like an old-style trace or the current incarnation of capturing via extended events, then no, it is not possible to find...
May 21, 2020 at 6:38 pm
Viewing 15 posts - 76 through 90 (of 13,463 total)