Viewing 15 posts - 31 through 45 (of 86 total)
Excellent script. Thanks for sharing. I did however run into an issue with Section J: where more than just TEMPDB was returned. It turns out that the logical name for...
August 31, 2015 at 7:07 am
Jonathan,
Great script. Thanks for sharing. One small problem though is this line:
IF CONVERT(int, @ServerVersion) < 10
The issue is that SQL Server 2008 does NOT support sys.dm_os_volume_stats which was not introduced...
August 17, 2015 at 7:48 am
Thanks for taking the time share your script.
Expanding on Gary's points you could eliminate all the JOINS by using something like this:
'SELECT
db_name() as Database_Name,
...
August 7, 2015 at 6:51 am
Excellent scripts. In my testing I found a couple of issues though. When I used the code that uses sys.sql_modules (Alesksey's reply to Alberto) I got some false hits. This...
June 25, 2015 at 9:12 am
Rudy,
Yes, I agree. The point I was trying to make is that in your code (below) the statement: PRINT ' ** No ServerAdmin Users Detection of ** '
will never execute,...
February 11, 2015 at 12:29 pm
Rudy,
Try this statement on a SQL Server with NO members of the serveradmin role:
SELECT COUNT(*) FROM sys.server_principals WHERE (type ='R') and (name='serveradmin')
What I get is 1
If you run this:
SELECT *...
February 11, 2015 at 11:11 am
Rudy, Thanks for sharing this with us. I did find a couple of things that I don't understand.
The code where you are checking for members of the sysadmin role first...
February 11, 2015 at 9:37 am
Thanks for contributing this code. You should point out though that you are limited to the number of Fibonacci numbers that can be produced.
select * from dbo.fn_generate_fibonacciseries(47) will produce this...
December 17, 2014 at 11:44 am
Vignesh,
Thank you for taking the time to create and share this script. I did find a problem though. The date returned for some tables were incorrect when I compared them...
November 25, 2014 at 7:18 am
I know this is an old post but just in case you still want to know:
'Creates a secondary index on the identifying columns on the change tracking side...
November 20, 2014 at 10:37 am
That looks much better. I would disagree though about including the update usage option in Sean's code. Again from BOL: "updateusage can take some time to run on large tables...
September 22, 2014 at 6:58 am
Sounds weird. If you look at the BOL entry for sp_space_used in Remarks it states: "database_size will always be larger than the sum of reserved + unallocated space because it...
September 22, 2014 at 6:39 am
For my users, they would expect the same answer either way. One way to handle that would be that if the @Fromdate is greater than the @Todate, simply switch the...
August 19, 2014 at 9:26 am
I see your point. But the end-user would be confused by the output.
In reality if I were deploying this I would likely disallow the user from inputting a @Fromdate...
August 19, 2014 at 7:20 am
Sure, here are the results of 2 calls using your posted code:
Select [dbo].[fn_TotaltimeBetweendates] ('06/13/1990', '08/18/2014') -- Returns 24 Years :2 Months :5 Days
Select [dbo].[fn_TotaltimeBetweendates] ('08/18/2014', '06/13/1990') -- Returns -25 Years...
August 19, 2014 at 6:33 am
Viewing 15 posts - 31 through 45 (of 86 total)