sp_traceon turns on trace flags for the current connection.
server_name... sp_traceon traceflags
DCSERVER...sp_traceon 2,3,4,5
Use with trace flags.