如何恢復(fù)master數(shù)據(jù)庫
master數(shù)據(jù)庫的恢復(fù)是很多人都不太了解的,除非是特別專業(yè)的人士,下文中為大家講解的master數(shù)據(jù)庫的恢復(fù)代碼很多,希望大家能夠深入的去學(xué)習(xí),相信大家通過下文的學(xué)習(xí)一定都能夠掌握master數(shù)據(jù)庫的恢復(fù)方法。
ASE can't setup and has no valid dump of master
1、編輯RUN_servername
在命令行最后加入:-T3607
2、單用戶模式啟動ASE
$cd install
$startserver -f RUN_servername -m
3、bcp out系統(tǒng)表
$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
4、shutdownASE
5、創(chuàng)建新master設(shè)備
$buildmaster -d<path_to_new_master_device> -s<new_master_device_size>
(new_master_device_size以2K為單位)
6、編輯RUN_servername
將指定master設(shè)備指定為新創(chuàng)建的master設(shè)備,并刪除在第1步中增加的參數(shù)。
7、刪除/directory.spec/dbs、/directory.spec/usages文件中有關(guān)master、tempdb、model的內(nèi)容。
8、單用戶模式啟動ASE
$cd install
$startserver -f RUN_servername -m
9、 bcp in系統(tǒng)表
$ 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
10、重啟ASE
11、執(zhí)行installmaster腳本
$isql -Usa -P < $SYBASE/scripts/installmaster
關(guān)于如何恢復(fù)master數(shù)據(jù)庫的知識就為大家講解到這里,如果大家對這方面的知識比較感興趣,在以后我還會繼續(xù)為大家講解更多更深的知識點(diǎn),希望對大家能夠有所幫助。