0

Is there a way to lock an entire database from writing but at the same time storing the incoming requests in a queue or in memory until the lock is released?

edit 1: I'm looking for something similar to MySQL

'FLUSH TABLES WITH READ LOCK' and 'UNLOCK TABLES'

Thanks

MemoGarcia
  • 71
  • 1
  • 5

1 Answers1

1

You can add table level lock hints with (tablock) or with (tablockx) depending if you need shared or exclusive lock -- that's of course per table.

TABLOCK vs TABLOCKX

Community
  • 1
  • 1
James Z
  • 12,209
  • 10
  • 24
  • 44