umm... here are other two methods
-- get it from default trace
DECLARE @trc_path VARCHAR(500)
SELECT @trc_path=CONVERT(VARCHAR(500),value) FROM fn_trace_getinfo(DEFAULT)
WHERE property=2
print @trc_path
SELECT TEXTData,HostName,ApplicationName,DatabaseName,LoginName,SPID,StartTime,EventSequence
FROM fn_trace_gettable(@trc_path,1) fn
WHERE TEXTData LIKE '%Configuration option%'
-- get it from errorlog
declare @sysconfigchanges TABLE
(
RowID int IDENTITY PRIMARY KEY,
EntryTime datetime,
source varchar(50),
LogEntry varchar(4000)
)
insert into @sysconfigchanges
exec sp_readerrorlog 0,1,'Configuration option'
select * from @sysconfigchanges where rowid=(select max(rowid) from @sysconfigchanges)
Yeah, they, default trace and error log code, are both relatively good-looking:-) But, personally speaking, I prefer sys.configurations because
1. some instances probably disabled default trace
2. It might be relatively expensive to search them in error log, and may need to search multiple error logs.
GASQL.com - Focus on Database and Cloud