`

DBCC flag之: Sybase ASE DBCC traceflags汇集

 
阅读更多


从多个渠道收集来的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 boottime

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.
2.At run time
When you are logged in to ASE you can set a traceflag with the dbcc traceon command. Example:
dbcc traceon(3604)

You can specify multiple values, comma separated.
To turn a traceflag off, use traceoff
dbcc traceoff(3604)

Which traceflags are active

To see which traceflags are active for your own session use the dbcc traceflags command
dbcc traceflags

To see the traceflags of other sessions as well
dbcc traceflags(2)

List of known traceflags

Below you will find a list of currently known traceflags. But beware of the following:
WARNING
? Most traceflags are undocumented and not supported by Sybase, use at your own risk. Certain traceflags can severely harm your databases.
? Some traceflags are obsolete and are replaced by configuration parameters.
? 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.
? 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.

List of dbcc traceflags

-----------------------------------------------------------------------------------
100 Display a parse tree for each command
108 Allow dynamic and host variables in create view statements
116 Print the text of the abstract query plan. Supported by Sybase, see documentation
200 Display messages about the before image of the query-tree
201 Display messages about the after image of the query tree
208 Show types of locks taken
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.
241 Compress all query-trees when ASE is started
243 Do not expand select * to column names when creating a compiled object
244 When set, the maximum length of the returned value of str_replace() is 16384, otherwise it is 255
260 Reduce TDS (Tabular Data Stream) overhead in stored procedures. Turn off done-in-behaviour packets. See also Send doneinproc tokens.
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's been cleared up in 11.9.2 and above.
292 Never send doneinproc tokens. See also Send doneinproc tokens.
298 Display an error message when a query uses a correlated variable as an inner or outer member of an outer join.
299 Do not recompile a stored procedure that inherits a temp table from a parent procedure.
302 Print trace information on index selection, supported by Sybase, see documentation
303 Display optimizer OR strategy
304 Revert special "or" 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)
310 Show the plan as choosen by the optimizer, as well as I/O costs. Supported by Sybase see documentation
311 Display optimizers expected I/O cost
317 Show all considered plans. Supported by Sybase, see documentation
319 Display optimizer reformatting strategy
320 Turn off join order heuristics
321 Display optimizers reformatting strategy briefly
324 Turn off the like optimization for ad-hoc queries using local variables
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.
329 Turns on a strategy for fast first row return for queries using cursors with an ORDERBY.
333 Disables min-max optimization
334 Enable merge joins
353 Turn off transitive closure
362 Will disable delta project
364 Use range density instead of total density
370 Use min-max index as an alternative to the table scan for single table queries. Does not perform aggregation optimization for joins.
384 Enable JTC
396 Use min-max optimization for single table queries.
450 Sort a group by operation in the order of the groups
516 Print mapping between xchg operators and worker processes when using parallel execution. Supported by Sybase, see documentation
526 Print semi-graphical execution operator tree when showplan is enabled. Supported by Sybase, see documentation
589 Close a cursor implicitly during a cursor fetch and after an error was hit.
602 Prints out diagnostic information for deadlock prevention.
603 Prints out diagnostic information when avoiding deadlock.
615 When a read of a page does not indicate it'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.
646 Turn off the new space allocation method as introduced in 12.5.3 for partitioned DOL tables
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.
695 Turn off update_mode optimization completely for multi-row updates (bugfix 97199)
699 Turn off transaction logging
712 Disable procedure cache optimisation
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)
720 disable the warning msg "memory usage in procedure headers XXX does not match memory usage count in Pss (XXXX) for server process id XXXX." 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)
722 ASE (debug version) will perform additional checks on the heap memory to detect possible memory corruption.
833 Do not report Msg 880 "Your query is blocked because it tried to write and database '' is in quiesce state. Your query will proceed after the DBA performs QUIESCE DATABASE RELEASE.".
990 Allow only access to the server with the "sa" account. Supported by Sybase, see documentation
1116 Suppress Msg 1131. (The OAM page does not belong to object with index.....)
1202 Also show the blocked lock requests in master..syslocks
1204 Print deadlock information into errorlog
1205 Prints deadlock information by printing stacktraces.
1206 Disable lock promotion.
1212 Shows info about locks granted and released
1213 Used with dbcc object_stats
1217 Show info about locks being acquired
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.
1605 Start secondary engines by hand
1606 Create a debug engine start file. This allows you to start up a debug engine which can access the server's shared memory for running diagnostics.
1608 Instructs server engine 0 to not on-line any other dataserver engines
1610 Boot the server with TCP_NODELAY enabled.
1611 If possible, pin shared memory -- check errorlog for success/failure.
1613 Set affinity of the ASE engine's onto particular CPUs usually pins engine 0 to processor 0, engine 1 to processor 1, etc
1615 SGI only: turn on recoverability to filesystem devices.
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.
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.
1642 Reserve one third of the sockets for EJB.
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.
1650 Allow copying encrypted password strings between platforms (e.g. Solaris to Linux)
2205 Show HA debugging output, supported by Sybase see documentation
2209 Used when upgrading ASE configured with high availability
2512 Instructs dbcc checkalloc to skip the syslogs table during processing.
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
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.
3100 Load a database even when the characterset or sort order of a dump file is incompatible with the server.
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.
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.
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)
3474 Disable tuning of buffer pools on recovery
3500 Disable checkpointing.
3502 Write an entry in the errorlog when a databases is checkpointed
3504 For internal testing. Will raise a bogus log-out-of-space condition from checkpoint()
3601 Write a stacktrace to the errorlog every time an error is raised.
3604 Send trace output to the session of the client. Supported by Sybase see documentation
3605 Send trace output to the errorlog of the server. Supported by Sybase see documentation
3607 Do not start recovery when booting ASE.
3608 Recover only the master database. Do not clear tempdb or start up checkpoint process.
3609 Recover all databases. Do not clear tempdb or start up checkpoint process.
3610 Pre-System 10 behaviour: divide by zero to result in NULL instead of error
3620 Do not kill infected processes.
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.
3706 Performance improvement of drop table in tempdb.
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
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.
4001 Display a message in the errorlog when a loginrecord is recieved
4012 Don't spawn chkptproc.
4013 Write a message to the errorlog when a login takes place.
4020 Boot without recover.
4044 Allows to log into ASE when the "sa" login is locked
4063 used by 12.0 server to turn on sqldbgr RPCs
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.)
4072 Disable the global login trigger
4073 Export the result of certain "set" command within a login trigger to the session.
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.
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
4413 Trace queries in a 12.5 server that are join-order dependent.
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.
5303 Select into a temporary table will be executed without the table being sliced
5304 Disable the large I/O and large allocation changes done under 279883-1.
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.
5102 Prevents engine 0 from running any non-affinitied tasks.
7103 Disable table lock promotion for text columns.
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)
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)
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.
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.
7717 Disable check of client compatibility in ASE 15. See Version 15 client compatibility
7738 Support plan sharing of cached statements across different users.
7815 logs address connection requests and host / name lookups.
7824 Disable the master/query syntax in the interfaces file
7841 Make ASE IPv6 aware
7844 Enable/disable concurrent Kerberos authentication
8003 prints info on RPC calls
8203 Display statement and transaction locks on a deadlock error.
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.
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
9531 Dump expensive buffer allocation analysis
10303 Invoke set completion of object ownership methodology and object resolution from old procedural ownership
11201 Logs client connect events, disconnect events, and attention events. Supported by Sybase, see documentation
11202 Logs client language, cursor declare, dynamic prepare, and dynamic execute-immediate text. Supported by Sybase, see documentation
11203 Logs client rpc events. Supported by Sybase, see documentation
11204 Logs all messages routed to client. Supported by Sybase, see documentation
11205 Logs all interaction with remote server. Supported by Sybase, see documentation
11206 Show messages about query processing for file access. Supported by Sybase, see documentation
11207 Log the processing of text and image datatypes from remote servers. Supported by Sybase, see documentation
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
11209 When running "update statistics" on remote tables update only the rowcount. Supported by Sybase, see documentation
11210 Disables Component Integration Services enhanced remote query optimization.
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
11212 Prevents escape on underscores in table names. Supported by Sybase, see documentation
11213 Prevents generation of column and table constraints. Supported by Sybase, see documentation
11214 Disables Component Integration Services recovery at start-up. Supported by Sybase, see documentation
11215 Sets enhanced remote optimization for servers of class db2.
11216 For the session, disables enhanced remote optimization. Supported by Sybase, see documentation
11217 For the server, disables enhanced remote optimization. Supported by Sybase, see documentation
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
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
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 “out of sync.” (spid). Supported by Sybase, see documentation
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
11228 A 2762 error, "CREATE TABLE command is not allowed within multiple statement transaction" 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)
11229 Use pre-12.5.3 behaviour to import statistics for proxy tables. Supported by Sybase, see documentation
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.
11232 A 2762 error, "CREATE TABLE command is not allowed within multiple statement transaction" 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)
11299 Allows connection information to be logged when a connection to a remote server fails. Supported by Sybase, see documentation
11906 Informational messages from REORG will no longer be printed to the errorlog.
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.
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.
15303 Possible performance improvement on a SELECT statement when a BIT column is involved in the WHERE clause.
15304 CR 422003: A SELECT statement using a LIKE clause with NULL variables returns Msg 712. Workaround for 'unable to allocate 0 bytes to heap' bug fixed in 12.5.3 ESD7.
15381 When set, the warning message 307, "Index specified as optimizer hint in the FROM clause of table does not exist. Optimizer will choose another index instead." is disabled.
15382 Disable "special OR strategy" (see release notes for the fine details)
15556 Allow dump and load in ASE cluster edition with multiple instances active


参考自:http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc32702.1550/html/omni_ug/CHDJIJEC.htm

http://www.dbainfo.net/sybase-dbcc-traceflags.htm

<script type="text/javascript"><!-- google_ad_client = "ca-pub-7104628658411459"; /* wide1 */ google_ad_slot = "8564482570"; google_ad_width = 728; google_ad_height = 90; //--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
分享到:
评论

相关推荐

    sybase11.9.2中文版英文版集合.rar

    7. **数据库管理**:Sybase ASE提供了多种管理工具,如isql(交互式SQL命令行工具)、dbcc(数据库一致性检查)和sysprocesses(查看当前进程)。这些工具帮助管理员监控和优化数据库性能。 8. **数据恢复与备份**...

    Sybase ASE快速参考手册

    **Sybase Adaptive Server Enterprise(ASE)基础概念** Sybase ASE,全称为Adaptive Server Enterprise,是一种高性能的关系型数据库管理系统,由Sybase公司开发。它提供了一整套企业级的数据库解决方案,包括数据...

    Sybase ASE快速参考手册.pdf

    《Sybase ASE快速参考手册》提供了关于Sybase Adaptive Server Enterprise(ASE)的详细信息,是进行日常维护的重要参考资料。以下是对手册中关键知识点的详细解释: 1. **Sybase ASE**:Sybase ASE(Adaptive ...

    Oracle向Sybase ASE迁移指南

    Sybase ASE的数据库架构与Oracle有一些不同之处,了解这些区别对于成功迁移至关重要。主要方面包括: - **SQL语言**:虽然两种数据库都支持标准SQL,但在特定语法和功能上有显著差异。 - **物理存储**:Sybase ASE...

    如何单独在备份机上启动Sybase ASE12.5

    ### 如何单独在备份机上启动Sybase ASE12.5 #### 背景介绍 Sybase Adaptive Server Enterprise (ASE) 是一款高性能的关系型数据库管理系统。版本12.5虽然较老,但在某些特定环境下仍被广泛使用。在本篇文章中,...

    MySQL向Sybase ASE迁移指南

    DBCC命令是Sybase ASE的一个重要组成部分,用于执行各种数据库维护任务。 #### 五、数据库架构迁移 数据库架构迁移涉及到目标平台的搭建、服务器配置、存储架构转换等方面。 ##### 5.1 构建Sybase实例 首先需要...

    DBCC命令 MSSQL

    标题:"DBCC命令 MSSQL" 描述了关于微软SQL Server 2000中的DBCC命令的详尽参考资料。这不仅是对数据库管理者的实用指南,也是深入理解SQL Server内部工作原理的重要资料。以下是对该文档提及的DBCC命令的详细解释与...

    Sybase ASE系统管理员日常维护指南

    ### Sybase ASE系统管理员日常维护指南精要 #### 引言与目标读者 《Sybase ASE系统管理员日常维护指南》是一份专为Sybase ASE数据库管理员设计的实用手册,旨在帮助他们掌握并实施一系列关键的日常维护任务,以...

    sybase ASE 15.5快速参考指南

    ### Sybase ASE 15.5 快速参考指南知识点概览 #### 一、概述 Sybase Adaptive Server Enterprise (ASE) 15.5 是一款高性能的关系型数据库管理系统,适用于企业级应用环境。该版本提供了强大的数据处理能力以及丰富...

    Sybase-ASE12.5版本参考手册

    **Sybase ASE 12.5 版本参考手册** Sybase Adaptive Server Enterprise(ASE)是Sybase公司推出的一款高性能的关系型数据库管理系统,广泛应用于企业级数据存储和处理。ASE 12.5版本在数据库管理、性能优化、安全性...

    Sybase ASE 调优手册3

    2. **数据库配置参数调优**:ASE有许多可配置的参数,如缓冲区大小、日志缓存、事务隔离级别等,手册会详细介绍这些参数的作用及其最佳实践,以确保系统性能最大化。 3. **SQL查询优化**:手册将深入探讨SQL语句的...

    Sybase+ASE快速维护参考手册

    《Sybase ASE快速维护参考手册》是一份针对Sybase Adaptive Server Enterprise(ASE)数据库系统进行高效维护的重要参考资料。这份手册不仅适用于初学者,也对有经验的DBA提供了宝贵的指导。下面将对其中的关键概念...

    Sybase ASE快速参考手册.zip___2005999462749712.zip

    **Sybase ASE(Adaptive Server Enterprise)**是Sybase公司推出的一款高性能的企业级关系型数据库管理系统,被广泛应用于金融、电信、制造业等大型企业。它以其高效的数据处理能力、强大的事务处理性能和高可用性而...

    中石化sybase培训ASE.ppt

    根据给定文件的信息,我们可以提炼出以下关于Sybase ASE(Adaptive Server Enterprise)的相关知识点: ### 1. ASE的基本概念介绍 #### Adaptive Server (ASE) - **定义**: Sybase ASE 是一款高性能的企业级关系型...

    SYBASE ASE快速参考手册

    **SYBASE ASE快速参考手册** **一、基本概念** 1. **Sybase Adaptive Server Enterprise (ASE)** 是一种高性能的企业级关系型数据库管理系统,由Sybase公司开发,用于处理大规模的数据处理和事务处理工作。 2. **...

    Sybase ASE 15.7 开发文档:快速参考指南

    Sybase ASE 15.7 开发文档:快速参考指南 数据类型 标准和遵从性 数据类型和加密列 Adaptive Server 的全局变量 保留字 函数 命令 交互式 dbsql 命令 系统过程 目录存储过程 扩展存储过程 dbcc 存储过程 系统表 DBCC...

    SQL SERVER DBCC命令解释

    SQL SERVER DBCC 命令解释 DBCC(Database Consistency Checker)是 SQL Server 中的一个命令,用于检查和维护数据库的完整性和一致性。DBCC 命令可以用来诊断和修复数据库中的问题,例如死锁、锁问题、索引问题等...

    sybase ase系统管理指南第二卷(2)

    本章节主要介绍了Sybase Adaptive Server Enterprise (ASE) 中如何进行数据库一致性的检查,包括如何规划`dbcc db`数据库的大小、工作空间和缓存大小等关键参数。此外,还提供了如何准备`dbcc checkstorage`命令以...

Global site tag (gtag.js) - Google Analytics