tags:

views:

30

answers:

1

B"H

I need to alter a table and the Sql Azure just spins its wheels.

I think its because there is a connection somewhere that is accessing that table.

How can I see who is accessing my tables and how can I terminate their connections.

I am looking for something similar to

ALTER DATABASE xxx SET SINGLE_USER WITH ROLLBACK IMMEDIATE
GO

that will work with sql azure

thanks

A: 

You can use sys.dm_exec_connections to view information about connections to a SQL Azure DB. Example here under Monitoring Connections. You could block the errant connections at the SQL Firewall level or deny them access to the table you care about with the security stored procedures.

JP Alioto