Finding Schema changes using SQL Server Reports

1 minute read time.

There is a tool(report) that comes with SQL Server that can help identify changes made to objects in a given database. I will show how you can run a report that shows if someone made changes to objects in a database. You will need access to SQL Server Management studio and use a login that has rights to the Sage X3 database(s) on the SQL Server where you are going to report. 

The SQL Report is one of several standard reporting tools that come with SQL Server Management Studio(SSMS)  The Schema Changes History report reads SQL Server's default trace file to produce the data displayed by the report. The Schema Changes report captures DDL(Data Definition Language) statements. DDL refers to using statements like CREATE, DROP, or ALTER. against objects in the database. If the default trace is not running, you will encounter an error when attempting to run the report and it will not work. 

To view the Schema Changes report, log SQL Server Management Studio and select the database being reported.Right click on the Sage 500 application database. Select Reports, Standard Reports, Schema Changes History.

The report will open a new query window and after it gathers the necessary data, returns a screen with list of the schema changes in order by object name. Below is an example:

You can click on the + signs next to the object names listed to get a more detail about what DDL operation was recorded and the date/time it occurred.  The output is ordered by Object Name order. 

If you encounter an error message when running the Schema Changes History report, you may want to confirm your SQL Server's default  trace has been enabled.  You can try executing the below query:

sp_configure 'default trace enabled'

Look at the value in the run_value column.  If the run_value is 1 that means the default trace is enabled, if its 0 it is not enabled.  Consult Microsoft Books Online for more details about this feature. 

I hope you find this Schema Changes History report helpful as a way to track down changes that occur in your environment.

-Tony