4
votes
Accepted
In SQL Server / Azure SQL is there a way to see the locks a query produced or wants to produce?
The easy way is to start a transaction, run the query and then examine sys.dm_tran_locks. But this will only show you locks that are held after the query, typically U or X locks, or S locks in ...
4
votes
Accepted
Error trying to add a login to Azure SQL Special Role 'dbmanager'
The dbmanager role is a database role not a server role. That database role only exists in the master database.
I.e., you have to create a user in the master database for the login in question and add ...
3
votes
Accepted
Azure SQL Database - contained users password
As Tibor points out, the practical answer here is "in the database", so it follows the database through backup/restore or an AG failover. That is the reason database users with passwords ...
3
votes
In SQL Server / Azure SQL is there a way to see the locks a query produced or wants to produce?
Some More
David's answer is correct, but to add a few more things that may be important...
You can generally infer from an execution plan and query that:
Seeks will start with key locks
Scans will ...
2
votes
Accepted
Azure Database Performance Throttling - Use Replication or?
Depending on which flavour of Azure SQL is being used you may be able to implement Resource Governor or equivalent.
This allows you to allocate a portion of the hardware to each workload. The large ...
2
votes
Accepted
Azure SQL Average lock wait time logs?
The average wait time for a specific event is probably going to be low unless you have timeouts frequently because of it. The DMV you have identified will let you work out the average wait times by ...
1
vote
SQL Server Timeout only on production
Assuming your prod environment is setup with AG listener scaled across multi subnet, with such multi subnet setup the intermittent timeouts would happen without MultiSubnetFailover=True setting as ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
azure-sql-database × 835sql-server × 471
azure × 94
performance × 59
query-performance × 40
t-sql × 33
index × 26
replication × 25
ssms × 24
sql-server-2016 × 23
execution-plan × 23
database-design × 19
azure-sql-managed-instance × 19
security × 18
backup × 17
permissions × 17
stored-procedures × 15
index-tuning × 15
sql-server-2012 × 14
partitioning × 14
migration × 14
linked-server × 13
transactional-replication × 12
locking × 11
sql-server-2008 × 10