How to get schema changes on sql azure database using tsql?

  • vsamantha35

    SSChampion

    Points: 10934

    Hi All,

    Need some help on SQL Azure db.

    Environment:
    select @@version
    Microsoft SQL Azure (RTM) - 12.0.2000.8 Nov 17 2017 14:42:09 Copyright (C) 2017 Microsoft Corporation

    How can I get Schema changes report on sql azure db? In ssms, when I right click the db->I dont see that report which tells me schema change history.If it is onPrem sql db, I used to right click -> reports - >standard reports -> Schema changes history and get all the changes done to the database.

    Basically, I want to get a similar report if not SSMS GUI, can we get the same report using plain TSQL for azure db? Basically I wanted to check for schema changes between 2 dates which could have affected the database performance.

    Thanks,

    Sam

  • Grant Fritchey

    SSC Guru

    Points: 395316

    That's not available in Azure SQL Database because you're not dealing with a server, which uses default trace to generate the report. Instead you're dealing with a database as a platform. It's just not the same as having a SQL Server instance. You can add tracking for that using Extended Events, however, it's on you to set it up, maintain it, create reports off of it. You'd be better using some kind of source control system to maintain & deploy schema changes to the database.

    ----------------------------------------------------
    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

  • vsamantha35

    SSChampion

    Points: 10934

    Okay. Thanks Grant.

  • Andrew Stanton

    Ten Centuries

    Points: 1115

    Except that it isnt really useful when trying to find the rogue who applied a schema change without recording it in version control. That schema report was/is great for that.

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

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