I was trying to figure out why my startup trace flags don’t work. While it is mentioned in this Microsoft TechNet article about using semi-colons to separate one startup parameter from another, nothing was mentioned about the leading blank space in between defining the parameters. SQL Server MVP Erland Sommarskog recommended removing the leading blank spaces in between the trace flags and parameters like the one in the example below
-dC:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDATAmaster.mdf;-eC:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLLOGERRORLOG;-lC:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDATAmastlog.ldf;-T1204;-T1222;-T845;-T1262;-T2330
The best way to check if your trace flags are actually enabled during startup is to run the DBCC TRACESTATUS command or, as Erland suggested, looking at your SQL Server error log and note whether the trace flags are aligned with the other SQL Server parameters like the one below. Notice how aligned the startup parameters are (you can see that the – symbol are all aligned). A mere leading blank space would definitely cause them not to work.
2009-11-05 10:49:36.010 Server Registry startup parameters:
2009-11-05 10:49:36.010 Server -dC:Program FilesMicrosoft SQL ServerMSSQLDATAmaster.mdf
2009-11-05 10:49:36.010 Server -eC:Program FilesMicrosoft SQL ServerMSSQLLOGERRORLOG
2009-11-05 10:49:36.010 Server -lC:Program FilesMicrosoft SQL ServerMSSQLDATAmastlog.ldf
2009-11-05 10:49:36.010 Server -T1204
2009-11-05 10:49:36.010 Server -T1222
2009-11-05 10:49:36.010 Server -T845
2009-11-05 10:49:36.010 Server -T1262
2009-11-05 10:49:36.010 Server -T2330
Please note: I reserve the right to delete comments that are offensive or off-topic.