Forum Replies Created

Viewing 15 posts - 856 through 870 (of 5,393 total)

  • RE: Are the posted questions getting worse?

    Now I see that my post could be seen as bragging, when all I wanted to do was nothing but say "thank you". I'm hopelessly bad at soft skills. 🙁

    It...

    -- Gianluca Sartori

  • RE: Are the posted questions getting worse?

    Happy New Year everybody!

    And there's a very special thank you message for every single one of you on my blog here! 🙂

    Thank you for involving me in the most addictive...

    -- Gianluca Sartori

  • RE: Are the posted questions getting worse?

    GilaMonster (12/22/2014)


    Someone, please, help! http://www.sqlservercentral.com/Forums/Topic1645843-1549-1.aspx

    OMG!

    Cannot be unseen......:sick:

    -- Gianluca Sartori

  • RE: List denied permissions and undo a DENY

    DENY is removed with REVOKE.

    Here's an example:

    USE tempdb;

    GO

    -- Create a dummy user

    CREATE USER someUser WITHOUT LOGIN;

    GO

    -- GRANT DELETE

    GRANT DELETE TO someUser;

    GO

    -- REVOKE DELETE

    DENY DELETE TO someUser;

    GO

    -- only one between...

    -- Gianluca Sartori

  • RE: SQL Serer 2012 gives error: "Must declare the scalar variable" even when variable is declared

    It looks like you have to add parentheses to your RAISERROR command:

    raiserror( @errno,10,1, @errmsg)

    At least, in my 2012 and 2014 instances it worked.

    -- Gianluca Sartori

  • RE: SQL script GROUPING

    This should do the trick:

    SELECT Name,

    SUM(Quantity) AS SumQuantity,

    SUM(Volume) AS SumVolume

    FROM (

    SELECT CASE WHEN SUM(Volume) OVER() * .03...

    -- Gianluca Sartori

  • RE: Better to store 0 or null in a column

    Use 0 if the value exists and it is 0.

    Use NULL if the value does not exist or is undefined.

    If you used 0 when NULL was more appropriate, how would...

    -- Gianluca Sartori

  • RE: Active Monitor?

    The ones returned by sp_WhoIsActive are the ones that are actually running or holding open transactions.

    Activity monitor shows all sessions.

    -- Gianluca Sartori

  • RE: Active Monitor?

    Open a new query editor window. (CTRL + N)

    Type this:

    EXEC sp_WhoIsActive

    Hit F5

    -- Gianluca Sartori

  • RE: Active Monitor?

    Don't use the context menu to execute the procedure. Just run EXEC sp_whoisactive

    -- Gianluca Sartori

  • RE: Active Monitor?

    Weird. Quick attempt: copy everything to a new query editor window and execute from there. I had issues in the past executing scripts extracted from a zip file in a...

    -- Gianluca Sartori

  • RE: Active Monitor?

    locate the ALTER PROC statement in the whoisactive.sql file, select everything from there on to the end of the file and hit F5.

    Any errors?

    -- Gianluca Sartori

  • RE: Active Monitor?

    Plese re-run the contents of the file who_is_active_v11_11.sql.

    Does it run successfully or does it throw errors?

    If the procedure has been created successfully, you should see it in the object explorer...

    -- Gianluca Sartori

  • RE: Restoring a Single Table from Backup

    Nope. Unfortunately this is not possible with native tools, nor I think this feature is in Microsoft's plans.

    -- Gianluca Sartori

  • RE: Active Monitor?

    It looks like you got errors creating the stored procedure. Which version are you on?

    -- Gianluca Sartori

Viewing 15 posts - 856 through 870 (of 5,393 total)