title: Regarding SQL Server Locking Mechanism
body: <p>I would like to ask couple of questions regarding SQL Server Locking mechanism</p>
  
  <ol>
  <li><p>If i am not using the lock hint with SQL Statement, SQL Server uses PAGELOCK hint by default. am I right??? If yes then why? may be its due to the factor of managing too many locks this is the only thing i took as drawback but please let me know if there are others. and also tell me if we can change this default behavior if its reasonable to do.</p></li>
  <li><p>I am writing a server side application, a Sync Server (not using sync framework) and I have written database queries in C# code file and using ODBC connection to execute them. Now question is what is the best way to change the default locking from Page to Row keeping drawbacks in mind (e.g. adding lock hint in queries this is what i am planning for).</p></li>
  <li><p>What if a sql query(SELECT/DML) is being executed without the scope of transaction and statement contains lock hint then what kind of lock will be acquired (e.g. shared, update, exclusive)? AND while in transaction scope does Isolation Level of transaction has impact on lock type if ROWLOCK hint is being used.</p></li>
  <li><p>Lastly, If some could give me sample so i could test and experience all above scenarios my self (e.g. dot net code or sql script) </p></li>
  </ol>
  
  <p>Thanks
  Mubashar</p>