Forum Replies Created

Viewing 15 posts - 3,046 through 3,060 (of 49,571 total)

  • RE: Select with NOLOCK is trying to get a shared lock

    Could be that there's some other statements being passed from the app and something else is waiting for a lock, because with the nolock hint applied to a table, SQL...

  • RE: Select with NOLOCK is trying to get a shared lock

    Lynn Pettis (5/18/2016)


    Correct me if I am wrong, the schema lock is to prevent schema changes to the table(s) involved in the query.

    Yup. Sch-S = Schema Stability lock. The only...

  • RE: Select with NOLOCK is trying to get a shared lock

    Eirikur Eiriksson (5/18/2016)


    Nolock ignores the locks of others but still takes shared locks.

    No it doesn't.

    Nolock can ignore locks of others because it doesn't take shared locks. If it did...

  • RE: Locking during Transactions

    End of the transaction (it's an exclusive lock, so has to be held until commit/rollback)

    As for whether it's a row, page or table lock, that will depend on the number...

  • RE: Two jobs ,One Stored Proc

    That or change the procedure so that it can be run by multiple processes without problems.

  • RE: Two jobs ,One Stored Proc

    Yeah, that'll be a problem

    truncate table [dbo].[DriveStatus]

    If you have two things running that procedure at the same time, one's going to end up working on wrong data or have the...

  • RE: Principal and Mirror server

    WhiteLotus (5/17/2016)


    Thanks for the reply , I mean I stop the MIRRORING process first before I insert/change data

    By stop you mean pause the synchronisation or completely drop the mirroring?

    If the...

  • RE: DDL Trigger to prevent delete all for at-least 20 table in a database

    Why are you using a system view that's been deprecated for ~11 years?

    Bear in mind that if someone does update all rows, that really is a rollback of the update...

  • RE: DDL Trigger to prevent delete all for at-least 20 table in a database

    Only if you write them badly, but that goes for one trigger or one hundred triggers.

  • RE: DDL Trigger to prevent delete all for at-least 20 table in a database

    DDL triggers aren't going to stop deleted. DDL (data definition language) is CREATE, ALTER, DROP.

    If you want to prevent deletes on 20 tables (as in DELETE FROM ...), you need...

  • RE: Enquiry on Logshipping

    While you can set the compat mode, it won't do anything about the EOMonth function. That's new on 2012 and will work no matter the compat mode. Compatibility mode affects...

  • RE: Go in SP

    dallas13 (5/17/2016)


    So it means something is wrong with query. How to find these incompatible statements? I ran upgrade advisor from 2005 to 2008 to 2012 to 2014 to check for...

  • RE: Go in SP

    So,

    CREATE PROCEDURE Test1

    AS

    PRINT 'In Proc1'

    EXEC Test1 -- still part of the stored procedure definition, hence causes recursion and an error once the nest limit is hit

    VS

    CREATE PROCEDURE Test1

    AS

    PRINT 'In Proc1'

    GO

    EXEC...

  • RE: Go in SP

    No, not new at all.

    GO is not a T-SQL keyword. It's a batch terminator, hence it designates (to Management Studio) where the batch ends. Since a stored procedure is the...

  • RE: Are the posted questions getting worse?

    jasona.work (5/16/2016)


    Somedays, I envy you folks living in places that don't have "weather" like what we've had these past couple weeks...

    Last weekend, we had the windows of the house opened...

Viewing 15 posts - 3,046 through 3,060 (of 49,571 total)