<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sybase数据库技术，数据库恢复专家 &#187; trace flag</title>
	<atom:link href="http://www.dbainfo.net/tag/trace-flag/feed" rel="self" type="application/rss+xml" />
	<link>https://www.dbainfo.net</link>
	<description>提供Sybase ASE及Sybase SQL Anywhere数据库修复服务，电话：13811580958(微信)，QQ：289965371！We have many years of experience in recovering data from damanged Sybase devices. Contact us by Phone: +86 13811580958 Wechat: 13811580958 Email: 289965371@qq.com</description>
	<lastBuildDate>Sat, 14 Jun 2025 16:28:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>SQL Server TRACE FLAGS</title>
		<link>https://www.dbainfo.net/sql-server-trace-flags.htm</link>
		<comments>https://www.dbainfo.net/sql-server-trace-flags.htm#comments</comments>
		<pubDate>Thu, 05 Aug 2010 06:16:21 +0000</pubDate>
		<dc:creator>dbainfo</dc:creator>
				<category><![CDATA[Sybase ASE]]></category>
		<category><![CDATA[trace flag]]></category>

		<guid isPermaLink="false">http://www.dbainfo.net/?p=860</guid>
		<description><![CDATA[转自：http://blog.csdn.net/obuntu/archive/2010/06/08/5655494.aspx 谢谢obuntu flag Trace Flag Description (underlined are sp_configure&#8217;able) -1 Sets trace flags for all connections. Used only with DBCC TRACEON and TRACEOFF. The setting of the Trace flag -1 is not visible with DBCC TRACESTATUS command, but work without problems. 105 SQL Server 6.5 you can use maximum 16 tables or subqueries in a [...]]]></description>
			<content:encoded><![CDATA[<p>转自：<a href="http://blog.csdn.net/obuntu/archive/2010/06/08/5655494.aspx" target="_blank">http://blog.csdn.net/obuntu/archive/2010/06/08/5655494.aspx</a></p>
<p>谢谢obuntu</p>
<table border="1" cellpadding="0" style="width: 99%;">
<tbody>
<tr>
<td valign="bottom"><strong>flag</strong></td>
<td valign="bottom"><strong>Trace Flag Description</strong> (underlined are sp_configure&rsquo;able)</td>
</tr>
<tr>
<td valign="top"><strong>-1</strong></td>
<td valign="top">Sets trace flags for all connections. Used only with DBCC TRACEON and TRACEOFF. The setting of the Trace flag -1 is not visible with DBCC TRACESTATUS command, but work without problems.</td>
</tr>
<tr>
<td>105</td>
<td>SQL Server 6.5 you can use maximum 16 tables or subqueries in a single select statement. There is no documented way, to avoid this restriction, but you can use undocumented trace flag 105 for this purpose.</td>
</tr>
<tr>
<td>106</td>
<td>Disables line number information for syntax errors.</td>
</tr>
<tr>
<td>107</td>
<td>Interprets numbers with a decimal point as float instead of decimal.</td>
</tr>
<tr>
<td>110</td>
<td>Turns off ANSI select characteristics.</td>
</tr>
<tr>
<td>204</td>
<td>A backward compatibility switch that enables non-ansi standard behavior. E.g. previously SQL server ignored trailing blanks in the like statement and allowed queries that contained aggregated functions to have items in the group by clause that were not in the select list.</td>
</tr>
<tr>
<td>205</td>
<td>Report when a statistics-dependent stored procedure is being recompiled as a result of AutoStat.</td>
</tr>
<tr>
<td>206</td>
<td>Provides backward compatibility for the setuser statement.</td>
</tr>
<tr>
<td>208</td>
<td>SET QUOTED IDENTIFIER ON.</td>
</tr>
<tr>
<td>237</td>
<td>Tells SQL Server to use correlated sub-queries in Non-ANSI standard backward compatibility mode.</td>
</tr>
<tr>
<td>242</td>
<td>Provides backward compatibility for correlated subqueries where non-ANSI-standard results are desired.</td>
</tr>
<tr>
<td>243</td>
<td>The behavior of SQL Server is now more consistent because null ability checks are made at run time and a null ability violation results in the command terminating and the batch or transaction process continuing.</td>
</tr>
<tr>
<td>244</td>
<td>Disables checking for allowed interim constraint violations. By default, SQL Server checks for and allows interim constraint violations. An interim constraint violation is caused by a change that removes the violation such that the constraint is met, all within a single statement and transaction. SQL Server checks for interim constraint violations for self-referencing DELETE statements, INSERT, and multi-row UPDATE statements. This checking requires more work tables. With this trace flag you can disallow interim constraint violations, thus requiring fewer work tables.</td>
</tr>
<tr>
<td>246</td>
<td>Derived or NULL columns must be explicitly named in a select&hellip;.INTO or create view statement when not done they raise an error. This flag avoids that.</td>
</tr>
<tr>
<td>253</td>
<td>Prevents ad-hoc query plans to stay in cache.</td>
</tr>
<tr>
<td>257</td>
<td>Will invoke a print algorithm on the XML output before returning it to make the XML result more readable.<span id="more-860"></span></td>
</tr>
<tr>
<td valign="top"><strong>260</strong></td>
<td valign="top">Prints versioning information about extended stored procedure dynamic-link libraries (DLLs). For more information about <strong>__GetXpVersion()</strong> , see <a href="http://msdn.microsoft.com/en-us/library/ms164627.aspx">Creating Extended Stored Procedures</a> . <strong>Scope:</strong> global or session</td>
</tr>
<tr>
<td>262</td>
<td>SQL 7 - Trailing spaces are no longer truncated from literal strings in CASE statements. Used after hotfix <a href="http://support.microsoft.com/kb/891116">891116</a></td>
</tr>
<tr>
<td>302</td>
<td>Should be used with flag 310 to show the actual join ordering. Prints information about whether the statistics page is used, the actual selectivity (if available), and what SQL Server estimated the physical and logical I/O would be for the indexes.</td>
</tr>
<tr>
<td>310</td>
<td>Prints information about join order. Index selection information is also available in a more readable format using SET SHOWPLAN_ALL, as described in the SET statement.</td>
</tr>
<tr>
<td>320</td>
<td>Disables join-order heuristics used in ANSI joins. To see join-order heuristics use flag 310. SQL Server uses join-order heuristics to reduce the no&rsquo; of permutations when using the best join order.</td>
</tr>
<tr>
<td>323</td>
<td>Reports on the use of update statements using UPDATE in place. Shows a detailed description of the various update methods used by SQL Server 6.5.</td>
</tr>
<tr>
<td>325</td>
<td>Prints information about the cost of using a non-clustered index or a sort to process an ORDER BY clause.</td>
</tr>
<tr>
<td>326</td>
<td>Prints information about the estimated &amp; actual costs of sorts. Instructs the server to use arithmetic averaging when calculating density instead of a geometric weighted average when updating statistics.&nbsp; Useful for building better stats when an index has skew on the leading column.&nbsp; Use only for updating the stats of a table/index with known skewed data.</td>
</tr>
<tr>
<td>330</td>
<td>Enables full output when using the SET SHOWPLAN_ALL option, which gives detailed information about joins.</td>
</tr>
<tr>
<td>342</td>
<td>Disables the costing of pseudo-merge joins, thus significantly reducing time spent on the parse for certain types of large, multi-table joins. One can also use SET FORCEPLAN ON to disable the costing of pseudo-merge joins because the query is forced to use the order specified in the FROM clause.</td>
</tr>
<tr>
<td>345</td>
<td>Increase the accuracy of choice of optimum order when you join 6 or more tables.</td>
</tr>
<tr>
<td>506</td>
<td>Enforces SQL-92 standards regarding null values for comparisons between variables and parameters. Any comparison of variables and parameters that contain a NULL always results in a NULL.</td>
</tr>
<tr>
<td>610</td>
<td>
<p>SQL 10 &ndash; Enable the potential for minimal-logging when:</p>
<p>&middot;&nbsp;&nbsp;&nbsp;Bulk loading into an empty clustered index, with no nonclustered indexes</p>
<p>&middot;&nbsp;&nbsp;&nbsp;Bulk loading into a non-empty heap, with no nonclustered indexes</p>
</td>
</tr>
<tr>
<td>611</td>
<td>After SQL 9 when turned on, each lock escalation is recorded in the SQL Server error log along with the SQL Server handle number.</td>
</tr>
<tr>
<td>652</td>
<td>Disables read ahead for the server.</td>
</tr>
<tr>
<td>653</td>
<td>Disables read ahead for the current connection.</td>
</tr>
<tr>
<td>661</td>
<td>Disables the ghost record removal process. A ghost record is the result of a delete operation. When you delete a record, the deleted record is kept as a ghost record. Later, the deleted record is purged by the ghost record removal process. When you disable this process, the deleted record is not purged. Therefore, the space that the deleted record consumes is not freed. This behavior affects space consumption and the performance of scan operations. <strong>SCOPE</strong> : Global. If you turn off this trace flag, the ghost record removal process works correctly.</td>
</tr>
<tr>
<td>806</td>
<td>Cause &#39;DBCC-style&#39; page auditing to be performed whenever a database page is read into the buffer pool. This is useful to catch cases where pages are being corrupted in memory and then written out to disk with a new page checksum. When they&#39;re read back in the checksum will look correct, but the page is corrupt (because of the previous memory corruption). This page auditing goes someway to catching this - especially on non-Enterprise Edition systems that don&#39;t have the &#39;checksum sniffer&#39;.</td>
</tr>
<tr>
<td>809</td>
<td>SQL 8 &ndash; Limits the amount of Lazy Write activity.</td>
</tr>
<tr>
<td>815</td>
<td>Enables latch enforcement. SQL Server 8 (with service pack 4) and SQL Server 9 can perform latch enforcement for data pages found in the buffer pool cache. Latch enforcement changes the virtual memory protection state while database page status changes from &quot;clean&quot; to &quot;dirty&quot; (&quot;dirty&quot; means modified through INSERT, UPDATE or DELETE operation). If an attempt is made to modify a data page while latch enforcement is set, it causes an exception and creates a mini-dump in SQL Server installation&#39;s LOG directory. Microsoft support can examine the contents of such mini-dump to determine the cause of the exception. In order to modify the data page the connection must first acquire a modification latch. Once the data modification latch is acquired the page protection is changed to read-write. Once the modification latch is released the page protection changes back to read-only.</td>
</tr>
<tr>
<td>818</td>
<td>SQL 8 enables in memory ring buffer used to track last 2048 successful write operations.</td>
</tr>
<tr>
<td>830</td>
<td>SQL 9 &ndash; disable the reporting of CPU Drift errors in the SQL Server errorlog like SQL Server has encountered 2 occurrence(s) of I/O requests taking longer than 15 seconds to complete</td>
</tr>
<tr>
<td>834</td>
<td>Causes SQL Server to use Windows large-page allocations for the memory that is allocated for the buffer pool. The page size varies depending on the hardware platform, but the page size may be from 2 MB to 16 MB. Large pages are allocated at startup and are kept throughout the lifetime of the process. Trace flag 834 improves performance by increasing the efficiency of the translation look-aside buffer (TLB) in the CPU.<br />
				Flag 834 applies only to 64-bit versions of SQL Server. You must have the Lock pages in memory user right to turn on trace flag 834. You can turn on trace flag 834 only at startup.<br />
				Trace flag 834 may prevent the server from starting if memory is fragmented and if large pages cannot be allocated. Therefore, trace flag 834 is best suited for servers that are dedicated to SQL Server.<br />
				For more information about large-page support, <a href="http://msdn2.microsoft.com/en-us/library/aa366720.aspx"> http://msdn2.microsoft.com/en-us/library/aa366720.aspx</a> (http://msdn2.microsoft.com/en-us/library/aa366720.aspx)</td>
</tr>
<tr>
<td>835</td>
<td>SQL 9 &amp; 10. For 64 bit SQL Server. This turns off Lock pages in memory.</td>
</tr>
<tr>
<td>836</td>
<td>Causes SQL Server to size the buffer pool at startup based on the value of the <strong>max server memory</strong> option instead of based on the total physical memory. You can use trace flag 836 to reduce the number of buffer descriptors that are allocated at startup in 32-bit Address Windowing Extensions (AWE) mode.<br />
				Trace flag 836 applies only to 32-bit versions of SQL Server that have the AWE allocation enabled. You can turn on trace flag 836 only at startup.</td>
</tr>
<tr>
<td>845</td>
<td>SQL 9 &amp; 10. For 64 bit SQL Server. This turns on Lock pages in memory.</td>
</tr>
<tr>
<td>1117</td>
<td>Grows all data files at once, else it goes in turns.</td>
</tr>
<tr>
<td valign="top"><strong>1118</strong></td>
<td valign="top">Switches allocations in tempDB from 1pg at a time (for first 8 pages) to one extent. There is now a cache of temp tables. When a new temp table is created on a cold system it uses the same mechanism as for SQL 8. When it is dropped though, instead of all the pages being deallocated completely, one IAM page &amp; one data page are left allocated, then the temp table is put into a special cache. Subsequent temp table creations will look in the cache to see if they can just grab a pre-created temp table. If so, this avoids accessing the allocation bitmaps completely. The temp table cache isn&#39;t huge (32 tables), but this can still lead to a big drop in latch contention in tempdb. <a href="http://www.sqlskills.com/BLOGS/PAUL/post/Misconceptions-around-TF-1118.aspx">http://www.sqlskills.com/BLOGS/PAUL/post/Misconceptions-around-TF-1118.aspx</a></td>
</tr>
<tr>
<td>1180</td>
<td rowspan="2">Forces allocation to use free pages for text or image data and maintain efficiency of storage. 1197 applies only in the case of SQL 7 &ndash; SP3. Helpful in case when DBCC SHRINKFILE and SHRINKDATABASE commands may not work because of sparsely populated text, ntext, or image columns</td>
</tr>
<tr>
<td>1197</td>
</tr>
<tr>
<td>1200</td>
<td>Prints lock information (the process ID and type of lock requested).</td>
</tr>
<tr>
<td>1202</td>
<td>Insert blocked lock requests into syslocks.</td>
</tr>
<tr>
<td valign="top"><strong>1204</strong></td>
<td valign="top">Returns resources and types of locks participating in a deadlock and command affected. <strong>Scope:</strong> global only</td>
</tr>
<tr>
<td valign="top"><strong>1205</strong></td>
<td valign="top">More detailed information about the command being executed at the time of a deadlock. This trace flag was documented in SQL Server 7.0 Books Online, but was not documented in SQL Server 8.</td>
</tr>
<tr>
<td>1206</td>
<td>Used to complement flag 1204 by displaying other locks held by deadlock parties</td>
</tr>
<tr>
<td valign="top"><strong>1211</strong></td>
<td valign="top">
<p>Disables lock escalation based on memory pressure, or based on number of locks. The SQL Server Database Engine will not escalate row or page locks to table locks.</p>
<p>Using this trace flag can generate excessive numbers of locks. This can slow the performance of the Database Engine, or cause 1204 errors (unable to allocate lock resource) because of insufficient memory. For more information, see <a href="http://msdn.microsoft.com/en-us/library/ms184286.aspx">Lock Escalation (Database Engine)</a> .</p>
<p>If both trace flag 1211 and 1224 are set, 1211 takes precedence over 1224. However, because trace flag 1211 prevents escalation in every case, even under memory pressure, we recommend that you use 1224. This helps avoid &quot;out-of-locks&quot; errors when many locks are being used. <strong>Scope</strong> : global or session</p>
</td>
</tr>
<tr>
<td valign="top"><strong>1216</strong></td>
<td valign="top">
<p>SQL 7 - Disables Health reporting. Lock monitor when detects a (worker thread) resource level blocking scenario. If a SPID that owns a lock is currently queued to the scheduler, because all the assigned worker threads have been created and all the assigned worker threads are in an un-resolvable wait state, the following error message is written to the SQL Server error log:</p>
<p>Error 1223: Process ID %d:%d cannot acquire lock &quot;%s&quot; on resource %s because a potential deadlock exists on Scheduler %d for the resource. Process ID %d:% d holds a lock &quot;%h&quot; on this resource.</p>
</td>
</tr>
<tr>
<td valign="top"><strong>1222</strong></td>
<td valign="top">Returns the resources and types of locks that are participating in a deadlock and also the current command affected, in an XML format that does not comply with any XSD schema. <strong>Scope</strong> : global only</td>
</tr>
<tr>
<td valign="top"><strong>1224</strong></td>
<td valign="top">
<p>Disables lock escalation based on the number of locks. However, memory pressure can still activate lock escalation. The Database Engine escalates row or page locks to table (or partition) locks if the amount of memory used by lock objects exceeds one of the following conditions:</p>
<p>&middot;&nbsp;&nbsp;&nbsp;40% of the memory that is used by Db Engine, exclusive of memory allocation using Address Windowing Extension (AWE). This is applicable when the <strong>locks</strong> parameter of <strong>sp_configure</strong> is set to 0.</p>
<p>&middot;&nbsp;&nbsp;&nbsp;Forty percent of the lock memory that is configured by using the <strong>locks</strong> parameter of <strong>sp_configure</strong> .</p>
<p>If both trace flag 1211 and 1224 are set, 1211 takes precedence over 1224. However, because trace flag 1211 prevents escalation in every case, even under memory pressure, we recommend that you use 1224. This helps avoid &quot;out-of-locks&quot; errors when many locks are being used.</p>
<p><strong>Note:</strong> Lock escalation to the table- or HoBT-level granularity can also be controlled by using the LOCK_ESCALATION option of the <a href="http://msdn.microsoft.com/en-us/library/ms190273.aspx">ALTER TABLE</a> statement.&nbsp; <strong>Scope:</strong> global or session</p>
</td>
</tr>
<tr>
<td valign="top"><strong>1261</strong></td>
<td valign="top">
<p>SQL 8 - Disables Health reporting. Lock monitor when detects a (worker thread) resource level blocking scenario. If a SPID that owns a lock is currently queued to the scheduler, because all the assigned worker threads have been created and all the assigned worker threads are in an un-resolvable wait state, the following error message is written to the SQL Server error log:</p>
<p>Error 1229: Process ID %d:%d owns resources that are blocking processes on scheduler %d.</p>
</td>
</tr>
<tr>
<td valign="top"><strong>1400</strong></td>
<td valign="top">Enables the creation of the database mirroring endpoint, which is required for setting up and using database mirroring. This trace flag is allowed only when using the &ndash;T.</td>
</tr>
<tr>
<td valign="top"><strong>1462</strong></td>
<td valign="top">Turns off log stream compression and effectively reverts the behavior back to ver 9.</td>
</tr>
<tr>
<td>1603</td>
<td>Use standard disk I/O (i.e. turn off asynchronous I/O).</td>
</tr>
<tr>
<td>1609</td>
<td>Turns on the unpacking and checking of remote procedure call (RPC) information in Open Data Services. Used only when applications depend on the old behavior.</td>
</tr>
<tr>
<td>1610</td>
<td>Boot the SQL dataserver with TCP_NODELAY enabled.</td>
</tr>
<tr>
<td>1611</td>
<td>If possible, pin shared memory -- check errorlog for success/failure.</td>
</tr>
<tr>
<td>1704</td>
<td>Prints information when a temporary table is created or dropped.</td>
</tr>
<tr>
<td valign="top"><strong>1717</strong></td>
<td valign="top">Causes new objects being created to be system objects.</td>
</tr>
<tr>
<td valign="top"><strong>1806</strong></td>
<td valign="top">Disables instant file initialization.</td>
</tr>
<tr>
<td valign="top"><strong>1807</strong></td>
<td valign="top">Allows creating a database file on a mapped or UNC network location. unsupported under SQL Server 7 &amp; 8.</td>
</tr>
<tr>
<td>2301</td>
<td>Enables advanced optimizations that are specific to decision support queries. This option applies to decision support processing of large data sets.</td>
</tr>
<tr>
<td>2330</td>
<td>Stops the collection of statistics for sys.db_index_usage_stats.</td>
</tr>
<tr>
<td>2382</td>
<td>Statistics collected for system tables.</td>
</tr>
<tr>
<td>2389</td>
<td>SQL 9 &ndash; Tracks the nature of columns by subsequent statistics updates. When SQL Server determines that the statistics increase three times, the column is branded ascending. The statistics will be updated automatically at query compile.</td>
</tr>
<tr>
<td>2390</td>
<td>Does the same like 2389 even if ascending nature of the column is not known and -- never enable without 2389.</td>
</tr>
<tr>
<td>2440</td>
<td>Parallel query execution strategy on partitioned tables. SQL 9 &ndash; uses a single thread per partition parallel query execution strategy. In ver. 10, multiple threads can be allocated to a single partition, thus improving the query&rsquo;s response time.</td>
</tr>
<tr>
<td>2505</td>
<td>Prevents DBCC TRACEON 208, SPID 10 errors from appearing in the error log.</td>
</tr>
<tr>
<td>2508</td>
<td>Disables parallel non-clustered index checking for DBCC CHECKTABLE.</td>
</tr>
<tr>
<td>2509</td>
<td>Used with DBCC CHECKTABLE.html to see the total count of ghost records in a table</td>
</tr>
<tr>
<td>2520</td>
<td>Force DBCC HELP to return syntax of undocumented DBCC statements. If 2520 is not turned on, DBCC HELP will refuse to give you the syntax stating: &quot;No help available for DBCC statement &#39;undocumented statement&#39;&quot;.</td>
</tr>
<tr>
<td valign="top"><strong>2528</strong></td>
<td valign="top">
<p>Disables parallel checking of objects by DBCC CHECKDB, CHECKFILEGROUP and CHECKTABLE. By default, the degree of parallelism is automatically determined by the query processor. The maximum degree of parallelism is configured just like that of parallel queries. For more information, see <a href="http://msdn.microsoft.com/en-us/library/ms181007.aspx">max degree of parallelism Option</a> .</p>
<p>Parallel DBCC should typically be left enabled. For DBCC CHECKDB, the query processor reevaluates and automatically adjusts parallelism with each table or batch of tables checked. Sometimes, checking may start when the server is almost idle. An administrator who knows that the load will increase before checking is complete may want to manually decrease or disable parallelism.</p>
<p>Disabling parallel checking of DBCC can cause it to take much longer to complete and if DBCC is run with the TABLOCK feature enabled and parallelism set off, tables may be locked for longer periods of time.</p>
<p><strong>Scope</strong> : global or session</p>
</td>
</tr>
<tr>
<td>2537</td>
<td>SQL 9 &amp; 10. Allows function ::fn_dblog to look inside all logs (not just the active log).</td>
</tr>
<tr>
<td>2542</td>
<td>SQL 8 &ndash; Used with Sqldumper.exe to get certain dumps. In range 254x &ndash; 255x.</td>
</tr>
<tr>
<td>2551</td>
<td>Adds additional information to the dump file.</td>
</tr>
<tr>
<td>2701</td>
<td>Sets the @@ERROR system function to 50000 for RAISERROR messages with severity levels of 10 or less. When disabled, sets the @@ERROR system function to 0 for RAISERROR messages with severity levels of 10 or less.</td>
</tr>
<tr>
<td>2861</td>
<td>Cache query plans for queries that have a cost of zero or near to zero.</td>
</tr>
<tr>
<td>3001</td>
<td>Stops sending backup entries into MSDB.</td>
</tr>
<tr>
<td>3004</td>
<td>Gives out more detailed information about restore &amp; backup activities.</td>
</tr>
<tr>
<td>3031</td>
<td>SQL 9 - will turn the NO_LOG and TRUNCATE_ONLY options into checkpoints in all recovery modes.</td>
</tr>
<tr>
<td>3104</td>
<td>Causes SQL Server to bypass checking for free space.</td>
</tr>
<tr>
<td>3111</td>
<td>Cause LogMgr::ValidateBackedupBlock to be skipped during backup and restore operations.</td>
</tr>
<tr>
<td valign="top"><strong>3205</strong></td>
<td valign="top">If a tape drive supports hardware compression, either the DUMP or BACKUP statement uses it. With this trace flag, you can disable hardware compression for tape drivers. This is useful when you want to exchange tapes with other sites or tape drives that do not support compression. <strong>Scope</strong> : global or session</td>
</tr>
<tr>
<td valign="top"><strong>3213</strong></td>
<td valign="top">Trace SQL Server activity during backup process so that we will come to know which part of backup process is taking more time.</td>
</tr>
<tr>
<td>3222</td>
<td>Disables the read ahead that is used by the <a href="http://www.sql-server-performance.com/rd_traceflags.asp">recovery</a> operation during roll forward operations.</td>
</tr>
<tr>
<td valign="top"><strong>3226</strong></td>
<td valign="top">With this trace flag, you can suppress BACKUP COMPLETED log entries going to WIN and SQL logs.</td>
</tr>
<tr>
<td>3231</td>
<td>SQL 8 &amp; 9 - will turn the NO_LOG and TRUNCATE_ONLY options into no-ops in FULL/BULK_LOGGED recovery mode, and will clear the log in SIMPLE recovery mode.</td>
</tr>
<tr>
<td>3282</td>
<td>SQL 6.5 &ndash; Used after backup restoration fails refer to microsoft for article Q215458.</td>
</tr>
<tr>
<td>3422</td>
<td>Cause auditing of transaction log records as they&#39;re read (during transaction rollback or log recovery). This is useful because there is no equivalent to page checksums for transaction log records and so no way to detect whether log records are being corrupted e careful with these trace flags - I don&#39;t recommend using them unless you are experiencing corruptions that you can&#39;t diagnose. Turning them on will cause a big CPU hit because of the extra auditing that&#39;s happening.</td>
</tr>
<tr>
<td>3502</td>
<td>Tracks CHECKPOINT - Prints a message to the log at the start and end of each checkpoint.</td>
</tr>
<tr>
<td>3503</td>
<td>Indicates whether the checkpoint at the end of automatic recovery was skipped for a database (this applies only to read-only <a href="http://www.sql-server-performance.com/rd_traceflags.asp">databases</a> ).</td>
</tr>
<tr>
<td>3504</td>
<td>For internal testing. Will raise a bogus log-out-of-space condition from checkpoint()</td>
</tr>
<tr>
<td>3505</td>
<td>Disables automatic checkpoints. May increase recovery time and can prevent log space reuse until the next checkpoint is issued. Make sure to issue manual checkpoints on all read/write databases at appropriate time intervals.<br />
				<strong>Note</strong> does not prevent the internal checkpoints that are issued by certain commands, such as <strong>BACKUP</strong> .</td>
</tr>
<tr>
<td>3601</td>
<td>Stack trace when error raised. Also see 3603</td>
</tr>
<tr>
<td>3602</td>
<td>Records all error and warning messages sent to the client.</td>
</tr>
<tr>
<td valign="top"><strong>3603</strong></td>
<td valign="top">SQL Server fails to install on tricore, Bypass SMT check is enabled, flags are added via registry. Also see 3601.</td>
</tr>
<tr>
<td valign="top"><strong>3604</strong></td>
<td valign="top">Sends trace output to the client. This trace flag is used only when setting trace flags with DBCC TRACEON and DBCC TRACEOFF.</td>
</tr>
<tr>
<td valign="top"><strong>3605</strong></td>
<td valign="top">Sends trace output to the error log.&nbsp; (if SQL Server is started from CMD output also appears on the screen)</td>
</tr>
<tr>
<td valign="top"><strong>3607</strong></td>
<td valign="top">Trace flag 3607 skips the recovery of databases on the startup of SQL Server and clears the TempDB. Setting this flag lets you get past certain crashes, but there is a chance that some data will be lost</td>
</tr>
<tr>
<td valign="top"><strong>3608</strong></td>
<td valign="top">Prevents SQL Server from automatically starting and recovering any database except the <strong>master</strong> database. Databases will be started and recovered when accessed. Some features, such as snapshot isolation and read committed snapshot, might not work.</td>
</tr>
<tr>
<td>3609</td>
<td>Skips the creation of the <strong>tempdb</strong> database at startup. Use this trace flag if the device or devices on which <strong>tempdb</strong> resides are problematic or problems exist in the <strong>model</strong> database.</td>
</tr>
<tr>
<td>3610</td>
<td>SQL 9. Divide by zero to result in NULL instead of error.</td>
</tr>
<tr>
<td valign="top"><strong>3625</strong></td>
<td valign="top">Limits the amount of information returned in error messages. For more information, see <a href="http://msdn.microsoft.com/en-us/library/ms187113.aspx">Metadata Visibility Configuration</a> . <strong>Scope</strong> : global only</td>
</tr>
<tr>
<td>3626</td>
<td>Turns on tracking of the CPU data for the sysprocesses table.</td>
</tr>
<tr>
<td>3640</td>
<td>Eliminates the sending of DONE_IN_PROC messages to the client for each statement in a stored procedure. This is similar to the session setting of SET NOCOUNT ON, but when set as a trace flag, every client session is handled this way.</td>
</tr>
<tr>
<td>3689</td>
<td>Logs extended errors to errorlog when network disconnect occurs, turned off by default. Will dump out the socket error code this can sometimes give you a clue as to the root cause.</td>
</tr>
<tr>
<td>3913</td>
<td>SQL 7/8 &ndash; SQL Server does not update the <strong>rowcnt</strong> column of the <strong>sysindexes</strong> system table until the transaction is committed. When turned on the optimizer gets row count information from in-memory metadata that is saved to <strong>sysindexes</strong> system table when the transaction commits.</td>
</tr>
<tr>
<td valign="top"><strong>4013</strong></td>
<td valign="top">
<p>This trace flag writes an entry to the SQL Server error log when a new connection is established. For each connection that occurs, the trace flag writes two entries that look like this:</p>
<p>Login: sa saSQL Query Analyzer(local)ODBCmaster, server process ID (SPID): 57, kernel process ID (KPID): 57.<br />
					Login: sa XANADUsaSQL Query Analyzer(local)ODBCmaster, server process ID (SPID): 57, kernel process ID (KPID): 57.</p>
</td>
</tr>
<tr>
<td valign="top"><strong>4022</strong></td>
<td valign="top">If turns on, then automatically started procedures will be bypassed.</td>
</tr>
<tr>
<td>4029</td>
<td>Logs extended errors to errorlog when network disconnect occurs, turned off by default. Will dump out the socket error code this can sometimes give you a clue as to the root cause.</td>
</tr>
<tr>
<td>4030</td>
<td>Prints both a byte and ASCII representation of the receive buffer. Used when you want to see what queries a client is sending to SQL Server. You can use this trace flag if you experience a protection violation and want to determine which statement caused it. Typically, you can set this flag globally or use SQL Server Enterprise Manager. You can also use DBCC INPUTBUFFER.</td>
</tr>
<tr>
<td>4031</td>
<td>Prints both a byte and ASCII representation of the send buffers (what SQL Server sends back to the client). You can also use DBCC OUTPUTBUFFER.</td>
</tr>
<tr>
<td>4032</td>
<td>Traces the SQL commands coming in from the client. The output destination of the trace flag is controlled with the 3605/3604 trace flags.</td>
</tr>
<tr>
<td>4101</td>
<td rowspan="2">
<p>SQL 9 - Query that involves an outer join operation runs very slowly. However, if you use the FORCE ORDER query hint in the query, the query runs much faster. Additionally, the execution plan of the query contains the following text in the<strong>Warnings</strong> column:&nbsp; NO JOIN PREDICATE</p>
<p>Turn these trace flags after HOTFIX is applied (SP2 CUP4)</p>
</td>
</tr>
<tr>
<td>4121</td>
</tr>
<tr>
<td valign="top"><strong>4606</strong></td>
<td valign="top">Over comes SA password by startup. Refer to Ms article 936892.</td>
</tr>
<tr>
<td valign="top"><strong>4612</strong></td>
<td valign="top">Disable the ring buffer logging - no new entries will be made into the ring buffer.</td>
</tr>
<tr>
<td valign="top"><strong>4613</strong></td>
<td valign="top">Generate a minidump file whenever an entry is logged into the ring buffer.</td>
</tr>
<tr>
<td valign="top"><strong>4616</strong></td>
<td valign="top">Makes server-level metadata visible to application roles. In SQL Server, an application role cannot access metadata outside its own database because application roles are not associated with a server-level principal. This is a change of behavior from earlier versions of SQL Server. Setting this global flag disables the new restrictions, and allows for application roles to access server-level metadata.&nbsp;<strong>Scope</strong> : global only</td>
</tr>
<tr>
<td valign="top"><strong>5302</strong></td>
<td valign="top">Alters default behavior of select&hellip;INTO (and other processes) that lock system tables for the duration of the transaction. This trace flag disables such locking during an implicit transaction.&nbsp;</td>
</tr>
<tr>
<td valign="top"><strong>6527</strong></td>
<td valign="top">
<p>Disables generation of a memory dump on the first occurrence of an out-of-memory exception in CLR integration. By default,&nbsp;SQL Server&nbsp;generates a small memory dump on the first occurrence of an out-of-memory exception in the CLR. The behavior of the trace flag is as follows:</p>
<p>&middot;&nbsp;&nbsp;&nbsp;If this is used as a startup trace flag, a memory dump is never generated. However, a memory dump may be generated if other trace flags are used.</p>
<p>&middot;&nbsp;&nbsp;&nbsp;If this trace flag is enabled on a running server, a memory dump will not be automatically generated from that point on. However, if a memory dump has already been generated due to an out-of-memory exception in the CLR, this trace flag will have no effect. <strong>Scope</strong> : global only</p>
</td>
</tr>
<tr>
<td valign="top"><strong>7103</strong></td>
<td valign="top">Disable table lock promotion for text columns. Refer to Ms article - 230044</td>
</tr>
<tr>
<td>7300</td>
<td>Retrieves extended information about any error you encounter when you execute a distributed query.</td>
</tr>
<tr>
<td>7501</td>
<td>Dynamic cursors are used by default on forward-only cursors. Dynamic cursors are faster than in earlier versions and no longer require unique indexes. This flag disables the dynamic cursor enhancements and reverts to version 6.0 behavior.</td>
</tr>
<tr>
<td>7502</td>
<td>Disables the caching of cursor plans for extended stored procedures.</td>
</tr>
<tr>
<td>7505</td>
<td>Enables version 6.x handling of return codes when calling dbcursorfetchex and the resulting cursor position follows the end of the cursor result set.</td>
</tr>
<tr>
<td>7525</td>
<td>Reverts to the SQL Server 7 behavior of closing nonstatic cursors regardless of the SET CURSOR_CLOSE_ON_COMMIT state in SQL Server 8.</td>
</tr>
<tr>
<td>7601</td>
<td rowspan="4">Turns on full text indexing. Together these four gather more information about full text search (indexing process) to the error log.</td>
</tr>
<tr>
<td>7603</td>
</tr>
<tr>
<td>7604</td>
</tr>
<tr>
<td>7605</td>
</tr>
<tr>
<td>7646</td>
<td>SQL 10. Avoids blocking when using full text indexing. An issue we experienced that full text can be slow when there is a high number of updates to the index and is caused by blocking on the docidfilter internal table.</td>
</tr>
<tr>
<td valign="top"><strong>7806</strong></td>
<td valign="top">Enables a dedicated administrator connection (DAC) on SQL Svr Express. By default, no DAC resources are reserved on SQL Server Express.</td>
</tr>
<tr>
<td valign="top">8004</td>
<td valign="top">SQL server to create a mini dump once you enable 2551 and a out of memory condition is hit.</td>
</tr>
<tr>
<td valign="top">8011</td>
<td valign="top">Disables the collection of additional diagnostic information for Resource Monitor. You can use the information in this ring buffer to diagnose out-of-memory conditions. Scope: GLOBAL.</td>
</tr>
<tr>
<td valign="top">8012</td>
<td valign="top">
<p>Records an event in the schedule ring buffer every time that one of the following events occurs:</p>
<p>&middot;&nbsp;&nbsp;&nbsp;A scheduler switches context to another worker.</p>
<p>&middot;&nbsp;&nbsp;&nbsp;A worker is suspended or resumed.</p>
<p>&middot;&nbsp;&nbsp;&nbsp;A worker enters the preemptive mode or the non-preemptive mode.</p>
<p>You can use the diagnostic information in this ring buffer to analyze scheduling problems. For example, you can use the information in this ring buffer to troubleshoot problems when SQL Server stops responding.<br />
					Trace flag 8012 disables recording of events for schedulers. You can turn on trace flag 8012 only at startup.</p>
</td>
</tr>
<tr>
<td valign="top">8018</td>
<td valign="top">Disables the creation of the ring buffer, and no exception information is recorded. The exception ring buffer records the last 256 exceptions that are raised on a node. Each record contains some information about the error and contains a stack trace. A record is added to the ring buffer when an exception is raised.</td>
</tr>
<tr>
<td valign="top">8019</td>
<td valign="top">Disables stack collection during the record creation, has no effect if trace flag 8018 is turned on. Disabling the exception ring buffer makes it more difficult to diagnose problems that are related to internal server errors. You can turn on trace flag 8018 and trace flag 8019 only at startup.</td>
</tr>
<tr>
<td valign="top">8020</td>
<td valign="top">SQL Server uses the size of the working set when SQL Server interprets the global memory state signals from the operating system. Trace flag 8020 removes the size of the working set from consideration when SQL Server interprets the global memory state signals. If you use this trace flag incorrectly, heavy paging occurs, and the performance is poor. Therefore, contact Microsoft Support before you use. You can turn on trace flag 8020 only at startup</td>
</tr>
<tr>
<td valign="top"><strong>8033</strong></td>
<td valign="top">SQL 9 &ndash; disable the reporting of CPU Drift errors in the SQL Server errorlog like time stamp counter of CPU on scheduler id 1 is not synchronized with other CPUs.</td>
</tr>
<tr>
<td valign="top"><strong>8202</strong></td>
<td valign="top">Used to replicate UPDATE as DELETE/INSERT pair at the publisher. i.e. UPDATE commands at the publisher can be run as an &quot;on-page DELETE/INSERT&quot; or a &quot;full DELETE/INSERT&quot;. If the UPDATE command is run as an &quot;on-page DELETE/INSERT,&quot; the Logreader send UDPATE command to the subscriber, If the UPDATE command is run as a &quot;full DELETE/INSERT,&quot; the Logreader send UPDATE as DELETE/INSERT Pair. If you turn on trace flag 8202, then UPDATE commands at the publisher will be always send to the subscriber as DELETE/INSERT pair.</td>
</tr>
<tr>
<td>8206</td>
<td>Supports stored procedure execution with a user specified owner name for SQL Server subscribers or without owner qualification for heterogeneous subscribers in SQL Server 8.</td>
</tr>
<tr>
<td>8207</td>
<td>Enables singleton updates for Transactional Replication, released with SQL Server 8 SP 1.</td>
</tr>
<tr>
<td>8501</td>
<td>Writes detailed information about Ms-DTC context &amp; state changes to the log.</td>
</tr>
<tr>
<td>8599</td>
<td>Allows you to use a savepoint within a distributed transaction.</td>
</tr>
<tr>
<td valign="top"><strong>8602</strong></td>
<td valign="top">Ignore index hints that are specified in query/procedure.</td>
</tr>
<tr>
<td>8679</td>
<td>Prevents the SQL Server optimizer from using a Hash Match Team operator.</td>
</tr>
<tr>
<td>8687</td>
<td>Used to disable query parallelism.</td>
</tr>
<tr>
<td>8721</td>
<td>Dumps information into the error log when AutoStat has been run.</td>
</tr>
<tr>
<td valign="top"><strong>8722</strong></td>
<td valign="top">Disable all other types of hints. This includes the OPTION clause.</td>
</tr>
<tr>
<td valign="top"><strong>8744</strong></td>
<td valign="top">Disables pre-fetching for the <strong>Nested Loops</strong> operator. Incorrect use of this trace flag may cause additional physical reads when SQL Server executes plans that contain the <strong>Nested Loops</strong> operator. For more information about the <strong>Nested Loops</strong> operator, see the &quot;Logical and physical operators reference&quot; topic in SQL Server 9 BOL.<br />
				You can turn on trace flag 8744 at startup or in a user session. When you turn on trace flag 8744 at startup, the trace flag has global scope. When you turn on trace flag 8744 in a user session, the trace flag has session scope.</td>
</tr>
<tr>
<td valign="top"><strong>8755</strong></td>
<td valign="top">Disable any locking hints like READONLY. By setting this, you allow SQL Server to dynamically select the best locking hint for the query.</td>
</tr>
<tr>
<td>8783</td>
<td>Allows DELETE, INSERT, and UPDATE statements to honor the SET ROWCOUNT ON setting when enabled.</td>
</tr>
<tr>
<td>8816</td>
<td>Logs every two-digit year conversion to a four-digit year.</td>
</tr>
<tr>
<td>9134</td>
<td>SQL 8 &ndash; Does additional reads to test if the page is allocated &amp; linked correctly this checks IAM &amp; PFS. Fixes error 601 for queries under Isolation level read uncommitted.</td>
</tr>
<tr>
<td>9268</td>
<td>
<p>SQL 8 &ndash; When SQL Server runs a parameterized query that contains several IN clauses, each with a large number of values, SQL Server may return the following error message after a minute or more of high CPU utilization:</p>
<p>Server: Msg 8623, Level 16, State 1<br />
					Internal Query Processor Error: The query processor could not produce a query plan. Contact your primary support provider for more information.</p>
<p><a href="http://support.microsoft.com/kb/325658">http://support.microsoft.com/kb/325658</a> Enabling this trace flag activates the hotfix.</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>更多trace flag可以参考：http://www.cnblogs.com/Amaranthus/archive/2012/08/01/2619045.html</p>
<div style="clear: both; margin: 10px 0pt; border: 1px dashed rgb(153, 153, 153); font-size: 12px; padding: 5px 10px;">
<li>本文链接地址：<a href="https://www.dbainfo.net/sql-server-trace-flags.htm">https://www.dbainfo.net/sql-server-trace-flags.htm</a>；</li>
<li>本文为dbainfo个人原创，请在尊重作者劳动成果的前提下进行转载；</li>
<li>转载务必注明原始出处 : <a href="https://www.dbainfo.net/">Sybase数据库技术，数据库恢复专家</a>；</li>
<li>对《<a href="https://www.dbainfo.net/sql-server-trace-flags.htm">SQL Server TRACE FLAGS</a>》有何疑问或见解，请在本文下方发表；</li>
<li>对网站还有其他问题或建议，请提交在<a href="https://www.dbainfo.net/messages" target="_blank">留言板</a>，谢谢！</li>
</div>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2009-11-18 -- <a href="https://www.dbainfo.net/sybase-dbcc-traceflags.htm" title="整理的Sybase Dbcc traceflags">整理的Sybase Dbcc traceflags</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>https://www.dbainfo.net/sql-server-trace-flags.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>整理的Sybase Dbcc traceflags</title>
		<link>https://www.dbainfo.net/sybase-dbcc-traceflags.htm</link>
		<comments>https://www.dbainfo.net/sybase-dbcc-traceflags.htm#comments</comments>
		<pubDate>Wed, 18 Nov 2009 13:55:13 +0000</pubDate>
		<dc:creator>dbainfo</dc:creator>
				<category><![CDATA[Sybase ASE]]></category>
		<category><![CDATA[trace flag]]></category>

		<guid isPermaLink="false">http://www.dbainfo.net/?p=43</guid>
		<description><![CDATA[从多个渠道收集来的sybase trace flag With dbcc traceflags you can do many different things, like change the behaviour of the server, see why a certain query plan is choosen or fine-tune the optimizer. This page shows you how to use them and provides a list of known traceflags. You can set a traceflag in two ways 1.At [...]]]></description>
			<content:encoded><![CDATA[<p><strong>从多个渠道收集来的sybase trace flag </strong></p>
<p>With dbcc traceflags you can do many different things, like change the behaviour of the server, see why a certain query plan is choosen or fine-tune the optimizer.<br />
	This page shows you how to use them and provides a list of known traceflags.</p>
<p><strong>You can set a traceflag in two ways</strong><br />
	<strong>1.At boottime</strong><br />
	Usually a server is booted through the runserver file. In this file (default location is $SYBASE/$SYBASE_ASE/install) you can add a traceflag by specifying a -T flag and one or more comma separated values.<br />
	<strong>2.At run time</strong><br />
	When you are logged in to ASE you can set a traceflag with the dbcc traceon command. Example:<br />
	dbcc traceon(3604)</p>
<p>You can specify multiple values, comma separated.<br />
	To turn a traceflag off, use traceoff<br />
	dbcc traceoff(3604)</p>
<p>Which traceflags are active</p>
<p>To see which traceflags are active for your own session use the dbcc traceflags command<br />
	dbcc traceflags</p>
<p>To see the traceflags of other sessions as well<br />
	dbcc traceflags(2)</p>
<p><strong>List of known traceflags</strong></p>
<p>Below you will find a list of currently known traceflags. But beware of the following:<br />
	WARNING<br />
	? Most traceflags are undocumented and not supported by Sybase, use at your own risk. Certain traceflags can severely harm your databases.<br />
	? Some traceflags are obsolete and are replaced by configuration parameters.<br />
	? Certain traceflags should be used when you start the server, others are meant for a specific session, when known this is indicated in the list.<br />
	? Experiment first on a test server, use only on production systems when either the traceflag is documented by Sybase or when you have consulted Sybase Technical Support.</p>
<p><span style="color: #ff0000;font-size:16px"><strong>List of dbcc traceflags</strong></span></p>
<p>-----------------------------------------------------------------------------------<br />
	100 Display a parse tree for each command<br />
	108 Allow dynamic and host variables in create view statements<br />
	116 Print the text of the abstract query plan. Supported by Sybase, see documentation<br />
	200 Display messages about the before image of the query-tree<br />
	201 Display messages about the after image of the query tree<br />
	208 Show types of locks taken<br />
	217 Display a warning message for using the T-SQL extension of queries with grouped aggregates and columns in the select list which are not in the GROUP BY clause.<br />
	241 Compress all query-trees when ASE is started<br />
	243 Do not expand select * to column names when creating a compiled object<br />
	244 When set, the maximum length of the returned value of str_replace() is 16384, otherwise it is 255<br />
	260 Reduce TDS (Tabular Data Stream) overhead in stored procedures. Turn off done-in-behaviour packets. See also Send doneinproc tokens.<br />
	291 Changes the hierarchy and casting of datatypes to pre-11.5.1 behaviour. There was an issue is some very rare cases where a wrong result could occur, but that&#39;s been cleared up in 11.9.2 and above.<br />
	292 Never send doneinproc tokens. See also Send doneinproc tokens.<br />
	298 Display an error message when a query uses a correlated variable as an inner or outer member of an outer join.<br />
	299 Do not recompile a stored procedure that inherits a temp table from a parent procedure.<br />
	302 Print trace information on index selection, supported by Sybase, see documentation<br />
	303 Display optimizer OR strategy<br />
	304 Revert special &quot;or&quot; optimizer strategy to the strategy used in pre-System 11 (this traceflag resolved several bug issues in System 11, most of these bugs are fixed in ASE 11.0.3.2)<br />
	310 Show the plan as choosen by the optimizer, as well as I/O costs. Supported by Sybase see documentation<br />
	311 Display optimizers expected I/O cost<br />
	317 Show all considered plans. Supported by Sybase, see documentation<br />
	319 Display optimizer reformatting strategy<span id="more-43"></span><br />
	320 Turn off join order heuristics<br />
	321 Display optimizers reformatting strategy briefly<br />
	324 Turn off the like optimization for ad-hoc queries using local variables<br />
	326 Instructs the server to use arithmetic averaging when calculating density instead of a geometric weighted average when updating statistics. Useful for building better stats when an index has skew on the leading column. Use only for updating the stats of a table/index with known skewed data.<br />
	329 Turns on a strategy for fast first row return for queries using cursors with an ORDERBY.<br />
	333 Disables min-max optimization<br />
	334 Enable merge joins<br />
	353 Turn off transitive closure<br />
	362 Will disable delta project<br />
	364 Use range density instead of total density<br />
	370 Use min-max index as an alternative to the table scan for single table queries. Does not perform aggregation optimization for joins.<br />
	384 Enable JTC<br />
	396 Use min-max optimization for single table queries.<br />
	450 Sort a group by operation in the order of the groups<br />
	516 Print mapping between xchg operators and worker processes when using parallel execution. Supported by Sybase, see documentation<br />
	526 Print semi-graphical execution operator tree when showplan is enabled. Supported by Sybase, see documentation<br />
	589 Close a cursor implicitly during a cursor fetch and after an error was hit.<br />
	602 Prints out diagnostic information for deadlock prevention.<br />
	603 Prints out diagnostic information when avoiding deadlock.<br />
	615 When a read of a page does not indicate it&#39;s right identity a second read is done. When the identity is now correct the related device is suspect and ASE turns on additional diagnostic checks. The check can be turned off with the traceflag.<br />
	646 Turn off the new space allocation method as introduced in 12.5.3 for partitioned DOL tables<br />
	693 Turn off some blocking optimizations in scans such as skipping uncommitted inserts and skipping or returning uncommitted updates based on info about what columns were updated.<br />
	695 Turn off update_mode optimization completely for multi-row updates (bugfix 97199)<br />
	699 Turn off transaction logging<br />
	712 Disable procedure cache optimisation<br />
	712 Turn off engine local memory optimization. Engine local cache enhancements were added to ASE, and disabling this should not make a noticeable impact on ASE servers running with less than 5 engines. (no benchmarks). (see case 11270180)<br />
	720 disable the warning msg &quot;memory usage in procedure headers XXX does not match memory usage count in Pss (XXXX) for server process id XXXX.&quot; This error is reported when Adaptive Server cleans up after normal completion of a batch process and determines that the memory usage tracked by the procedure header does not match the usage total maintained in the PSS. No action is required, since this is an informational message and does not result in any incorrect behavior. Upon detecting the memory count mismatch, Adaptive Server corrects the appropriate counter, completes the cleanup tasks, and continues processing. (available since ASE 12.0.0.4 ESD#1)<br />
	722 ASE (debug version) will perform additional checks on the heap memory to detect possible memory corruption.<br />
	833 Do not report Msg 880 &quot;Your query is blocked because it tried to write and database &#39;&#39; is in quiesce state. Your query will proceed after the DBA performs QUIESCE DATABASE RELEASE.&quot;.<br />
	990 Allow only access to the server with the &quot;sa&quot; account. Supported by Sybase, see documentation<br />
	1116 Suppress Msg 1131. (The OAM page does not belong to object with index.....)<br />
	1202 Also show the blocked lock requests in master..syslocks<br />
	1204 Print deadlock information into errorlog<br />
	1205 Prints deadlock information by printing stacktraces.<br />
	1206 Disable lock promotion.<br />
	1212 Shows info about locks granted and released<br />
	1213 Used with dbcc object_stats<br />
	1217 Show info about locks being acquired<br />
	1603 Turns off async i/o and forces standard unix io. Can be useful if symptoms include transient corruption errors that may be caused by bad drives or controllers.<br />
	1605 Start secondary engines by hand<br />
	1606 Create a debug engine start file. This allows you to start up a debug engine which can access the server&#39;s shared memory for running diagnostics.<br />
	1608 Instructs server engine 0 to not on-line any other dataserver engines<br />
	1610 Boot the server with TCP_NODELAY enabled.<br />
	1611 If possible, pin shared memory -- check errorlog for success/failure.<br />
	1613 Set affinity of the ASE engine&#39;s onto particular CPUs usually pins engine 0 to processor 0, engine 1 to processor 1, etc<br />
	1615 SGI only: turn on recoverability to filesystem devices.<br />
	1625 Linux only: Revert to using cached filesystem I/O. By default, ASE on Linux opens filesystem devices using O_SYNC, unlike other Unix based releases, which means it is safe to use filesystems devices for production systems.<br />
	1630 SuSE 32 bit Linux (SuSE 9 SP1 or later), ASE incorrectly identifies AIO to be KAIO while using Posix AIO. Can lead to ASE hang. Start with this trace flag.<br />
	1642 Reserve one third of the sockets for EJB.<br />
	1649 Allow the server to run Linux Kernel Async I/O. For Linux kernel 2.6 and above, to force low level kernel async I/O.<br />
	1650 Allow copying encrypted password strings between platforms (e.g. Solaris to Linux)<br />
	2205 Show HA debugging output, supported by Sybase see documentation<br />
	2209 Used when upgrading ASE configured with high availability<br />
	2512 Instructs dbcc checkalloc to skip the syslogs table during processing.<br />
	2513 Instructs dbcc checkalloc, tablealloc and indexalloc to check for whether foreign objects are stranded on a particular segment within a database. Supported by Sybase, see documentation<br />
	2703 When using update statistics with sampling and the index/column does not have existing statistics, set join density and total density to values from the sample rather then to defaults.<br />
	3100 Load a database even when the characterset or sort order of a dump file is incompatible with the server.<br />
	3199 When ONLINE DATABASE fails with Msg 2610 (Could not find leaf row in nonclustered index partition ...) after a cross-platform database load, set the traceflag on, reload the dump and online again.<br />
	3300 Display each log record that is being processed during recovery. You may wish to redirect stdout because it can be a lot of information.<br />
	3453 During the redo pass, allow the page timestamp to fall between the log old timestamp and the log new timestamp and also for the page timestamp to be behind the log old timestamp. In such cases, fix up the page timestamp to be the log old timestamp so that the current log record will be redone. Used to compensate for bugs in the recovery of sort. This trace flag MUST only be used in exceptional cases, and only where it is known that modifying the page timestamp is the correct thing to do. If not used wisely, data corruptions can occur. (see case 11159541)<br />
	3474 Disable tuning of buffer pools on recovery<br />
	3500 Disable checkpointing.<br />
	3502 Write an entry in the errorlog when a databases is checkpointed<br />
	3504 For internal testing. Will raise a bogus log-out-of-space condition from checkpoint()<br />
	3601 Write a stacktrace to the errorlog every time an error is raised.<br />
	3604 Send trace output to the session of the client. Supported by Sybase see documentation<br />
	3605 Send trace output to the errorlog of the server. Supported by Sybase see documentation<br />
	3607 Do not start recovery when booting ASE.<br />
	3608 Recover only the master database. Do not clear tempdb or start up checkpoint process.<br />
	3609 Recover all databases. Do not clear tempdb or start up checkpoint process.<br />
	3610 Pre-System 10 behaviour: divide by zero to result in NULL instead of error<br />
	3620 Do not kill infected processes.<br />
	3635 Print diagnostic information (see case 11257124, to get info for LDAP login problem). Trace Flag 3635 Diagnostics are written to the console that started ASE. There are not written to the errorlog, even if 3605 is turned on.<br />
	3706 Performance improvement of drop table in tempdb.<br />
	3708 By default ASE (12.5.3 onwards) will release the system catalog locks during the drop of user tables in tempdb when not in DDL-IN-TRAN mode after the commit of the transaction but before post commit work started. Turns off the default behaviour<br />
	3710 Improve the performance of DROP INDEX and CREATE INDEX by releasing the system catalog locks when not in DDL-IN-TRAN mode after the commit of the transaction but before post commit work started.<br />
	4001 Display a message in the errorlog when a loginrecord is recieved<br />
	4012 Don&#39;t spawn chkptproc.<br />
	4013 Write a message to the errorlog when a login takes place.<br />
	4020 Boot without recover.<br />
	4044 Allows to log into ASE when the &quot;sa&quot; login is locked<br />
	4063 used by 12.0 server to turn on sqldbgr RPCs<br />
	4066 Turn off the check for invalid data being sent from a connecting client. (see case 11239779: After ugraded to ASE 1253 to 1251, getting errors when logging into application: The packet size (0) specified at login time is illegal. Legal values are between 512 and 512.)<br />
	4072 Disable the global login trigger<br />
	4073 Export the result of certain &quot;set&quot; command within a login trigger to the session.<br />
	4080 When an UPDATE using tsequal() is done within a stored procedure, tsequal() no longer returns a timestamp value unless the trace flag is set.<br />
	4404 to disable pushdown of Union views. Change the order of the union view and the other view in the from clause, so that the union view is the last entry in the from clause<br />
	4413 Trace queries in a 12.5 server that are join-order dependent.<br />
	4419 In some cases, outer join on view or derived table with CASE expression may perform slower due to view materialization.The workaround is to use traceflag 4419.<br />
	5303 Select into a temporary table will be executed without the table being sliced<br />
	5304 Disable the large I/O and large allocation changes done under 279883-1.<br />
	5101 Forces all I/O requests to go through engine 0. This removes the contention between processors but could create a bottleneck if engine 0 becomes busy with non-I/O tasks.<br />
	5102 Prevents engine 0 from running any non-affinitied tasks.<br />
	7103 Disable table lock promotion for text columns.<br />
	7408 Force the server to scan *log segment* allocation pages; to recalculate free log space rather than use saved counts at boot time. (see case 11195087)<br />
	7409 Force the server to scan *data* segment allocation pages; to recalculate free data page space rather than use saved counts at boot time. (see case 11195087)<br />
	7703 When assinging a value from a table into a local variable, go through the whole resultset rather than jump to last row and assing the value once.<br />
	7709 In 12.5.2, an insert inside a stored proc writes trailing white space when selecting from a char not null field. This can lead to strange results when when selecting data. The traceflag disables this padding.<br />
	7717 Disable check of client compatibility in ASE 15. See Version 15 client compatibility<br />
	7738 Support plan sharing of cached statements across different users.<br />
	7815 logs address connection requests and host / name lookups.<br />
	7824 Disable the master/query syntax in the interfaces file<br />
	7841 Make ASE IPv6 aware<br />
	7844 Enable/disable concurrent Kerberos authentication<br />
	8003 prints info on RPC calls<br />
	8203 Display statement and transaction locks on a deadlock error.<br />
	8399 Instructs the dbcc monitor command to insert a valid description into the field_name column in the sysmonitors table. Not intended for use by users. Appears in the errorlog when sp_sysmon is used.<br />
	9217 When set, RepAgent will not stop after reporting error 9289 due to an inconsistent log record found. Instead it will attempt to continue after reporting error 9290 in the error log. Supported by Sybase, see documentation<br />
	9531 Dump expensive buffer allocation analysis<br />
	10303 Invoke set completion of object ownership methodology and object resolution from old procedural ownership<br />
	11201 Logs client connect events, disconnect events, and attention events. Supported by Sybase, see documentation<br />
	11202 Logs client language, cursor declare, dynamic prepare, and dynamic execute-immediate text. Supported by Sybase, see documentation<br />
	11203 Logs client rpc events. Supported by Sybase, see documentation<br />
	11204 Logs all messages routed to client. Supported by Sybase, see documentation<br />
	11205 Logs all interaction with remote server. Supported by Sybase, see documentation<br />
	11206 Show messages about query processing for file access. Supported by Sybase, see documentation<br />
	11207 Log the processing of text and image datatypes from remote servers. Supported by Sybase, see documentation<br />
	11208 Prevents the create index and drop table statements from being transmitted to a remote server. sysindexes is updated anyway. Supported by Sybase, see documentation<br />
	11209 When running &quot;update statistics&quot; on remote tables update only the rowcount. Supported by Sybase, see documentation<br />
	11210 Disables Component Integration Services enhanced remote query optimization.<br />
	11211 Prevents the drop table syntax from being forwarded to remote servers if the table was created using the create table at location syntax. Supported by Sybase, see documentation<br />
	11212 Prevents escape on underscores in table names. Supported by Sybase, see documentation<br />
	11213 Prevents generation of column and table constraints. Supported by Sybase, see documentation<br />
	11214 Disables Component Integration Services recovery at start-up. Supported by Sybase, see documentation<br />
	11215 Sets enhanced remote optimization for servers of class db2.<br />
	11216 For the session, disables enhanced remote optimization. Supported by Sybase, see documentation<br />
	11217 For the server, disables enhanced remote optimization. Supported by Sybase, see documentation<br />
	11218 Any query that is part of a declare cursor command, and that references proxy tables, is read only by default. Supported by Sybase, see documentation<br />
	11220 Disables constraint checking of remote tables on the local server. This avoids duplicate checking. Setting this trace flag on ensures that queries are not rejected by the quickpass mode because of constraints. (spid) Supported by Sybase, see documentation<br />
	11221 Disables alter table commands to the remote server when ON. This allows users to modify type, length, and nullability of columns in a local table without changing columns in the remote table. Use trace flag 11221 with caution. It may lead to tables that are &ldquo;out of sync.&rdquo; (spid). Supported by Sybase, see documentation<br />
	11223 Disables proxy table index creation during create existing table or create proxy_table command execution. If this flag is set on, no index metadata is imported from the remote site referenced by the proxy table, and no indexes for the proxy table are created. This trace flag should be used with care and turned off when no longer necessary. (global) Supported by Sybase, see documentation<br />
	11228 A 2762 error, &quot;CREATE TABLE command is not allowed within multiple statement transaction&quot; may be reported when executing a SQL INSERT..SELECT from proxy table mapped to a RPC. This traceflag has to be turned on to allow CREATE TABLE command in the remote procedure (for the session)<br />
	11229 Use pre-12.5.3 behaviour to import statistics for proxy tables. Supported by Sybase, see documentation<br />
	11231 CIS: Connections to remote servers are not disconnected and remain engine affinitied until the client session terminates. The connections can now be dropped and detached from an engine after executing a statement to the remote server by enabling this flag. Exceptions are when the statement is participating in cursor, transaction or stored procedure operations; or when ASE is in either HA failover or failback states.<br />
	11232 A 2762 error, &quot;CREATE TABLE command is not allowed within multiple statement transaction&quot; may be reported when executing a SQL INSERT..SELECT from proxy table mapped to a RPC. This traceflag has to be turned on to allow CREATE TABLE command in the remote procedure (serverwide)<br />
	11299 Allows connection information to be logged when a connection to a remote server fails. Supported by Sybase, see documentation<br />
	11906 Informational messages from REORG will no longer be printed to the errorlog.<br />
	12628 Data insertion into DOL tables having nonclustered index will be done with the index prepend mode splits disabled, in order to improve disk space utilization.<br />
	15302 When a subquery appears in the ON clause of an outer join query, the performance may not be efficient. ASE will do optimization for subquery attachment to achieve more favorable performance when turned on.<br />
	15303 Possible performance improvement on a SELECT statement when a BIT column is involved in the WHERE clause.<br />
	15304 CR 422003: A SELECT statement using a LIKE clause with NULL variables returns Msg 712. Workaround for &#39;unable to allocate 0 bytes to heap&#39; bug fixed in 12.5.3 ESD7.<br />
	15381 When set, the warning message 307, &quot;Index specified as optimizer hint in the FROM clause of table does not exist. Optimizer will choose another index instead.&quot; is disabled.<br />
	15382 Disable &quot;special OR strategy&quot; (see release notes for the fine details)<br />
	15556 Allow dump and load in ASE cluster edition with multiple instances active<br />
	-----------------------------------------------------------------------------------<br />
	&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;<br />
	&mdash;- 本文为andkylee个人原创，请在尊重作者劳动成果的前提下进行转载；<br />
	&mdash;- 转载务必注明原始出处 : http://www.dbainfo.net<br />
	&mdash;- 关键字： sybase trace flag 调试 参数<br />
	&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;</p>
<div style="clear: both; margin: 10px 0pt; border: 1px dashed rgb(153, 153, 153); font-size: 12px; padding: 5px 10px;">
<li>本文链接地址：<a href="https://www.dbainfo.net/sybase-dbcc-traceflags.htm">https://www.dbainfo.net/sybase-dbcc-traceflags.htm</a>；</li>
<li>本文为dbainfo个人原创，请在尊重作者劳动成果的前提下进行转载；</li>
<li>转载务必注明原始出处 : <a href="https://www.dbainfo.net/">Sybase数据库技术，数据库恢复专家</a>；</li>
<li>对《<a href="https://www.dbainfo.net/sybase-dbcc-traceflags.htm">整理的Sybase Dbcc traceflags</a>》有何疑问或见解，请在本文下方发表；</li>
<li>对网站还有其他问题或建议，请提交在<a href="https://www.dbainfo.net/messages" target="_blank">留言板</a>，谢谢！</li>
</div>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2010-08-05 -- <a href="https://www.dbainfo.net/sql-server-trace-flags.htm" title="SQL Server TRACE FLAGS">SQL Server TRACE FLAGS</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>https://www.dbainfo.net/sybase-dbcc-traceflags.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
