<?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>Jason L. Froebe - Tech tips and How Tos for Fellow Techies &#187; bug</title>
	<atom:link href="http://froebe.net/blog/index.php/tag/bug/feed/" rel="self" type="application/rss+xml" />
	<link>http://froebe.net/blog</link>
	<description>Tips &#38; Tricks for Databases (Sybase, Oracle, MySQL, PostgreSQL, SQLite), Windows, Linux, Solaris, Perl, Java, Bash and so much much more</description>
	<lastBuildDate>Sat, 07 Jan 2012 22:12:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Upgrading Sybase ASE 12.5.4 -&gt; 15.0.3 esd 4 &amp; bug # 643188</title>
		<link>http://froebe.net/blog/2010/11/26/upgrading-sybase-ase-12-5-4-15-0-3-esd-4-bug-643188/</link>
		<comments>http://froebe.net/blog/2010/11/26/upgrading-sybase-ase-12-5-4-15-0-3-esd-4-bug-643188/#comments</comments>
		<pubDate>Fri, 26 Nov 2010 16:17:13 +0000</pubDate>
		<dc:creator>Jason L Froebe</dc:creator>
				<category><![CDATA[ASE]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[Sybase]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[bug 643188]]></category>
		<category><![CDATA[cr #643188]]></category>
		<category><![CDATA[technical support]]></category>
		<category><![CDATA[workaround]]></category>

		<guid isPermaLink="false">http://froebe.net/blog/?p=1290</guid>
		<description><![CDATA[We&#8217;ve been upgrading a number of Sybase ASE databases from the end-of-life&#8217;d 12.5.x to v15.0.3 esd 4 the last few weeks.   My coworker (Degang He) ran into an interesting error when the upgrade process was failing on sysprocedures. Database &#8216;my_db&#8217;: beginning upgrade step [ID 26]: alter table (table sysprocedures) Command has been aborted. Msg 3461, [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_560" class="wp-caption alignright" style="width: 193px"><a href="http://www.sybase.com"><img class="size-full wp-image-560" title="Sybase, Inc." src="http://froebe.net/blog/wp-content/uploads/2008/07/sybase.png" alt="" width="183" height="74" /></a><p class="wp-caption-text">Sybase</p></div>
<p>We&#8217;ve been upgrading a number of <a href="http://www.sybase.com/ase">Sybase ASE</a> databases from the <a href="http://m.sybase.com/detail?id=1053693">end-of-life&#8217;d 12.5.x</a> to v15.0.3 esd 4 the last few weeks.   My coworker (Degang He) ran into an interesting error when the upgrade process was failing on sysprocedures.</p>
<blockquote><p><em>Database &#8216;my_db&#8217;: beginning upgrade step [ID 26]: alter table (table sysprocedures)<br />
Command has been aborted.</em></p>
<p><em>Msg 3461, Level 20, State 1:<br />
Server &#8216;my_server&#8217;, Line 1:<br />
Database &#8216;my_db&#8217;: upgrade could not install required upgrade item &#8217;26&#8242;. Please refer to previous error messages to determine the problem. Fix the problem, then try again.</em></p>
<p><em>Msg 3451, Level 20, State 1:<br />
Server &#8216;my_server&#8217;, Line 1:<br />
Database &#8216;my_db&#8217;: upgrade has failed for this database. Please refer to previous messages for the cause of the failure, correct the problem and try again.</em></p>
<p><em>Msg 3454, Level 20, State 1:<br />
Server &#8216;my_server&#8217;, Line 1:</em></p>
<p><em>Database &#8216;my_db&#8217;: ASE could not completely upgrade this database; upgrade item 1501 could not be installed.</em></p></blockquote>
<p>We looked on <a href="http://search.sybase.com/search/simple.do">Sybase&#8217;s Solved Cases</a> and <a href="http://www.google.com">Google</a> but didn&#8217;t find anything that would really fit the problem.  So we called up Sybase Technical Support.  <a href="mailto:somdev.sharma@sybase.com">Somdev Sharma</a> of Sybase was able to determine that this was a bug in the ASE 15x codeline and provided a workaround:</p>
<blockquote>
<h3>CR #643188:</h3>
<p>Title Online database failed with 3461 error during upgrade , &#8216;max parallel degree&#8217; &gt;1</p>
<h4>Workaround:</h4>
<p>Before online the database, disable parallel sort via sp_configure &#8216;max parallel degree&#8217;,1</p>
<h4>Sanitized:</h4>
<p>Online database failed with 3461, 3451 and 3454 errors during upgrade sysprocedures table (upgrade  item &#8217;26&#8242;). If &#8216;max parallel degree&#8217; &gt; 1, then please disable parallel sort with sp_configure &#8216;max parallel degree&#8217;, 1.</p></blockquote>
<p>After disabling parallel sort, the database was upgraded successfully.</p>
]]></content:encoded>
			<wfw:commentRss>http://froebe.net/blog/2010/11/26/upgrading-sybase-ase-12-5-4-15-0-3-esd-4-bug-643188/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Received &#8216;Can&#8217;t call method &#8220;value&#8221; on an undefined value at /usr/share/perl5/IO/Uncompress/RawInflate.pm&#8217; on Ubuntu 8.04 Server (Hardy Heron)</title>
		<link>http://froebe.net/blog/2008/07/16/received-cant-call-method-value-on-an-undefined-value-at-usrshareperl5iouncompressrawinflatepm-on-ubuntu-804-server-hardy-heron/</link>
		<comments>http://froebe.net/blog/2008/07/16/received-cant-call-method-value-on-an-undefined-value-at-usrshareperl5iouncompressrawinflatepm-on-ubuntu-804-server-hardy-heron/#comments</comments>
		<pubDate>Thu, 17 Jul 2008 01:50:12 +0000</pubDate>
		<dc:creator>Jason L Froebe</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[aptitude]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[cpan]]></category>
		<category><![CDATA[hardy heron]]></category>
		<category><![CDATA[IO::Compress::zlib::perl]]></category>
		<category><![CDATA[libio-compress-zlib-perl]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[workaround]]></category>

		<guid isPermaLink="false">http://froebe.net/blog/?p=578</guid>
		<description><![CDATA[On my media server, I wanted to set up Perl&#8217;s CPAN but when I ran install Bundle::CPAN, I ctrl-c&#8217;d out of it when I noticed that bzip2 wasn&#8217;t installed.  Silly me.  Soon after I started receiving: Can&#8217;t call method &#8220;value&#8221; on an undefined value at /usr/share/perl5/IO/Uncompress/RawInflate.pm Reinstalling Perl and all the related ubuntu packages doesn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>On my media server, I wanted to set up Perl&#8217;s CPAN but when I ran install Bundle::CPAN, I ctrl-c&#8217;d out of it when I noticed that bzip2 wasn&#8217;t installed.  Silly me.  Soon after I started receiving:</p>
<blockquote><p><strong>Can&#8217;t call method &#8220;value&#8221; on an undefined value at /usr/share/perl5/IO/Uncompress/RawInflate.pm</strong></p></blockquote>
<p>Reinstalling Perl and all the related ubuntu packages doesn&#8217;t fix it, nor does removing the ~root/.cpan dir.  There is an easy workaround though.</p>
<div class="bash dean_ch"><span class="co0"># aptitude remove libcompress-raw-zlib-perl</span><br />
Reading package lists&#8230; Done<br />
Building dependency <span class="kw2">tree</span> &nbsp; &nbsp; &nbsp; <br />
Reading state information&#8230; Done<br />
Reading extended state information &nbsp; &nbsp; &nbsp;<br />
Initializing package states&#8230; Done<br />
Building tag database&#8230; Done &nbsp; &nbsp; &nbsp;<br />
The following packages are BROKEN:<br />
&nbsp; libio-compress-zlib-perl <br />
The following packages have been kept back:<br />
&nbsp; bind9-host dnsutils libbind9-<span class="nu0">30</span> libisccfg30 <br />
The following packages will be REMOVED:<br />
&nbsp; libcompress-raw-zlib-perl <br />
<span class="nu0">0</span> packages upgraded, <span class="nu0">0</span> newly installed, <span class="nu0">1</span> to remove and <span class="nu0">4</span> not upgraded.<br />
Need to get 0B of archives. After unpacking 319kB will be freed.<br />
The following packages have unmet dependencies:<br />
&nbsp; libio-compress-zlib-perl: Depends: libcompress-raw-zlib-perl <span class="br0">&#40;</span><span class="sy0">&gt;</span>= <span class="nu0">2.008</span><span class="br0">&#41;</span> but it is not installable<br />
Resolving dependencies&#8230;<br />
The following actions will resolve these dependencies:</p>
<p>Remove the following packages:<br />
apparmor-utils<br />
libcompress-zlib-perl<br />
libio-compress-zlib-perl<br />
libmp3-tag-perl<br />
librpc-xml-perl<br />
libwww-perl<br />
libxml-parser-perl<br />
ubuntu-standard</p>
<p>Score is <span class="nu0">592</span></p>
<p>Accept this solution? <span class="br0">&#91;</span>Y<span class="sy0">/</span>n<span class="sy0">/</span>q<span class="sy0">/</span>?<span class="br0">&#93;</span> </div>
<p>Make a note of the packages that it will remove, then tell it to go ahead.  It <strong>will</strong> remove these packages!</p>
<p>Start cpan, and type in
<div class="bash dean_ch"><span class="kw2">install</span> Bundle::CPAN</div>
<p>.  When it is complete, reinstall the ubuntu packages that you removed earlier (for example):</p>
<div class="bash dean_ch"><span class="co0"># aptitude install apparmor-utils libcompress-zlib-perl libio-compress-zlib-perl libmp3-tag-perl librpc-xml-perl libwww-perl libxml-parser-perl ubuntu-standard</span></div>
<p>That&#8217;s it. Your cpan is working again <img src='http://froebe.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://froebe.net/blog/2008/07/16/received-cant-call-method-value-on-an-undefined-value-at-usrshareperl5iouncompressrawinflatepm-on-ubuntu-804-server-hardy-heron/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>ASE 15 stored procedure &#8220;sp_tables&#8221; doesn&#8217;t work with SQL UDFs</title>
		<link>http://froebe.net/blog/2008/04/09/ase-15-stored-procedure-sp_tables-doesnt-work-with-sql-udfs/</link>
		<comments>http://froebe.net/blog/2008/04/09/ase-15-stored-procedure-sp_tables-doesnt-work-with-sql-udfs/#comments</comments>
		<pubDate>Wed, 09 Apr 2008 18:52:21 +0000</pubDate>
		<dc:creator>Jason L Froebe</dc:creator>
				<category><![CDATA[ASE]]></category>
		<category><![CDATA[Sybase]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[sp_tables]]></category>
		<category><![CDATA[SQL UDF]]></category>
		<category><![CDATA[stored procedure]]></category>
		<category><![CDATA[udf]]></category>

		<guid isPermaLink="false">http://froebe.net/blog/?p=459</guid>
		<description><![CDATA[The ASE 15 stored procedure sp_tables doesn&#8217;t work with SQL UDFs. sp_tables has the udfs coming back as system tables. repro: 1) create a sql udf in a db 2) run sp_tables, you will see the UDF as a &#8220;SYSTEM TABLE&#8221; DBADEV1.sybase_dba.1&#62; sp_tables; table_qualifier table_owner table_name table_type remarks --------------- ----------- ---------- ---------- ------- sybase_dba dbo [...]]]></description>
			<content:encoded><![CDATA[<p>The ASE 15 stored procedure sp_tables doesn&#8217;t work with SQL UDFs.  sp_tables has the udfs coming back as system tables.</p>
<p>repro:<br />
1) create a sql udf in a db<br />
2) run sp_tables, you will see the UDF as a &#8220;SYSTEM TABLE&#8221;</p>
<p><code> DBADEV1.sybase_dba.1&gt; sp_tables;<br />
table_qualifier table_owner table_name   table_type    remarks<br />
--------------- ----------- ----------   ----------    -------<br />
sybase_dba      dbo         DATE_FORMAT  SYSTEM TABLE  NULL</code></p>
<p>In the above example, the DATE_FORMAT UDF is the one at <a title="Permanent Link to Porting MySQL’s date_format function to Sybase ASE 15.0.2" rel="bookmark" href="http://froebe.net/blog/2007/10/10/porting-mysqls-date_format-function-to-sybase-ase-1502">Porting MySQL’s date_format function to Sybase ASE 15.0.2</a></p>
<p>I&#8217;ve opened a case with Sybase to get this fixed &#8211; I&#8217;ll post the CR # when I get it.</p>
<p><span style="text-decoration: underline;"><strong>UPDATE</strong></span>:  Sybase assigned CR  497173 to this <img src='http://froebe.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://froebe.net/blog/2008/04/09/ase-15-stored-procedure-sp_tables-doesnt-work-with-sql-udfs/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Duplicate rows in sysusers??</title>
		<link>http://froebe.net/blog/2007/12/11/duplicate-rows-in-sysusers/</link>
		<comments>http://froebe.net/blog/2007/12/11/duplicate-rows-in-sysusers/#comments</comments>
		<pubDate>Tue, 11 Dec 2007 22:06:57 +0000</pubDate>
		<dc:creator>Jason L Froebe</dc:creator>
				<category><![CDATA[ASE]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[Sybase]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[corruption]]></category>
		<category><![CDATA[cr 298620]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://froebe.net/blog/2007/12/11/duplicate-rows-in-sysusers/</guid>
		<description><![CDATA[If you&#8217;re like me, you&#8217;ve run into lots of different issues with the Sybase ASE DBMS over the years. Today, Drew Montgomery looked at what happens when the 12.5.x -&#62; 12.5.4 upgrade goes bad: If you receive the 8419 error on sysusers after applying ASE 12.5.4 (or any other upgrade for that matter) such as [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re like me, you&#8217;ve run into lots of different issues with the Sybase ASE DBMS over the years.  Today, Drew Montgomery looked at what happens when the 12.5.x -&gt; 12.5.4 upgrade goes bad:</p>
<p>If you receive the 8419 error on sysusers after applying ASE 12.5.4 (or any other upgrade for that matter)  such as the following:</p>
<blockquote><p>01:00000:00472:2007/12/10 14:46:03.86 server Error: 8419, Severity: 20, State: 3<br />
01:00000:00472:2007/12/10 14:46:03.86 server Could not find index descriptor for objid 10, indid 3 in dbid 13.<br />
01:00000:00472:2007/12/10 14:46:03.88 kernel ************************************<br />
01:00000:00472:2007/12/10 14:46:03.88 kernel SQL causing error : select * from sysusers<br />
01:00000:00472:2007/12/10 14:46:03.88 kernel ************************************<br />
01:00000:00472:2007/12/10 14:46:03.88 server SQL Text: select * from sysusers<br />
01:00000:00472:2007/12/10 14:46:03.89 kernel curdb = 13 tempdb = 9 pstat = 0&#215;10000<br />
01:00000:00472:2007/12/10 14:46:03.89 kernel lasterror = 8419 preverror = 0 transtate = 1</p></blockquote>
<p>Fear not because Drew has you covered with a simple script that will fix the problem.  Note that it involves a dump and load of the affected database but you could just restart the ASE server if you don&#8217;t mind the down time:</p>
<div class="tsql dean_ch"><span class="kw3">sp_configure</span> <span class="st0">&quot;allow updates&quot;</span>, <span class="nu0">1</span><br />
go<br />
<span class="kw1">use</span> db_with_8419<br />
go</p>
<p><span class="kw1">select</span> <span class="sy0">*</span> <span class="kw1">into</span> tempdb..<span class="me1">temp_sysusers</span> <span class="kw1">from</span> sysusers<br />
go</p>
<p><span class="kw1">select</span> uid, cnt<span class="sy0">=</span> <span class="kw2">count</span><span class="br0">&#40;</span><span class="sy0">*</span><span class="br0">&#41;</span> <br />
&nbsp; <span class="kw1">into</span> tempdb..<span class="me1">temp_uid</span> <br />
&nbsp; <span class="kw1">from</span> tempdb..<span class="me1">temp_sysusers</span> <br />
&nbsp;<span class="kw1">group</span> <span class="kw1">by</span> uid <br />
&nbsp;<span class="kw1">having</span> <span class="kw2">count</span><span class="br0">&#40;</span><span class="sy0">*</span><span class="br0">&#41;</span> <span class="sy0">&gt;</span> <span class="nu0">1</span><br />
go</p>
<p><span class="kw1">select</span> s.<span class="me1">uid</span>, s.<span class="me1">suid</span><br />
&nbsp; <span class="kw1">into</span> tempdb..<span class="me1">temp_fixuid</span> <br />
&nbsp; <span class="kw1">from</span> tempdb..<span class="me1">temp_sysusers</span> s, tempdb..<span class="me1">temp_uid</span> t<br />
&nbsp;<span class="kw1">where</span> s.<span class="me1">uid</span> <span class="sy0">=</span> t.<span class="me1">uid</span><br />
go</p>
<p><span class="kw1">select</span> uid, <span class="kw2">min</span><span class="br0">&#40;</span>suid<span class="br0">&#41;</span> suid<br />
&nbsp; <span class="kw1">into</span> tempdb..<span class="me1">temp_rmuid</span><br />
&nbsp; <span class="kw1">from</span> tempdb..<span class="me1">temp_fixuid</span><br />
&nbsp;<span class="kw1">group</span> <span class="kw1">by</span> uid<br />
go</p>
<p><span class="kw1">delete</span> tempdb..<span class="me1">temp_fixuid</span><br />
&nbsp; <span class="kw1">from</span> tempdb..<span class="me1">temp_fixuid</span> f, tempdb..<span class="me1">temp_rmuid</span> r<br />
&nbsp;<span class="kw1">where</span> f.<span class="me1">uid</span> <span class="sy0">=</span> r.<span class="me1">uid</span><br />
&nbsp; &nbsp;and f.<span class="me1">suid</span> <span class="sy0">=</span> r.<span class="me1">suid</span><br />
go</p>
<p><span class="kw1">alter</span> <span class="kw1">table</span> tempdb..<span class="me1">temp_fixuid</span> <span class="kw1">add</span> cntr <span class="kw1">int</span> <span class="kw1">identity</span><br />
go</p>
<p><span class="kw1">declare</span> @max_uid <span class="kw1">int</span><br />
<span class="kw1">select</span> @max_uid <span class="sy0">=</span> <span class="kw2">max</span><span class="br0">&#40;</span>uid<span class="br0">&#41;</span> <br />
&nbsp; <span class="kw1">from</span> tempdb..<span class="me1">temp_sysusers</span><br />
&nbsp;<span class="kw1">where</span> suid <span class="sy0">&gt;</span> <span class="nu0">16300</span></p>
<p><span class="kw1">update</span> sysusers<br />
&nbsp; &nbsp;<span class="kw1">set</span> uid <span class="sy0">=</span> @max_uid <span class="sy0">+</span> cntr<br />
&nbsp; <span class="kw1">from</span> sysusers s, tempdb..<span class="me1">temp_fixuid</span> f<br />
&nbsp;<span class="kw1">where</span> s.<span class="me1">uid</span> <span class="sy0">=</span> f.<span class="me1">uid</span><br />
&nbsp; &nbsp;and s.<span class="me1">suid</span> <span class="sy0">=</span> f.<span class="me1">suid</span><br />
go</p>
<p><span class="kw1">use</span> master<br />
go</p>
<p><span class="kw1">dump</span> <span class="kw1">database</span> db_with_8419 <span class="kw1">to</span> <span class="st0">&quot;compress::N::/DumpLocation/dumpfilename.dmp&quot;</span><br />
go<br />
<span class="kw1">load</span> <span class="kw1">database</span> db_with_8419 <span class="kw1">from</span> <span class="st0">&quot;compress::/DumpLocation/dumpfilename.dmp&quot;</span><br />
go<br />
online <span class="kw1">database</span> db_with_8419<br />
go</p>
<p><span class="kw3">sp_configure</span> <span class="st0">&quot;allow updates&quot;</span>, <span class="nu0">0</span><br />
go</div>
<p>Bau-jen Liu over at Sybase came up with the following method but it does require rebooting ASE twice:</p>
<div class="tsql dean_ch"><span class="kw3">sp_configure</span> <span class="st0">&quot;allow updates&quot;</span>, <span class="nu0">1</span> <br />
go <br />
<span class="kw1">update</span> ..<span class="me1">sysobjects</span> <br />
<span class="kw1">set</span> sysstat <span class="sy0">=</span> <span class="nu0">115</span>, type <span class="sy0">=</span> <span class="st0">&quot;U&quot;</span> <br />
<span class="kw1">where</span> name <span class="sy0">=</span> <span class="st0">&quot;sysusers&quot;</span> <br />
go </div>
<p>Shutdown ASE, reboot, and log back in as a user with sa_role. </p>
<div class="tsql dean_ch"><span class="kw1">use</span> dbname<br />
go </p>
<p><span class="kw1">create</span> <span class="kw1">unique</span> <span class="kw1">index</span> ncsysusers2 <span class="kw1">on</span> sysusers<span class="br0">&#40;</span>uid<span class="br0">&#41;</span> <br />
go </div>
<p>The above CREATE INDEX command may fail due to the presence of duplicate key rows in sysusers. If this occurs, recreate the index as non-unique first: </p>
<div class="tsql dean_ch"><span class="kw1">create</span> <span class="kw1">index</span> ncsysusers2 <span class="kw1">on</span> sysusers<span class="br0">&#40;</span>uid<span class="br0">&#41;</span> <br />
go </div>
<p>Now identify any duplicates that may exist in sysusers: </p>
<div class="tsql dean_ch"><span class="kw1">select</span> uid, name, <span class="kw2">count</span><span class="br0">&#40;</span><span class="sy0">*</span><span class="br0">&#41;</span> <br />
<span class="kw1">from</span> sysusers <br />
<span class="kw1">group</span> <span class="kw1">by</span> uid <br />
<span class="kw1">having</span> <span class="kw2">count</span><span class="br0">&#40;</span><span class="sy0">*</span><span class="br0">&#41;</span> <span class="sy0">&gt;</span> <span class="nu0">1</span> <br />
go </div>
<p>Remove any duplicates found using the DELETE command and try the CREATE INDEX again: </p>
<div class="tsql dean_ch"><span class="kw1">create</span> <span class="kw1">unique</span> <span class="kw1">index</span> ncsysusers2 <span class="kw1">on</span> sysusers<span class="br0">&#40;</span>uid<span class="br0">&#41;</span> <br />
go </div>
<p>Now, clean up after yourself: </p>
<div class="tsql dean_ch"><span class="kw1">update</span> ..<span class="me1">sysobjects</span> <br />
<span class="kw1">set</span> sysstat <span class="sy0">=</span> <span class="nu0">113</span>, type <span class="sy0">=</span> <span class="st0">&quot;S&quot;</span> <br />
<span class="kw1">where</span> name <span class="sy0">=</span> <span class="st0">&quot;sysusers&quot;</span> <br />
go </p>
<p><span class="kw3">sp_configure</span> <span class="st0">&quot;allow updates&quot;</span>, <span class="nu0">0</span> <br />
go</div>
<p>Sybase has created bug # 298620 for this issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://froebe.net/blog/2007/12/11/duplicate-rows-in-sysusers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sybase Replication Server:  Out of Mutexes?  wtf?</title>
		<link>http://froebe.net/blog/2007/12/07/sybase-replication-server-out-of-mutexes-wtf/</link>
		<comments>http://froebe.net/blog/2007/12/07/sybase-replication-server-out-of-mutexes-wtf/#comments</comments>
		<pubDate>Fri, 07 Dec 2007 15:44:21 +0000</pubDate>
		<dc:creator>Jason L Froebe</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Replication Server]]></category>
		<category><![CDATA[Sybase]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[CR485482]]></category>
		<category><![CDATA[pos]]></category>
		<category><![CDATA[repserver]]></category>

		<guid isPermaLink="false">http://froebe.net/blog/2007/12/07/sybase-replication-server-out-of-mutexes-wtf/</guid>
		<description><![CDATA[For those of us that use Sybase&#8217;s Replication Server, we have long ago been pacified into believing that there really isn&#8217;t much that can be done with Replication Server&#8217;s quirks but to endure them. In today&#8217;s edition of the Sybase RepServer Quirks we take a look at the &#8220;out of mutexes&#8221; error.  A mutex is [...]]]></description>
			<content:encoded><![CDATA[<p>For those of us that use Sybase&#8217;s Replication Server, we have long ago been pacified into believing that there really isn&#8217;t much that can be done with Replication Server&#8217;s quirks but to endure them.</p>
<p>In today&#8217;s edition of the Sybase RepServer Quirks we take a look at the &#8220;out of mutexes&#8221; error.  A mutex is an exclusive lock on a resource.  If you receive an error about RepServer running out of mutexes, you just don&#8217;t have enough defined through RepServer.  Simple huh?</p>
<p>Of course it is.  Ahh..  but then how do how many mutexes your particular Sybase RepServer needs?  How many grains of sand are on the moon?  According to Sybase you should know this already but since you can&#8217;t read minds (I hope you can&#8217;t because I&#8217;m thinking of donuts and not RepServer), I&#8217;ll pass on what Sybase is saying when pressed about it (Greg Carter @ Sybase):</p>
<blockquote><p><em><font face="Times" size="3"> &gt; Just to elaborate a bit more on this question of the number of mutexes; as<br />
&gt; you probably know the mutex requirements for RepServer increased<br />
&gt; dramatically with the SMP feature. I have since struggled to come up with a<br />
&gt; formula for estimating mutex requirements so that you may properly set the<br />
&gt; &#8220;num_mutexes&#8221; configuration. While in the latest iteration of this formula<br />
&gt; I have satisfied myself that all mutexes have been accounted for, still the<br />
&gt; estimate it provides seems to fall short in some cases.<br />
&gt;<br />
&gt; Recent investigations by Connectivity seem to indicate that the problem may<br />
&gt; not be with sizing mutex requirements, but rather with sizing message queue<br />
&gt; (&#8220;num_msgqueues&#8221;) requirements. It appears that Open Server may be using<br />
&gt; the total of the settings for &#8220;num_mutexes&#8221; and &#8220;num_msgqueues&#8221; as the<br />
&gt; upper bound for the creation of these two objects together. So it may be<br />
&gt; that even though &#8220;num_mutexes&#8221; has been sized properly, if &#8220;num_msgqueues&#8221;<br />
&gt; is too low then you may see a message regarding the failure to create a<br />
&gt; mutex or the failure to create a message queue depending on which one was<br />
&gt; being created at the time that upper bound was surpassed.<br />
&gt;<br />
&gt; The moral here is that until Open Server resolves this issue you need to<br />
&gt; verify the sizing of both &#8220;num_mutexes&#8221; and &#8220;num_msgqueues&#8221; in the event<br />
&gt; that either error message appears since you can not rely on the message to<br />
&gt; indicate which one is low.<br />
&gt;<br />
&gt; For your convenience I&#8217;ll include here the latest formulas for estimating<br />
&gt; mutex and message queue requirements. Note that the one for mutexes may not<br />
&gt; agree completely with the one that is given in the 12.6 SMP White Paper &#8211; I<br />
&gt; have not compared them.<br />
&gt;<br />
&gt; Mutex requirements for the optimized binary:<br />
&gt; num_mutexes = 75 + Num(partitions) + 4*Num(DSI/S) + 3*Num(DSI/E) +<br />
&gt; 2*Num(Dist) + 2*Num(RepAgent Exec) + 2*Num(RSI User) + 5*Num(Queues) +<br />
&gt; 5*Num(SQT Cache) + Num(rs_subscriptions rows) + Num(RSSD tables) +<br />
&gt; Setting(cm_max_connections) +<br />
&gt; 2*MAX(Admin connections) + 2*Num(Other Connections) + Num(Origins) +<br />
&gt; 2*Num(Threads) + MAX(subscription (de)mat)<br />
&gt;<br />
&gt; Where<br />
&gt; &#8211; &#8220;Other Connections&#8221; are connection to this RepServer including ID Server<br />
&gt; connections, RSM connections, etc.<br />
&gt; &#8211; &#8220;Origins&#8221; are the different origins (or primary databases) that could<br />
&gt; possibly have transactions flowing through this RepServer, whether by a<br />
&gt; RepAgent or by a route (intermediate included)<br />
&gt; &#8211; &#8220;Threads&#8221; includes every thread RepServer may start. These are the<br />
&gt; &#8220;Global&#8221; thread, the &#8220;Initialization&#8221; thread, threads for each of the<br />
&gt; daemons (dAIO, dCM, dVersion, dRec, dSub, dStats, dAlarm), RepAgent User<br />
&gt; threads, SQM Writer threads, SQT threads, Distributor threads, DSI/S and<br />
&gt; DSI/E threads, RSI User and RSI threads.<br />
&gt; &#8211; &#8220;subscription (de)mat&#8221; is the number of asynchronous subscription<br />
&gt; management requests for materializing or dematerializing that may be taking<br />
&gt; place at any moment.<br />
&gt;<br />
&gt; Note: For the diagnostic binary you will need to double the figure<br />
&gt; determined with the above formula.<br />
&gt;<br />
&gt; Message queue requirements for the optimized and diagnostic binary:<br />
&gt; num_msgqueues = 10 + Num(DSI/S) + Num(DSI/E) + Num(Queues) + Num(Dist)<br />
&gt;<br />
&gt; Thanks,<br />
&gt; G.Carter</font> </em></p></blockquote>
<p>Neither this explanation or the two equations are anywhere in the manuals.  I&#8217;ve opened feature request 485482 for RepServer to handle this automagically as there really is NO NEED for a RepServer admin to have to worry about this.  If you are or ever have run into this problem, give Sybase a holler and tell them to fix this bug.</p>
]]></content:encoded>
			<wfw:commentRss>http://froebe.net/blog/2007/12/07/sybase-replication-server-out-of-mutexes-wtf/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Sybase ASE: 17283 error when trying to extend a database segment?</title>
		<link>http://froebe.net/blog/2007/05/04/sybase-ase-17283-error-when-trying-to-extend-a-database-segment/</link>
		<comments>http://froebe.net/blog/2007/05/04/sybase-ase-17283-error-when-trying-to-extend-a-database-segment/#comments</comments>
		<pubDate>Fri, 04 May 2007 15:55:15 +0000</pubDate>
		<dc:creator>Jason L Froebe</dc:creator>
				<category><![CDATA[ASE]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[Sybase]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[tempdb]]></category>

		<guid isPermaLink="false">http://froebe.net/blog/2007/05/04/sybase-ase-17283-error-when-trying-to-extend-a-database-segment/</guid>
		<description><![CDATA[Did you ever receive the error 17283 &#8220;Procedure &#8216;sp_extendsegment&#8217;, Line 182 &#8216;tempdev1&#8242; is reserved exclusively as a log device.&#8221; error? You can get the 17283 error when there is a device fragment that contains only the log segment. Part of the problem is when you extend the log segment onto a device, it will usually [...]]]></description>
			<content:encoded><![CDATA[<p>Did you ever receive the error 17283 &#8220;Procedure &#8216;sp_extendsegment&#8217;, Line 182 &#8216;tempdev1&#8242; is reserved exclusively as a log device.&#8221;  error?  You can get the 17283 error when there is a device fragment that contains only the log segment.  Part of the problem is when you extend the log segment onto a device, it will usually drop all other segments so it becomes &#8216;log only&#8217;.</p>
<p><tt> </tt></p>
<pre><tt> device_fragments               size          usage                created             free kbytes
 ------------------------------ ------------- -------------------- ------------------- ----------------
 master                                8.0 MB data and log         Dec 16 2004  4:09AM             3376
 tempdev1                           1024.0 MB data and log         Dec 16 2004  7:02AM          1044480
 tempdev1                            256.0 MB data and log         Mar  9 2005 10:49AM           261120
 tempdev1                            256.0 MB log only             Mar  9 2005 10:54AM not applicable
 tempdev1                            488.0 MB data and log         Mar  9 2005 12:10PM           497760
 tempdev1                            256.0 MB data and log         Mar 11 2005  2:03PM           261120
 tempdev1                            244.0 MB data and log         Mar 11 2005  3:09PM           248880
 tempdev1                            200.0 MB data and log         Jun  1 2005 12:33PM           204000
 tempdev1                            200.0 MB data and log         Jul  8 2005  2:55PM           203808
 tempdev1                            200.0 MB data and log         Jul 21 2005  2:54PM           204000
 tempdev1                           1000.0 MB data and log         Feb  6 2006  1:11PM          1020000
</tt></pre>
<p>So, how to fix this?  Well, Sybase doesn&#8217;t provide any way to do so without modifying the system tables.</p>
<div class="tsql dean_ch"><span class="kw1">use</span> master<br />
<span class="kw1">exec</span> <span class="kw3">sp_configure</span> <span class="st0">&quot;allow updates&quot;</span>, <span class="nu0">1</span><br />
go<br />
<span class="kw1">begin</span> <span class="kw1">tran</span><br />
go<br />
<span class="co1">&#8211; since we are dealing with tempdb and we want data and log on all the device fragments, we can make a blanket update. &nbsp;We would make the update more selective if we had other requirements (update only one row or something)</span><br />
<span class="kw1">update</span> sysusages <span class="kw1">set</span> segmap <span class="sy0">=</span> <span class="nu0">7</span> <span class="kw1">where</span> dbid <span class="sy0">=</span> <span class="kw2">db_id</span><span class="br0">&#40;</span><span class="st0">&quot;tempdb&quot;</span><span class="br0">&#41;</span><br />
go<br />
<span class="co1">&#8211; if the number of rows updated exceed the number of rows for the database, issue a &#8216;rollback&#8217;</span><br />
<span class="kw1">select</span> segmap <span class="kw1">from</span> sysusages <span class="kw1">where</span> dbid <span class="sy0">=</span> <span class="kw2">db_id</span><span class="br0">&#40;</span><span class="st0">&quot;tempdb&quot;</span><span class="br0">&#41;</span><br />
go<br />
<span class="co1">&#8211; all good? &nbsp;if so, issue a &#8216;commit&#8217;</span><br />
<span class="kw1">commit</span> <span class="kw1">tran</span><br />
go<br />
<span class="kw1">exec</span> <span class="kw3">sp_configure</span> <span class="st0">&quot;allow updates&quot;</span>, <span class="nu0">0</span><br />
go<br />
<span class="co1">&#8211; Now that the system table is updated, we need to refresh the dbtable memory structure so that the changes we made become &#8216;live&#8217;</span><br />
<span class="kw1">dbcc</span> dbrepair<span class="br0">&#40;</span>tempdb, remap<span class="br0">&#41;</span><br />
go</div>
<p>That&#8217;s it!   It&#8217;s fixed and running with the segmaps <strong>without having to restart ASE</strong>.  Wasn&#8217;t that easy?</p>
]]></content:encoded>
			<wfw:commentRss>http://froebe.net/blog/2007/05/04/sybase-ase-17283-error-when-trying-to-extend-a-database-segment/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ASE 12.5.x (64bit) and ASE 15 fail to start using GLIBC</title>
		<link>http://froebe.net/blog/2006/12/11/ase-125x-64bit-and-ase-15-fail-to-start-using-glibc/</link>
		<comments>http://froebe.net/blog/2006/12/11/ase-125x-64bit-and-ase-15-fail-to-start-using-glibc/#comments</comments>
		<pubDate>Mon, 11 Dec 2006 21:23:57 +0000</pubDate>
		<dc:creator>Jason L Froebe</dc:creator>
				<category><![CDATA[ASE]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[Sybase]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[glibc]]></category>
		<category><![CDATA[LD_POINTER_GUARD]]></category>

		<guid isPermaLink="false">http://froebe.net/blog/2006/12/11/ase-125x-64bit-and-ase-15-fail-to-start-using-glibc/</guid>
		<description><![CDATA[If you are going to be using ASE 12.5 or ASE 15 with the upcoming Red Hat Enterprise Linux 5.0, there are two CRs that you need to know about: CR 450004 &#8211; XP Server and Backupserver (64bit) CR 432482 &#8211; ASE 15 The problem is the result of using the jmp() and longjmp() functions [...]]]></description>
			<content:encoded><![CDATA[<p>If you are going to be using ASE 12.5 or ASE 15 with the upcoming Red Hat Enterprise Linux 5.0, there are two CRs that you need to know about:</p>
<ol>
<li>CR 450004 &#8211; XP Server and Backupserver (64bit)</li>
<li>CR 432482 &#8211; ASE 15</li>
</ol>
<p>The problem is the result of using the jmp() and longjmp() functions in the GNU C Library version 2.4 (glibc 2.4).</p>
<blockquote><p>setjmp() and longjmp() are useful for dealing with errors and interrupts encountered in a low-level subroutine of a program. setjmp() saves the stack context/environment in env for later use by longjmp(). The stack context will be invalidated if the function which called setjmp() returns.</p></blockquote>
<p>Starting in glibc 2.4, the jmpbuf is unavailable due to a security exploit known for several years.  Restricting access to the jmpbuf was an effort by the glibc maintainers to &#8216;close this hole&#8217; by forcing the application writers to use the sigsetjmp() and siglongjmp() instead.</p>
<p>The problem with using sigsetjmp() and siglongjmp() is that they aren&#8217;t thread safe.  This is supposed to be fixed in glibc 2.6 according to a contact at Sybase but Sybase *does* have a workaround for this issue and will be putting it into the ASE v15 codeline when they perform the RHEL 5 certification sometime next year.</p>
<p>I wasn&#8217;t able to find much information the supposed <em>exploit</em>.  I only found a few newsgroup posts that didn&#8217;t provide any details.</p>
<p><span id="more-73"></span></p>
<p><a href="http://www.peppler.org/">Michael Peppler</a> maintains the <a href="http://www.peppler.org/FAQ/linux.html">ASE on Linux FAQ</a>.  It contains a workaround for various distributions of Linux:</p>
<h4><a href="http://www.peppler.org/FAQ/linux.html#q1.25">Installing/Running ASE on systems with glibc 2.4.x (Fedora Core 5, etc)</a></h4>
<p>ASE (12.5.x, 15.x) will not run on a system with glibc 2.4.x (that&#8217;s Fedora Core 5 and later, among others). Here is a work-around, supplied by &#8220;Chris&#8221; in sybase.public.ase.linux:</p>
<p>Symptoms of the problem are ASE&#8217;s failing to build when you run the installer, or &#8220;Segmentation Fault&#8221; when trying to start an ASE instance. The Seg Fault happens right after Engine ) is brought online in the error log.<br />
<strong>If you are running Fedora Core 5 or 6</strong><br />
You will need to set the environment variable LD_POINTER_GUARD to 0, in your sybase .profile, as follows:</p>
<pre>export LD_POINTER_GUARD=0</pre>
<p>Alternatively, just export this from the shell. If you haven&#8217;t built any ASE&#8217;s yet, you&#8217;ll need to export this before running the installer, otherwise ASE will fail to build. If you are trying to boot an already installed ASE, then put it in your .profile / .bash_profile or export it as an environment variable before starting ASE.<br />
<strong>If you are running Ubuntu / Kubuntu &#8220;Edgy&#8221;</strong><br />
You will need to set the environment variable LD_POINTER_GUARD to 1 in your sybase .profile, as follows:</p>
<pre>export LD_POINTER_GUARD=1</pre>
<p>I googled around a bit trying to find out what the LD_POINTER_GUARD thingie did and ran across a posting / blog where it talked about insome glibc versions it&#8217;s backwards &#8230; RedHat just made a change I guess and that&#8217;s why you have to set it to &#8220;0&#8243; for Fedora and &#8220;1&#8243; for Ubuntu / Kubuntu / Debian (glibc 2.4). Same info applies if you are building a new ASE.<br />
<strong>If you are running Suse 10.1</strong> You will need to set the environment variable LD_POINTER_GUARD to 1 in your sybase .profile, as follows:</p>
<pre>export LD_POINTER_GUARD=1</pre>
<p>Same discussion as for Ubuntu.<br />
I&#8217;ve tried all of the above they all work with the workaround listed. Happy ASE-ing! I&#8217;ve tested all of the above distros (sorry it took me so long, was on the road a lot over the last several weeks) and they allow ASE to boot; the workaround should be valid for ASE 15.x and 12.x (prolly even for 11.x if you wanted to try).</p>
<p><strong>UPDATE: </strong>Workaround for all current versions of ASE at http://froebe.net/blog/2008/06/26/how-to-install-and-run-sybase-adaptive-server-enterprise-1254-and-150x-on-ubuntu-linux-804-jeos-hardy-heron-using-chroot-environment/</p>
]]></content:encoded>
			<wfw:commentRss>http://froebe.net/blog/2006/12/11/ase-125x-64bit-and-ase-15-fail-to-start-using-glibc/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

