Get notified for any new Azure SQL db creation in subscription

  • RPSQL

    Hall of Fame

    Points: 3228

    Hi All,

    Is there a way to get notified if someone creates a new Azure SQL db in a particular subscription?

    Thanks.

  • Grant Fritchey

    SSC Guru

    Points: 396551

    I have not implemented this, but I believe what you're looking for is covered in the Activity Logs. If you were only monitoring a given "server" within Azure, you could use Extended Events to capture database events like, CREATE, DROP, etc. But that would have to be set up on each server AND no new servers could be created or it just wouldn't be there. That's why I lean more towards going outside of SQL Server for the answers here.

    ----------------------------------------------------
    The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
    Theodore Roosevelt

    The Scary DBA
    Author of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd Edition
    Product Evangelist for Red Gate Software

  • RPSQL

    Hall of Fame

    Points: 3228

    Thanks Grant. I am actually looking for getting notified for "any" new database get created in our subscription. For now as a workaround, we have restricted permission for only authorized people to create Azure SQL database in subscription. But it will be nice to have a way to know if someone create a database in subscription.

  • Grant Fritchey

    SSC Guru

    Points: 396551

    I'd look into the Activity Logs then. That's going to be the best bet from what I can see.

    ----------------------------------------------------
    The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
    Theodore Roosevelt

    The Scary DBA
    Author of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd Edition
    Product Evangelist for Red Gate Software

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply