sql-server 的master 資料庫無法restore,message 'must be used in single user mode' 但是我打開其properties ,其選項'single user mode' 卻是反白無法點選.請問如何處理?<br>
手冊要看呀! 要 restore master database,必須在 DOS prompt 下啟動 SQL Server 進入 single user mode。指令是 sqlservr.exe -m
sqlservr.exe -m已經執行了,但是restore 時卻出現 " can't drop the database master because it is a system database.drop the database and reissue the RESTORE DATABASE statement. Backup or restore operation terminiating abnormally. " 的訊息,請問如何處理?
你是什麼原因要 restore master database? 如果是 master database 損毀,你要先 rebuild 才能 restore。
因為新購一台主機,sql-server的login user與資料皆要與原主機一樣, 所以想先把原主機的master and 其他database backup,再至另一台 主機restore,以保持login user與資料皆與原主機一樣,所以要 restore master database
那我就不知道為何會發生你說的問題了。我查了 SQL 7 的線上手冊,也沒提到你說的錯誤訊息。如果再有問題就只好問 Microsoft 了。
1. Stop MSSQLServer & SQLServerAgent two services from Control Panel. 2. c:\mssql7\binn\sqlservr -f 3. From Query Analyzer: restore database master from disk='????.bak' (after doing step3, the SQL Server stop automatically.) 4. Start MSSQLServer service from Control Panel. 5. Continue to restore msdb and other user dbs. Good Luck! George.