Forum Replies Created

Viewing 15 posts - 31 through 45 (of 89 total)

  • RE: Read SQL Error logs

    Vasan,

    Thanks for taking the time to share this script. Very useful. If I could make a suggestion, would it not be easier to use xp_enumerrorlogs to find the number of...

  • RE: Finding queries to tune

    Simon,

    Excellent script! Thank you for sharing it. May I suggest using this line of code to retrieve the object name:

    [Object] = OBJECT_SCHEMA_NAME(qt.objectid,qt.dbid) + '.' +OBJECT_NAME(qt.objectid,qt.dbid),

    That would eliminate all the cursor...

  • RE: Duplicate Stats

    Thanks for sharing, but I'm not real clear what the intent is.

    Lee

  • RE: Real World:SQL server configuration Quality check script for DBA's.

    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...

  • RE: Get file sizes of database files and free space on disk

    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...

  • RE: List Out All User Defined Triggers

    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,

    ...

  • RE: Script to Generate Table to Stored Procedure Cross References

    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...

  • RE: Quick SQL Server Configuration Summary Report

    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,...

  • RE: Quick SQL Server Configuration Summary Report

    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 *...

  • RE: Quick SQL Server Configuration Summary Report

    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...

  • RE: Fibonacci Series in TSQL

    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...

  • RE: Last Accessed Datetime for table - Most easiest way

    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...

  • RE: Trace flag 8295?

    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...

  • RE: SQL Server System Report

    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...

  • RE: SQL Server System Report

    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...

Viewing 15 posts - 31 through 45 (of 89 total)