What T-SQL command should she use to open this log file if we assume it is stored in the default location?

You work as a database administrator at ABC.com. ABC.com is using a SQL Server 2008
instance. Your junior assistant is interested in the default trace log. What T-SQL command should
she use to open this log file if we assume it is stored in the default location?

You work as a database administrator at ABC.com. ABC.com is using a SQL Server 2008
instance. Your junior assistant is interested in the default trace log. What T-SQL command should
she use to open this log file if we assume it is stored in the default location?

A.
SELECT *
FROM fn_trace_gettable
(‘C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\TRACE
LOG\log.trc’,
default)
GO

B.
SELECT *
FROM fn_trace_gettable
(‘C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\log.trc’,
default)
GO

C.
SELECT *
FROM fn_trace_gettable
(‘C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\LOG\log.trc’,
default)
GO

D.
SELECT *
FROM fn_trace_gettable
(‘C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\TRANSACTION
LOG\log.trc’,
default)
GO

E.
SELECT *
FROM fn_trace_gettable
(‘C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\TRACE\log.trc’,
default)
GO

F.
SELECT *
FROM fn_trace_gettable
(‘C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\BACKUP\log.trc’,
default)
GO

Explanation:

The correct subdirectory is named LOG.
The following statement opens the default trace log in the default location:
SELECT *
FROM fn_trace_gettable
(‘C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\LOG\log.trc’,
default)
GO



Leave a Reply 0

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