Viewing 15 posts - 31 through 45 (of 13,421 total)
I think what you want to do is to use a CASE statement to evaluate the b.score: if it's less than zero use zero, else use the b.score
December 20, 2020 at 12:38 pm
I cannot think of something out of the box that does this, third part or not.
i think you have to do this manually, and it will be a bit of...
December 8, 2020 at 9:04 pm
if the database is in SIMPLE recovery mode, it goes back to whether the database is currently accessible or not.
you could restore last nights backup as a new database name,...
September 9, 2020 at 10:29 am
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
Viewing 15 posts - 31 through 45 (of 13,421 total)