Forum Replies Created

Viewing 15 posts - 1,156 through 1,170 (of 1,583 total)

  • RE: Logging or monitoring slow query

    Here's what I use (includes everything that has already been mentioned), I adapted it from an article I read here on SSCCREATE PROC [dbo].[utl_SeeWhatsExecuting]

    @Duration int = NULL

    AS

    /*

    exec utl_SeeWhatsExecuting 5000

    */

    BEGIN

    ...

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: Stored Procedures executed from Excel - Can I capture the name of the Excel file?

    To the best of my knowledge SQL Server isn't able to track an external/3rd party application that's calling the stored-procedure, however, it can track the credentials being used that executes...

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: how is it pos -- filegroup usage percentage for a database more than 100 for sql server

    Are you talking about tempdb by chance?

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: Logshipping status report Throgh Mail

    kranthi.india123 (3/1/2012)


    Thank You So much..yes i can understand that code....

    but that , i can run the scheduled sql job right.automatically,every Time Run scheduled Job so every TRN should...

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: KILL

    Yes "sp_whom2" a modified/better version of "sp_who"

    USE [master]

    GO

    /****** Object: StoredProcedure [dbo].[sp_whom2] Script Date: 03/02/2012 08:30:50 ******/

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER OFF

    GO

    CREATE PROCEDURE [dbo].[sp_whom2] --- 1995/11/03 10:16

    @SPID...

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: KILL

    This is also typical behavior when the query/statement you killed spans across a "linked server". If your query does perform TSQL on a linked server, you need to find...

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: how to change the name of stored procedure?

    Wow I can honestly say I've never encountered this and usually simply rename the object via SSMS...I am so glad I came across this post!

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: Logshipping status report Throgh Mail

    Doesn't the query I posted above give you the results you are looking for?

    I don't believe there is a way to access/schedule the SSRS report that's built in to MSSQL...

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: Logshipping status report Throgh Mail

    I'll get back with you shortly with an example

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: Weird DELETE statement or is legit?

    Well said. Yes I was only sharing with the forum the bizarre code I had come across. Once again, not something I would have written or implementee but...

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: Dynamically setting fully qualified name for tables in stored procedure

    Agree with Sean...

    You could create some sort of a Lookup table to store details about each client ie.(ServerName, DBName, Schema, etc) and then create queries that use the lookup information...

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: Large Update Statement - millions of rows

    okbangas (2/29/2012)


    declare @affected int;

    set @affected = 1

    while @affected > 0

    begin

    update top 50000

    (...)

    where <condition matched by non-updated rows only>

    set @affected = @@rowcount;

    end

    Placing the transaction inside the WHILE loop would ensure...

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: Weird DELETE statement or is legit?

    I checked with the developer who wrote it and apparently this particular syntax is used to delete duplicates from the table so a unique clustered index can be created. ...

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: select statement takes long time

    Can you attached a copy of your execution plan?

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • RE: Logshipping status report Throgh Mail

    Not sure why you'd want to use this (as the results from the sp_help_log_shipping_monitor will be in a horrible format using this method) but this will work:

    exec msdb..sp_send_dbmail

    @recipients='chintu@www.com'

    , @subject ='Log...

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

Viewing 15 posts - 1,156 through 1,170 (of 1,583 total)