{"id":1675,"date":"2018-08-14T10:04:51","date_gmt":"2018-08-14T10:04:51","guid":{"rendered":"http:\/\/dbtut.com\/?p=1675"},"modified":"2018-11-09T23:03:24","modified_gmt":"2018-11-09T23:03:24","slug":"1675","status":"publish","type":"post","link":"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/1675\/","title":{"rendered":"Sybase Questions"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p><strong>1)How to Calculate Memory Usage and Disk Space Usage?<\/strong><\/p>\n<p>There are 2 stored procs which help you to calculate the memory size and database device usages.<\/p>\n<p>try with sp_configure &#8216;memory&#8221; for memory utilization and memory available<\/p>\n<p>sp_helpdevice &#8211; for device space utilization and free space.<\/p>\n<p><strong>2) log space requirements for reorg rebuild<\/strong><\/p>\n<p>We have a option for shrinking log space like the way how we alter the log space.<\/p>\n<pre class=\"lang:default decode:true \">alter database ... log on\r\nalter database ... log off<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>3)How to find out last table update?<\/strong><br \/>\nIf you have auditing enabled, you can query from the audit table.<\/p>\n<p><strong>4)Recover sa password in Sybase ASE &#8211; Step by Step process<\/strong><\/p>\n<p>If the sa password is lost, the step by step process mentioned below can be followed to recover the \u2018sa\u2019 password.<\/p>\n<p><strong>Step 1.<\/strong> Shutdown the server &#8211; kill the processes at OS level as it is not possible to shutdown the server<br \/>\n<strong>Step 2.<\/strong> Make a copy of RUN_ file say. RUN__backup<br \/>\n<strong>Step 3.<\/strong> Edit the RUN_ file to include an argument -psa . Including &#8220;-psa&#8221; to the RUN file will generate a new password for the &#8216;sa&#8217; login. After editing , the RUN_ file looks as below.<\/p>\n<pre class=\"lang:default decode:true \">$cat RUN_TEST_SYBASE15\r\n#!\/bin\/sh\r\n#\r\n# ASE page size (KB): 2k\r\n# Master device path: \/usr\/local\/sybase15\/sybdev\/data\/master.dat\r\n# Error log path: \/usr\/local\/sybase15\/ASE-15_0\/install\/TEST_SYBASE15.log\r\n# Configuration file path: \/usr\/local\/sybase15\/ASE-15_0\/TEST_SYBASE15.cfg\r\n# Directory for shared memory files: \/usr\/local\/sybase15\/ASE-15_0\r\n# Adaptive Server name: TEST_SYBASE15\r\n#\r\n\/usr\/local\/sybase15\/ASE-15_0\/bin\/dataserver \\\r\n-d\/usr\/local\/sybase15\/sybdev\/data\/master.dat \\\r\n-e\/usr\/local\/sybase15\/ASE-15_0\/install\/TEST_SYBASE15.log \\\r\n-c\/usr\/local\/sybase15\/ASE-15_0\/TEST_SYBASE15.cfg \\\r\n-M\/usr\/local\/sybase15\/ASE-15_0 \\\r\n-sTEST_SYBASE15 \\\r\n-psa \\<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>Step 4.<\/strong> Start the Sybase server using the command startserver.The password will be printed out on the console as shown below( please note that the sa password will not be written into error log) .Look for it on the console.<\/p>\n<pre class=\"lang:default decode:true \">$startserver -f RUN_TEST_SYBASE15\r\n00:00000:00000:2010\/05\/05 16:13:55.69 kernel SySAM: Checked out license for 1 ASE_CORE (2009.1231\/permanent\/19B3 47BC 0B7E 8DC3).\r\n.............................................................\r\n.............................................................\r\n00:00000:00001:2010\/05\/05 16:14:01.28 server Completed REDO pass for database 'sybsystemprocs'.\r\n00:00000:00001:2010\/05\/05 16:14:01.28 server Recovery of database 'sybsystemprocs' will undo incomplete nested top actions.\r\n00:00000:00001:2010\/05\/05 16:14:01.28 server Started recovery checkpoint for database 'sybsystemprocs'.\r\n00:00000:00001:2010\/05\/05 16:14:01.30 server Completed recovery checkpoint for database 'sybsystemprocs'.\r\n00:00000:00001:2010\/05\/05 16:14:01.32 server Started filling free space info for database 'sybsystemprocs'.\r\n00:00000:00001:2010\/05\/05 16:14:01.34 server Completed filling free space info for database 'sybsystemprocs'.\r\n00:00000:00001:2010\/05\/05 16:14:01.36 server Started cleaning up the default data cache for database 'sybsystemprocs'.\r\n00:00000:00001:2010\/05\/05 16:14:01.36 server Completed cleaning up the default data cache for database 'sybsystemprocs'.\r\n00:00000:00001:2010\/05\/05 16:14:01.37 server Checking external objects.\r\n00:00000:00001:2010\/05\/05 16:14:01.43 server The transaction log in the database 'sybsystemprocs' will use I\/O size of 2 Kb.\r\n00:00000:00001:2010\/05\/05 16:14:01.44 server Database 'sybsystemprocs' is now online.\r\n\r\nNew SSO password for sa:yjyhzychbtafk8\r\n\r\n00:00000:00008:2010\/05\/05 16:14:01.48 kernel.......................................\r\n00:00000:00008:2010\/05\/05 16:14:01.48 kernel.......................................<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>Step 5.<\/strong> Login as sa user using the above password.<\/p>\n<p><strong>Step 6.<\/strong> Change the sa password using sp_password command.<\/p>\n<pre class=\"lang:default decode:true \">$isql -Usa -w132 -c -Pyjyhzychbtafk8\r\n1&gt; sp_password yjyhzychbtafk8,qwerty4321\r\n2&gt;\r\nPassword correctly set.\r\n\r\n(return status = 0)\r\n1&gt;<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>Step 7.<\/strong> Remove the -psa argument in RUN_ file. \/ Copy the RUN__backup file to RUN_ file.<br \/>\nIn some production environments use of &#8220;sa&#8221; accounts are restricted, say like the &#8220;sa&#8221; accounts passwords are handed over to the DataCentre and the &#8220;sa&#8221; accounts are locked as part of security.<br \/>\nin such cases though we successfully reset the &#8220;sa&#8221; password with the below method we won\u2019t be able to successfully login with new password as the &#8220;sa&#8221; account is already locked.<br \/>\nTo overcome this, we need to include a traceflag in the RUN_SERVER file as below.<br \/>\n-T4044\\<br \/>\n4044 SA account can be unlocked by rebooting server with trace flag -T4044. If sa (or sso_role) password is lost, add this to your RUN_serverfile. This will generate new password when server started. Please don&#8217;t forget to remove this!!!<\/p>\n<p><strong>5)Check if a database user has specific role in Sybase ASE<\/strong><\/p>\n<pre class=\"lang:default decode:true \">show_role().\r\n\r\nselect show_role() - Shows the login\u2019s currently active system-defined roles<\/pre>\n<p><strong>6) How to Create new Database in ASE 15<\/strong><br \/>\nCode:<br \/>\ncreate database db_name on data_device_name = size log on log_device_name = size<\/p>\n<p><strong>7) Troubleshooting commands in ASE<\/strong><\/p>\n<pre class=\"lang:default decode:true \">sp_who -- all current sessions in the ASE server\r\ngo\r\n\r\nselect @@spid -- this is your session\r\ngo\r\n\r\nselect suser_name() -- the username you're logged in with\r\ngo\r\n\r\nselect getdate() -- what's the time?\r\ngo\r\n\r\nselect convert(varchar,getdate(),109) -- what's the time precisely?\r\ngo\r\n\r\nsp_helpdb -- list of databases in this server\r\ngo\r\n\r\nsp_helpdevice -- list of the disk files used by this ASE server\r\ngo<\/pre>\n<p>&nbsp;<\/p>\n<p>Create your own database to mess around (never create tables etc. in the &#8216;master&#8217; database):<\/p>\n<pre class=\"lang:default decode:true \">create database mydb\r\ngo\r\n\r\nuse mydb\r\ngo\r\n\r\nselect db_name() -- this should return 'mydb'\r\ngo\r\n\r\ncreate table mytab (mycol int, mystring varchar(40), when_added datetime)\r\ngo\r\n\r\nsp_help\r\ngo\r\n\r\nsp_help mytab\r\ngo\r\n\r\nselect * from sysobjects where name = 'mytab'\r\ngo\r\n\r\ninsert mytab values (1, 'my first row', getdate())\r\ngo\r\ninsert mytab values (2, 'my second row', getdate())\r\ngo\r\ninsert mytab values (3, 'my third -- getting boring now', getdate())\r\ngo\r\n\r\nselect * from mytab\r\ngo\r\nCreate another login:use master\r\ngo\r\n\r\nsp_addlogin yourname, yoursecretpassword\r\ngo\r\n\r\nuse mydb\r\ngo\r\n\r\nsp_adduser yourname -- needed to get access to database 'mydb'\r\ngo<\/pre>\n<p>&nbsp;<\/p>\n<p>Now log out (or start a new isql session) and log in with the new account:<\/p>\n<pre class=\"lang:default decode:true \">isql -U yourname -P yoursecretpassword -S xxxx ( xxxx\u00a0is your server's name)<\/pre>\n<p>&nbsp;<\/p>\n<p>Now do the following:<\/p>\n<pre class=\"lang:default decode:true\">sp_who -- all current sessions in the ASE server\r\ngo\r\n\r\nselect @@spid -- this is your session\r\ngo\r\n\r\nselect suser_name() -- the username you're logged in with\r\ngo\r\n\r\nuse mydb\r\ngo\r\n\r\nselect * from mytab\r\ngo\r\n\r\ninsert mytab values (4, 'my 4th row....', getdate())\r\ngo\r\n\r\nselect * from mytab\r\ngomaster..syslogins --show all existing logins\r\ngo\r\n\r\nsp_displaylogin yourname\r\ngo\r\n\r\nuse mydb\r\ngo\r\n\r\nsp_dropuser yourname -- remove yourself from this database\r\ngo\r\n\r\nuse master\r\ngo\r\n\r\nsp_droplogin yourname -- drop the login\r\ngo<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>8) Use the bcp utility to copy out these tables. In addition, maintain a hardcopy by printing the output of the following queries:<\/strong><\/p>\n<pre class=\"lang:default decode:true \">select * from sysusages order by vstart\r\nselect * from sysusages order by dbid, lstart\r\nselect * from syslogins\r\nselect * from sysloginroles\r\nselect * from sysdatabases\r\nselect * from sysdevices\r\nselect * from syscharsets\r\nselect * from sysconfigures\r\nselect * from sysservers\r\nselect * from sysremotelogins\r\nselect * from sysresourcelimits\r\nselect * from systimeranges<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>9) SQL to find the oldest open or active transaction in sybase ASE<\/strong><\/p>\n<pre class=\"lang:default decode:true \">select h.spid, u.name, p.cmd, h.name, h.starttime,\r\np.hostname, p.hostprocess, p.program_name\r\nfrom master..syslogshold h, master..sysprocesses p, master..sysusers u\r\nwhere h.spid = p.spid\r\nand p.suid = u.suid\r\nand h.spid != 0<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>10) When you are logged in to ASE you can set a traceflag with the dbcc traceon command. <\/strong><\/p>\n<p>Example:<\/p>\n<pre class=\"lang:default decode:true \">dbcc traceon(3604)<\/pre>\n<p>&nbsp;<\/p>\n<p>You can specify multiple values, comma separated.<br \/>\nTo turn a traceflag off, use traceoff<\/p>\n<pre class=\"lang:default decode:true \">dbcc traceoff(3604)<\/pre>\n\n<ol style=\"list-style-type: lower-greek;\">\n<li>List of dbcc traceflags<br \/>\nExplanation Since version Untill Version Boot time Run time<br \/>\n100 Display a parse tree for each command<br \/>\n108 Allow dynamic and host variables in create view statements 12.5<br \/>\n116 Print the text of the abstract query plan. Supported by Sybase, see documentation<br \/>\n200 Display messages about the before image of the query-tree<br \/>\n201 Display messages about the after image of the query tree<br \/>\n208 Show types of locks taken<br \/>\n217 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. 15.0.2 ESD 2<br \/>\n241 Compress all query-trees when ASE is started<br \/>\n243 Do not expand select * to column names when creating a compiled object<br \/>\n244 When set, the maximum length of the returned value of str_replace() is 16384, otherwise it is 255<br \/>\n260 Reduce TDS (Tabular Data Stream) overhead in stored procedures. Turn off done-in-behaviour packets. See also Send doneinproc tokens.<br \/>\n291 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&#8217;s been cleared up in 11.9.2 and above. 11.9.2<br \/>\n292 Never send doneinproc tokens. See also Send doneinproc tokens.<br \/>\n298 Display an error message when a query uses a correlated variable as an inner or outer member of an outer join.<br \/>\n299 Do not recompile a stored procedure that inherits a temp table from a parent procedure.<br \/>\n302 Print trace information on index selection, supported by Sybase, see documentation 12.5 Y<br \/>\n303 Display optimizer OR strategy 12.5 Y<br \/>\n304 Revert special &#8220;or&#8221; 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 \/>\n310 Show the plan as choosen by the optimizer, as well as I\/O costs. Supported by Sybase see documentation 12.5 Y<br \/>\n311 Display optimizers expected I\/O cost 12.5 Y<br \/>\n317 Show all considered plans. Supported by Sybase, see documentation 12.5 Y<br \/>\n319 Display optimizer reformatting strategy 12.5 Y<br \/>\n320 Turn off join order heuristics 12.5<br \/>\n321 Display optimizers reformatting strategy briefly 12.5<br \/>\n324 Turn off the like optimization for ad-hoc queries using local variables 12.5<br \/>\n326 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. 11.5<br \/>\n329 Turns on a strategy for fast first row return for queries using cursors with an ORDERBY. 15.0 ESD 2 Y N<br \/>\n333 Disables min-max optimization 12.5<br \/>\n334 Enable merge joins 12.5<br \/>\n353 Turn off transitive closure<br \/>\n364 Use range density instead of total density<br \/>\n370 Use min-max index as an alternative to the table scan for single table queries. Does not perform aggregation optimization for joins.<br \/>\n384 Enable JTC<br \/>\n396 Use min-max optimization for single table queries.<br \/>\n450 Sort a group by operation in the order of the groups 15<br \/>\n516 Print mapping between xchg operators and worker processes when using parallel execution. Supported by Sybase, see documentation 15<br \/>\n526 Print semi-graphical execution operator tree when showplan is enabled. Supported by Sybase, see documentation<br \/>\n589 Close a cursor implicitly during a cursor fetch and after an error was hit. 15.0.2 ESD 2<br \/>\n602 Prints out diagnostic information for deadlock prevention.<br \/>\n603 Prints out diagnostic information when avoiding deadlock.<br \/>\n615 When a read of a page does not indicate it&#8217;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. 12.5.3 ESD 5 and 15.0 ESD 2 Y Y<br \/>\n646 Turn off the new space allocation method as introduced in 12.5.3 for partitioned DOL tables 12.5.3<br \/>\n699 Turn off transaction logging<br \/>\n712 Disable procedure cache optimisation<br \/>\n722 ASE (debug version) will perform additional checks on the heap memory to detect possible memory corruption. 15.0 ESD 2 Y N<br \/>\n833 Do not report Msg 880 &#8220;Your query is blocked because it tried to write and database &#8216;&lt;dbname&gt;&#8217; is in quiesce state. Your query will proceed after the DBA performs QUIESCE DATABASE RELEASE.&#8221;. 15.0 ESD 2 Y N<br \/>\n990 Allow only access to the server with the &#8220;sa&#8221; account. Supported by Sybase, see documentation<br \/>\n1116 Suppress Msg 1131. (The OAM page does not belong to object with index&#8230;..)<br \/>\n1202 Also show the blocked lock requests in master..syslocks<br \/>\n1204 Print deadlock information into errorlog<br \/>\n1205 Prints deadlock information by printing stacktraces.<br \/>\n1206 Disable lock promotion.<br \/>\n1212 Shows info about locks granted and released<br \/>\n1213 Used with dbcc object_stats<br \/>\n1217 Show info about locks being acquired<br \/>\n1603 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 \/>\n1605 Start secondary engines by hand<br \/>\n1606 Create a debug engine start file. This allows you to start up a debug engine which can access the server&#8217;s shared memory for running diagnostics.<br \/>\n1608 Instructs server engine 0 to not on-line any other dataserver engines<br \/>\n1610 Boot the server with TCP_NODELAY enabled. Y<br \/>\n1611 If possible, pin shared memory &#8212; check errorlog for success\/failure.<br \/>\n1613 Set affinity of the ASE engine&#8217;s onto particular CPUs usually pins engine 0 to processor 0, engine 1 to processor 1, etc<br \/>\n1615 SGI only: turn on recoverability to filesystem devices.<br \/>\n1625 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. 11.9.2<br \/>\n1630 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. 12.5.3 ESD 5 and 15.0 ESD 2 Y N<br \/>\n1642 Reserve one third of the sockets for EJB.<br \/>\n2205 Show HA debugging output, supported by Sybase see documentation<br \/>\n2209 Used when upgrading ASE configured with high availability<br \/>\n2512 Instructs dbcc checkalloc to skip the syslogs table during processing.<br \/>\n2513 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 \/>\n2703 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. 15.0 ESD 2<br \/>\n3100 Load a database even when the characterset or sort order of a dump file is incompatible with the server.<br \/>\n3199 When ONLINE DATABASE fails with Msg 2610 (Could not find leaf row in nonclustered index partition &#8230;) after a cross-platform database load, set the traceflag on, reload the dump and online again. 15.0 ESD 2 Y<br \/>\n3300 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 \/>\n3500 Disable checkpointing.<br \/>\n3502 Write an entry in the errorlog when a databases is checkpointed<br \/>\n3601 Write a stacktrace to the errorlog every time an error is raised.<br \/>\n3604 Send trace output to the session of the client. Supported by Sybase see documentation Y<br \/>\n3605 Send trace output to the errorlog of the server. Supported by Sybase see documentation Y<br \/>\n3607 Do not start recovery when booting ASE. Y<br \/>\n3608 Recover only the master database. Do not clear tempdb or start up checkpoint process. Y<br \/>\n3609 Recover all databases. Do not clear tempdb or start up checkpoint process.<br \/>\n3610 Pre-System 10 behaviour: divide by zero to result in NULL instead of error<br \/>\n3620 Do not kill infected processes.<br \/>\n3706 Performance improvement of drop table in tempdb. 15.0 ESD 2 Y Y<br \/>\n3710 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. 15.0.2 ESD 4 Y Y<br \/>\n4001 Display a message in the errorlog when a loginrecord is recieved<br \/>\n4012 Don&#8217;t spawn chkptproc.<br \/>\n4013 Write a message to the errorlog when a login takes place.<br \/>\n4020 Boot without recover. Y<br \/>\n4044 Allows to log into ASE when the &#8220;sa&#8221; login is locked<br \/>\n4072 Disable the global login trigger 15<br \/>\n4073 Export the result of certain &#8220;set&#8221; command within a login trigger to the session. 15.0 ESD 2 Y<br \/>\n4080 When an UPDATE using tsequal() is done within a stored procedure, tsequal() no longer returns a timestamp value unless the trace flag is set. 12.5.3 ESD 5 + 15.0 ESD 2<br \/>\n4413 Trace queries in a 12.5 server that are join-order dependent.<br \/>\n4419 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. 12.5.4 ESD#6<br \/>\n5101 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 \/>\n5102 Prevents engine 0 from running any non-affinitied tasks.<br \/>\n7103 Disable table lock promotion for text columns.<br \/>\n7703 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 \/>\n7717 Disable check of client compatibility in ASE 15. See Version 15 client compatibility 15.0.1<br \/>\n7738 Support plan sharing of cached statements across different users. 15.0.2 ESD 2<br \/>\n7815 logs address connection requests and host \/ name lookups.<br \/>\n7841 Make ASE IPv6 aware<br \/>\n7844 Enable\/disable concurrent Kerberos authentication<br \/>\n8003 prints info on RPC calls<br \/>\n8203 Display statement and transaction locks on a deadlock error.<br \/>\n8399 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 \/>\n9217 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 15.0 ESD 2<br \/>\n9531 Dump expensive buffer allocation analysis 15.0.2 ESD 2<br \/>\n11201 Logs client connect events, disconnect events, and attention events. Supported by Sybase, see documentation<br \/>\n11202 Logs client language, cursor declare, dynamic prepare, and dynamic execute-immediate text. Supported by Sybase, see documentation<br \/>\n11203 Logs client rpc events. Supported by Sybase, see documentation<br \/>\n11204 Logs all messages routed to client. Supported by Sybase, see documentation<br \/>\n11205 Logs all interaction with remote server. Supported by Sybase, see documentation<br \/>\n11206 Show messages about query processing for file access. Supported by Sybase, see documentation<br \/>\n11207 Log the processing of text and image datatypes from remote servers. Supported by Sybase, see documentation<br \/>\n11208 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 \/>\n11209 When running &#8220;update statistics&#8221; on remote tables update only the rowcount. Supported by Sybase, see documentation<br \/>\n11210 Disables Component Integration Services enhanced remote query optimization.<br \/>\n11211 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 \/>\n11212 Prevents escape on underscores in table names. Supported by Sybase, see documentation<br \/>\n11213 Prevents generation of column and table constraints. Supported by Sybase, see documentation<br \/>\n11214 Disables Component Integration Services recovery at start-up. Supported by Sybase, see documentation Y<br \/>\n11215 Sets enhanced remote optimization for servers of class db2.<br \/>\n11216 For the session, disables enhanced remote optimization. Supported by Sybase, see documentation Y<br \/>\n11217 For the server, disables enhanced remote optimization. Supported by Sybase, see documentation<br \/>\n11218 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 \/>\n11220 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 \/>\n11221 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 \u201cout of sync.\u201d (spid). Supported by Sybase, see documentation<br \/>\n11223 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 \/>\n11228 A 2762 error, &#8220;CREATE TABLE command is not allowed within multiple statement transaction&#8221; 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) 12.5.3. ESD 5 and 15.0 ESD 2<br \/>\n11229 Use pre-12.5.3 behaviour to import statistics for proxy tables. Supported by Sybase, see documentation 12.5.3<br \/>\n11231 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. 15.0 ESD 2<br \/>\n11232 A 2762 error, &#8220;CREATE TABLE command is not allowed within multiple statement transaction&#8221; 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) 12.5.3. ESD 5 and 15.0 ESD 2<br \/>\n11299 Allows connection information to be logged when a connection to a remote server fails. Supported by Sybase, see documentation<br \/>\n11906 Informational messages from REORG will no longer be printed to the errorlog. 15.0 ESD 2<br \/>\n12628 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. 15.0 ESD 2 Y N<br \/>\n15302 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. 15.0 ESD 2<br \/>\n15303 Possible performance improvement on a SELECT statement when a BIT column is involved in the WHERE clause. 15.0 ESD 2<br \/>\n15381 When set, the warning message 307, &#8220;Index &lt;index_name&gt; specified as optimizer hint in the FROM clause of table &lt;table_name&gt; does not exist. Optimizer will choose another index instead.&#8221; is disabled. 15.0.2 ESD 4<br \/>\n15382 Disable &#8220;special OR strategy&#8221; (see release notes for the fine details) 15.0.2 ESD 2<br \/>\n15556 Allow dump and load in ASE cluster edition with multiple instances active cluster edition<\/li>\n<\/ol>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_1675\" class=\"pvc_stats all  \" data-element-id=\"1675\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; 1)How to Calculate Memory Usage and Disk Space Usage? There are 2 stored procs which help you to calculate the memory size and database device usages. try with sp_configure &#8216;memory&#8221; for memory utilization and memory available sp_helpdevice &#8211; for device space utilization and free space. 2) log space requirements for reorg rebuild We have &hellip;<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_1675\" class=\"pvc_stats all  \" data-element-id=\"1675\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":109,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[1319],"tags":[],"class_list":["post-1675","post","type-post","status-publish","format-standard","","category-sybase"],"aioseo_notices":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Sybase Questions - Database Tutorials<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/1675\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Sybase Questions - Database Tutorials\" \/>\n<meta property=\"og:description\" content=\"&nbsp; 1)How to Calculate Memory Usage and Disk Space Usage? There are 2 stored procs which help you to calculate the memory size and database device usages. try with sp_configure &#8216;memory&#8221; for memory utilization and memory available sp_helpdevice &#8211; for device space utilization and free space. 2) log space requirements for reorg rebuild We have &hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/1675\/\" \/>\n<meta property=\"og:site_name\" content=\"Database Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2018-08-14T10:04:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-11-09T23:03:24+00:00\" \/>\n<meta name=\"author\" content=\"Vaibhav Krishna\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Vaibhav Krishna\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"17 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/1675\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/1675\/\"},\"author\":{\"name\":\"Vaibhav Krishna\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/6c10f95f66ae2b4026552b02018b18b7\"},\"headline\":\"Sybase Questions\",\"datePublished\":\"2018-08-14T10:04:51+00:00\",\"dateModified\":\"2018-11-09T23:03:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/1675\/\"},\"wordCount\":2839,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"articleSection\":[\"Sybase\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/1675\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/1675\/\",\"url\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/1675\/\",\"name\":\"Sybase Questions - Database Tutorials\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/#website\"},\"datePublished\":\"2018-08-14T10:04:51+00:00\",\"dateModified\":\"2018-11-09T23:03:24+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/1675\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/1675\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/1675\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/dbtut.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Sybase Questions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/dbtut.com\/#website\",\"url\":\"https:\/\/dbtut.com\/\",\"name\":\"Database Tutorials\",\"description\":\"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux\",\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/dbtut.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/dbtut.com\/#organization\",\"name\":\"dbtut\",\"url\":\"https:\/\/dbtut.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"width\":223,\"height\":36,\"caption\":\"dbtut\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/6c10f95f66ae2b4026552b02018b18b7\",\"name\":\"Vaibhav Krishna\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/482ae666004473e37e849efeedbf7111152f716f6e9fc6852074d49536796697?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/482ae666004473e37e849efeedbf7111152f716f6e9fc6852074d49536796697?s=96&d=mm&r=g\",\"caption\":\"Vaibhav Krishna\"},\"url\":\"https:\/\/dbtut.com\/index.php\/author\/vaibhavkrishna\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Sybase Questions - Database Tutorials","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/1675\/","og_locale":"en_US","og_type":"article","og_title":"Sybase Questions - Database Tutorials","og_description":"&nbsp; 1)How to Calculate Memory Usage and Disk Space Usage? There are 2 stored procs which help you to calculate the memory size and database device usages. try with sp_configure &#8216;memory&#8221; for memory utilization and memory available sp_helpdevice &#8211; for device space utilization and free space. 2) log space requirements for reorg rebuild We have &hellip;","og_url":"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/1675\/","og_site_name":"Database Tutorials","article_published_time":"2018-08-14T10:04:51+00:00","article_modified_time":"2018-11-09T23:03:24+00:00","author":"Vaibhav Krishna","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Vaibhav Krishna","Est. reading time":"17 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/1675\/#article","isPartOf":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/1675\/"},"author":{"name":"Vaibhav Krishna","@id":"https:\/\/dbtut.com\/#\/schema\/person\/6c10f95f66ae2b4026552b02018b18b7"},"headline":"Sybase Questions","datePublished":"2018-08-14T10:04:51+00:00","dateModified":"2018-11-09T23:03:24+00:00","mainEntityOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/1675\/"},"wordCount":2839,"commentCount":0,"publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"articleSection":["Sybase"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/dbtut.com\/index.php\/2018\/08\/14\/1675\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/1675\/","url":"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/1675\/","name":"Sybase Questions - Database Tutorials","isPartOf":{"@id":"https:\/\/dbtut.com\/#website"},"datePublished":"2018-08-14T10:04:51+00:00","dateModified":"2018-11-09T23:03:24+00:00","breadcrumb":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/1675\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dbtut.com\/index.php\/2018\/08\/14\/1675\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/1675\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dbtut.com\/"},{"@type":"ListItem","position":2,"name":"Sybase Questions"}]},{"@type":"WebSite","@id":"https:\/\/dbtut.com\/#website","url":"https:\/\/dbtut.com\/","name":"Database Tutorials","description":"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux","publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dbtut.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/dbtut.com\/#organization","name":"dbtut","url":"https:\/\/dbtut.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","width":223,"height":36,"caption":"dbtut"},"image":{"@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/dbtut.com\/#\/schema\/person\/6c10f95f66ae2b4026552b02018b18b7","name":"Vaibhav Krishna","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/482ae666004473e37e849efeedbf7111152f716f6e9fc6852074d49536796697?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/482ae666004473e37e849efeedbf7111152f716f6e9fc6852074d49536796697?s=96&d=mm&r=g","caption":"Vaibhav Krishna"},"url":"https:\/\/dbtut.com\/index.php\/author\/vaibhavkrishna\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/1675","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/users\/109"}],"replies":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/comments?post=1675"}],"version-history":[{"count":0,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/1675\/revisions"}],"wp:attachment":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media?parent=1675"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/categories?post=1675"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/tags?post=1675"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}