4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Accessの破損したmdbファイルを修復する

Posted at

先生!mdbファイルさんが息してません :innocent:

リンク サーバー "xxx" の OLE DB プロバイダー "Microsoft.ACE.OLEDB.12.0" のデータ ソース オブジェクトを初期化できません。
リンク サーバー "xxx" の OLE DB プロバイダー "Microsoft.ACE.OLEDB.12.0" から、メッセージ "データベースの形式 'xxx' を認識できません。" が返されました。 (Microsoft SQL Server、エラー: 7303)

oh...
なんでmdbすぐ死んでしまうん?

心肺蘇生じゃ :heartpulse:

PowerShell
$dao = new-object -comobject DAO.DBEngine.120
$dao.CompactDatabase("broken.mdb","relieved.mdb")

DBEngine.CompactDatabase メソッド (DAO)

教訓

  • Accessのデータベースファイルの突然死はよくあること。
  • 今回は無事修復できたからよかったものの...定期的にバックアップを取ろう。
  • 深夜の妙なテンションで記事を書いてはいけない。
4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?