"Black Box" in SQL Server 2008

Leave a comment (0) Go to comments

In SQL Server 2008, the Default trace is enabled by default during the installation and this default trace in SQL Server 2008 acts as a Black box for the SQL Server. Hence it is also called as "Black Box" in SQL Server 2008 and  the default trace cannot be stopped by using the Query "Exec sp_trace_setstatus 'Trace_id',0 –0 stops the trace " . This has to be stopped using the sp_configure advance options.


To Use this trace for report, Just right Click on the database and choose the option "Reports" and Select "Standard Reports" and choose "Schema Changes History".

"Black Box" in SQL Server 2008 SQL Server default trace

To understand this better, lets take an example where , I will execute the below query on AdventureWorks Database. I have also included the Statements "Waitfor Delay" to know the Time Difference.

Use AdventureWorks

Go

Create Table Tbl_TestSchemaChangesHistoryReport

( Id int,

Name Varchar(50)

)

 

Waitfor Delay '00:01:00' – to know the time difference

Alter table Tbl_TestSchemaChangesHistoryReport Add Address_Column varchar(100)

 

Waitfor Delay '00:01:00' – to know the time difference

 

Drop table Tbl_TestSchemaChangesHistoryReport

And here is the results, which clearly notifies the changes made to structure.

"Black Box" in SQL Server 2008 SQL Server default trace

EOF - "Black Box" in SQL Server 2008, SQL Server 2012 , 2008 R2 , 2008 , 2005 , 2000

Leave a Reply

Your email address will not be published. Required fields are marked *


*


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Notify me of followup comments via e-mail. You can also subscribe without commenting.