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

<channel>
	<title>Sybase数据库技术，数据库恢复专家 &#187; corrupt</title>
	<atom:link href="http://www.dbainfo.net/tag/corrupt/feed" rel="self" type="application/rss+xml" />
	<link>https://www.dbainfo.net</link>
	<description>提供Sybase ASE及Sybase SQL Anywhere数据库修复服务，电话：13811580958(微信)，QQ：289965371！We have many years of experience in recovering data from damanged Sybase devices. Contact us by Phone: +86 13811580958 Wechat: 13811580958 Email: 289965371@qq.com</description>
	<lastBuildDate>Sat, 14 Jun 2025 16:28:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>master数据库配置区域(configuration area)损坏的一种修复方法</title>
		<link>https://www.dbainfo.net/one-way-to-recover-master-configuration-area.htm</link>
		<comments>https://www.dbainfo.net/one-way-to-recover-master-configuration-area.htm#comments</comments>
		<pubDate>Thu, 15 Jan 2015 17:03:02 +0000</pubDate>
		<dc:creator>dbainfo</dc:creator>
				<category><![CDATA[Sybase ASE]]></category>
		<category><![CDATA[ASE]]></category>
		<category><![CDATA[ASE V15.0.3]]></category>
		<category><![CDATA[corrupt]]></category>
		<category><![CDATA[非常规恢复]]></category>

		<guid isPermaLink="false">http://www.dbainfo.net/?p=2731</guid>
		<description><![CDATA[本文提供master配置区域损坏的一种修复方法！ Sybase ASE master数据库的前2048字节存储着Sybase数据库服务器的configuration area（配置区域）。如果configuration area corrupt，那么Sybase服务器无法启动。 造成configuration area corrupt的原因一般为硬件故障。通过下面的案例分享configuration area corrupt的一种恢复方法。 背景： 版本：ASE 15.0.3 ESD#3 在通过临时设置参数upgrade version为492来重置sa口令为空时，忘记将upgrade version改回原值 (参考：将Sybase ASE登录sa的密码置为空NULL的方法)。之后重启Sybase服务器时报错： Pre 10.0 database cannot work with this version of the server. Please upgrade the databases to 10.0 or above release and then try to start with this version of the server. Shutting down ***. [...]]]></description>
			<content:encoded><![CDATA[<p>本文提供master配置区域损坏的一种修复方法！</p>
<p>Sybase ASE master数据库的前2048字节存储着Sybase数据库服务器的configuration area（配置区域）。如果configuration area corrupt，那么Sybase服务器无法启动。</p>
<p>造成configuration area corrupt的原因一般为硬件故障。通过下面的案例分享configuration area corrupt的一种恢复方法。</p>
<p><strong>背景：</strong></p>
<p>版本：ASE 15.0.3 ESD#3</p>
<p>在通过临时设置参数upgrade version为492来重置sa口令为空时，忘记将upgrade version改回原值 (参考：<a href="https://www.dbainfo.net/sybase-set-sa-password-to-null.htm" target="_blank">将Sybase ASE登录sa的密码置为空NULL的方法</a>)。之后重启Sybase服务器时报错：</p>
<p>Pre 10.0 database cannot work with this version of the server. Please upgrade the databases to 10.0 or above release and then try to start with this version of the server. Shutting down ***.</p>
<p>ASE配置文件(*.cfg)中大多数情况下不存在参数：upgrade version。在cfg中添加upgrade version=15000后，启动时仍然报上面的master数据库版本低于10.0的错误。</p>
<p>通过比较多个版本的configuration area，发现master数据库的第1805和第1806字节表示upgrade version，15000的十六进制形式为：0x3A98，则将第1805字节改为98，第1806字节改为3A（此处master为linux平台上的数据库）。改为之后启动报错：</p>
<p>The configuration area in device &#39;/home/sybase/data/master.dat&#39; appears to be corrupt. The server cannot continue and will shut down.</p>
<p>看来仅仅修改2个字节的内容无法验证通过，那么<span style="color:#f00;">通过替换master数据库头部2048字节呢？ 我测试是可行的！<span id="more-2731"></span></span></p>
<p><strong>步骤：<br />
	</strong></p>
<p>1、使用相同版本的dataserver(ASE 15.0.3 ESD#3) 创建一个新的master库</p>
<p>dataserver -d /home/sybase/data/new.master.dat -b 51200 -z 4k</p>
<p>页面大小要与源环境相同，master设备大小不必与源环境相同</p>
<p>2、将新master库的configuration area拷贝到文件config_block.out</p>
<p>dd if=new.master.dat&nbsp; of=config_block.out bs=2048 count=1</p>
<p>3、覆盖源环境的master设备的前2048字节内容</p>
<p>dd if=config_block.out&nbsp; of=master.dat bs=2048 count=1 conv=notrunc</p>
<p>一定要加conv=notrunc，这样不会截断master.dat第2048字节后的内容。</p>
<p>4、使用修改后的master.dat成功启动</p>
<p>个人感觉，如果启动Sybase ASE服务器时仅仅报错：The configuration area in device &#39;/home/sybase/data/master.dat&#39; appears to be corrupt. The server cannot continue and will shut down.而没有其它信息，那么使用替换configuration area的方法可行性比较高。</p>
<p>如果在报The configuration area in device &#39;/home/sybase/data/master.dat&#39; appears to be corrupt. The server cannot continue and will shut down.之前还有其他信息，比如：</p>
<p>os_create_region: can&#39;t allocate 37076992 bytes<br />
	kbcreate: couldn&#39;t create kernel region.<br />
	kistartup: could not create shared memory</p>
<p>可能的原因是：操作系统共享内存配置值太低，尤其在Linux平台上。</p>
<p>Linux平台上增加共享内存方法：编辑/etc/sysctl.conf，修改kernel.shmmax值（字节为单位），sysctl -p生效。或者临时设定/proc/sys/kernel/shmmax。</p>
<div style="clear: both; margin: 10px 0pt; border: 1px dashed rgb(153, 153, 153); font-size: 12px; padding: 5px 10px;">
<li>本文链接地址：<a href="https://www.dbainfo.net/one-way-to-recover-master-configuration-area.htm">https://www.dbainfo.net/one-way-to-recover-master-configuration-area.htm</a>；</li>
<li>本文为dbainfo个人原创，请在尊重作者劳动成果的前提下进行转载；</li>
<li>转载务必注明原始出处 : <a href="https://www.dbainfo.net/">Sybase数据库技术，数据库恢复专家</a>；</li>
<li>对《<a href="https://www.dbainfo.net/one-way-to-recover-master-configuration-area.htm">master数据库配置区域(configuration area)损坏的一种修复方法</a>》有何疑问或见解，请在本文下方发表；</li>
<li>对网站还有其他问题或建议，请提交在<a href="https://www.dbainfo.net/messages" target="_blank">留言板</a>，谢谢！</li>
</div>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2013-11-11 -- <a href="https://www.dbainfo.net/ase-15-0-3-for-windows-installation5.htm" title="Sybase ASE 15.0.3 for windows平台安装文档 – 5、安装后的配置工作">Sybase ASE 15.0.3 for windows平台安装文档 – 5、安装后的配置工作</a> (1)</li><li>2013-11-11 -- <a href="https://www.dbainfo.net/ase-15-0-3-for-windows-installation4.htm" title="Sybase ASE 15.0.3 for windows平台安装文档 – 4、安装Sybase数据库服务">Sybase ASE 15.0.3 for windows平台安装文档 – 4、安装Sybase数据库服务</a> (0)</li><li>2013-11-11 -- <a href="https://www.dbainfo.net/ase-15-0-3-for-windows-installation3.htm" title="Sybase ASE 15.0.3 for windows平台安装文档 – 3、升级到 Sybase 15.0.3 ESD #3">Sybase ASE 15.0.3 for windows平台安装文档 – 3、升级到 Sybase 15.0.3 ESD #3</a> (0)</li><li>2013-11-11 -- <a href="https://www.dbainfo.net/ase-15-0-3-for-windows-installation2.htm" title="Sybase ASE 15.0.3 for windows平台安装文档 – 2、安装Sybase ASE程序">Sybase ASE 15.0.3 for windows平台安装文档 – 2、安装Sybase ASE程序</a> (0)</li><li>2013-11-11 -- <a href="https://www.dbainfo.net/ase-15-0-3-for-windows-installation1.htm" title="Sybase ASE 15.0.3 for windows平台安装文档 – 1、安装前的准备工作">Sybase ASE 15.0.3 for windows平台安装文档 – 1、安装前的准备工作</a> (1)</li><li>2013-10-15 -- <a href="https://www.dbainfo.net/ase-xml-introduction.htm" title="ASE中xml服务使用方法简介">ASE中xml服务使用方法简介</a> (0)</li><li>2013-09-16 -- <a href="https://www.dbainfo.net/select-random-rows-from-table.htm" title="ASE从表中随机选择数据的三种方法">ASE从表中随机选择数据的三种方法</a> (0)</li><li>2013-09-08 -- <a href="https://www.dbainfo.net/get-current-running-sql.htm" title="查看ASE v15正在执行的SQL语句内容">查看ASE v15正在执行的SQL语句内容</a> (0)</li><li>2013-06-02 -- <a href="https://www.dbainfo.net/recovery-tools" title="Sybase数据库恢复工具">Sybase数据库恢复工具</a> (0)</li><li>2013-06-02 -- <a href="https://www.dbainfo.net/2120.htm" title=""></a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>https://www.dbainfo.net/one-way-to-recover-master-configuration-area.htm/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
