【转帖】如何恢复master数据库
<b>ASE can't setup and has no valid dump of master</b><BLOCKQUOTE>
<DIV align=left>
<P><FONT color=#006633>1、编辑RUN_servername</FONT>
在命令行最后加入:-T3607</P>
<P><FONT color=#006633>2、单用户模式启动ASE</FONT>
$cd install
$startserver -f RUN_servername -m</P>
<P><FONT color=#006633>3、bcp out系统表</FONT>
$bcp master..sysdevices out /directory.spec/devs -Usa -P -c
$bcp master..sysdatabases out /directory.spec/dbs -Usa -P -c
$bcp master..sysusages out /directory.spec/usages -Usa -P -c
$bcp master..syslogins out /directory.spec/logins -Usa -P -c
$bcp master..sysconfigures out /directory.spec/configures -Usa -P -c
$bcp master..syscharsets out /directory.spec/charsets -Usa -P -c</P>
<P><FONT color=#006633>4、shutdownASE</FONT></P>
<P><FONT color=#006633>5、创建新master设备
</FONT>$buildmaster -d<path_to_new_master_device> -s<new_master_device_size>
(new_master_device_size以2K为单位)</P>
<P><FONT color=#006633>6、编辑RUN_servername
</FONT>将指定master设备指定为新创建的master设备,并删除在第1步中增加的参数。</P>
<P><FONT color=#006633>7、删除/directory.spec/dbs、/directory.spec/usages文件中有关master、tempdb、model的内容。</FONT></P>
<P><FONT color=#006633>8、单用户模式启动ASE
</FONT>$cd install
$startserver -f RUN_servername -m</P>
<P><FONT color=#006633>9、 bcp in系统表
</FONT>$ bcp master..sysdevices in /directory.spec/devs -Usa -P -b 1 -c
$bcp master..sysdatabases in /directory.spec/dbs -Usa -P -b 1 -c
$bcp master..sysusages in /directory.spec/usages -Usa -P -b 1 -c
$bcp master..syslogins in /directory.spec/logins -Usa -P -b 1 -c
$bcp master..sysconfigures in /directory.spec/configures -Usa -P -b 1 -c
$bcp master..syscharsets in /directory.spec/charsets -Usa -P -b 1 -c</P>
<P><FONT color=#006633>10、重启ASE</FONT></P>
<P><FONT color=#006633>11、执行installmaster脚本
</FONT>$isql -Usa -P < $SYBASE/scripts/installmaster</P></DIV></BLOCKQUOTE>
页:
[1]