What is a Blocking in SQL Server | Find blocking and troubleshooting steps | SQL Interview Q&A

Поділитися
Вставка
  • Опубліковано 2 жов 2024
  • Blocking is completely normal in SQL Server. You will typically be unaware of the many short blocks happening all the time.
    Sometimes, blocks take longer than expected to resolve. Blocks of longer duration can create chains, where a blocked process blocks additional processes and so on. This type of blocking scenario is problematic.
    The concern is not with blocking, but rather excessive blocking.
    Video links below.
    *What is Locking in SQL Server
    • Locking in SQL Server ...
    *Locking Resources in SQL Server
    • Locking Resources in S...
    *Locking modes in SQL Server
    • What are the different...
    *Microsoft Documentation on Blocking
    learn.microsof...
    *sp_Whoisactive documentation link(to download stored procedure)
    github.com/ama...
    --T-SQL scripts used in this video
    **UPDATE in spid 52
    begin tran
    update table1
    set Id = 6201
    where Ext = 122
    **in spid 54
    select * from table1
    select request_session_id, request_mode, request_type,
    resource_type, resource_description
    from sys.dm_tran_locks
    select session_id, wait_duration_ms, wait_type,
    blocking_session_id, resource_description
    from sys.dm_os_waiting_tasks
    select session_id, status, wait_time, wait_type, wait_resource, command
    from sys.dm_exec_requests where
    select * from sys.sysprocesses
    sp_whoisactive @get_locks = 1
    dbcc inputbuffer(52)
    sp_who2 active
    kill 52
    EXEC sp_configure 'show advanced options', 1;
    RECONFIGURE;
    EXEC sp_configure 'blocked process threshold', 5
    RECONFIGURE;

КОМЕНТАРІ • 26

  • @sivasankar7013
    @sivasankar7013 Рік тому +2

    while i am executing sp_whoisactive it shows we cant find a storedprocedure

    • @righttolearnbk
      @righttolearnbk  Рік тому +1

      You have to first create a stored procedure with that name. This script is available in Internet.

  • @harithad1757
    @harithad1757 3 місяці тому

    need session on performance tuning and also how to identify cpu and memory issues

  • @jyotimoi007
    @jyotimoi007 18 днів тому

    Great Video and Helpful

  • @RaviKiran-sf7ns
    @RaviKiran-sf7ns Рік тому +1

    Hi Bro,
    Mee videos almost chustunna
    Mee laptop configuration enti
    4 VMs install chesina Mee laptop Baga fast ga work avutundi, Please suggest best laptop

    • @righttolearnbk
      @righttolearnbk  Рік тому +1

      If you install VM on SSD, its performance will be good.
      Min 8gb RAM but if you work with more VM that need max RAM then go for 16GB
      Intel i5/i7 10th generation

    • @RaviKiran-sf7ns
      @RaviKiran-sf7ns Рік тому

      @@righttolearnbk Thanks for the kind response

  • @florincopaci6821
    @florincopaci6821 Рік тому +2

    You explain very well. Thank you.

  • @tahirhanyildizoglu1461
    @tahirhanyildizoglu1461 4 місяці тому +1

    thank you for the practical information

  • @hanumatharaonisankarao5000
    @hanumatharaonisankarao5000 Рік тому +1

    brother can you make a complete video about migration ms SQL?

  • @Chinnurockbells
    @Chinnurockbells Рік тому

    very helping sir, thank you, much appririate , do the more videos on this

  • @tonyettah
    @tonyettah Рік тому

    Well, explanatory. Thank you, sir,👍👍👍👍👍

  • @burropoco
    @burropoco 11 місяців тому

    Very helpful and well explained. Thank you.

  • @shivachithambaram3127
    @shivachithambaram3127 Рік тому

    Hi sir your vidio is soo useful👏👏👏👏👏👏👏👏

  • @albantfoot3876
    @albantfoot3876 Рік тому

    Just amazing. Thanks

  • @tarunbisht4786
    @tarunbisht4786 Рік тому

    U doing such an amazing job sir ,I have one request kindly please make a video that once we become sql dba after that how we can grow and which technology can help us for career growth as well income growth or you can reply on my comment .
    In advance thank you so much u doing such an Amazing work 💗

    • @righttolearnbk
      @righttolearnbk  Рік тому +3

      After you become SQL dba, focus on SSIS & SSRS and also Learn SQL Azure and do certification on Azure as well. You can also Learn another RDBMS like Oracle, Postgresql, DB2 because a person with multiple technologies have more value in the market.

  • @Malleshp-ec8yi
    @Malleshp-ec8yi Рік тому

    I want to learn course bro

  • @shyamdular4800
    @shyamdular4800 Рік тому

    Hello sir aap bahut accha padhate hai thank you so much

  • @devakumar2911
    @devakumar2911 Рік тому

    Hi can you please share the SQL dba real-time interview questions for senior candidates .

  • @harithagolla6241
    @harithagolla6241 Рік тому

    Hi, please make the video about SQL architecture.

  • @Malleshp-ec8yi
    @Malleshp-ec8yi Рік тому

    Good video

  • @laxmipriyanka2706
    @laxmipriyanka2706 Рік тому

    Did u provide work support

    • @righttolearnbk
      @righttolearnbk  Рік тому +1

      As of now, NO beacuse even I work for a company in real time