"No","テストID","対象ファイル","対象クラス/関数","対象メソッド","テスト観点","テストケース名","前提条件","入力値","期待結果","優先度","備考"
"1","UT-DBR-001","sp_DatabaseRestore.sql","sp_DatabaseRestore","パラメータ検証","正常系","@Helpパラメータが1の場合ヘルプメッセージが表示されること","プロシージャが存在","@Help = 1","ヘルプメッセージが出力され、処理が終了する","低","ヘルプ機能の確認"
"2","UT-DBR-002","sp_DatabaseRestore.sql","sp_DatabaseRestore","パラメータ検証","正常系","@VersionCheckModeが1の場合バージョン情報のみ返却されること","プロシージャが存在","@VersionCheckMode = 1","@Versionと@VersionDateが設定され、即座にRETURN","低","バージョンチェック機能"
"3","UT-DBR-003","sp_DatabaseRestore.sql","sp_DatabaseRestore","パラメータ検証","異常系","SQL Server 2008未満の場合エラーが発生すること","SQL Server 2005環境","@Database = 'TestDB'","エラーメッセージ「Sorry, DatabaseRestore doesn't work on versions of SQL prior to 2008.」","高","バージョンチェック"
"4","UT-DBR-004","sp_DatabaseRestore.sql","sp_DatabaseRestore","パラメータ検証","異常系","CommandExecuteプロシージャが存在しない場合エラーが発生すること","CommandExecuteが未インストール","@Database = 'TestDB'","エラーメッセージ「DatabaseRestore requires the CommandExecute stored procedure...」","高","依存関係チェック"
"5","UT-DBR-005","sp_DatabaseRestore.sql","sp_DatabaseRestore","パラメータ検証","異常系","@MaxTransferSizeが4194304を超える場合警告が発生すること","なし","@MaxTransferSize = 5000000","警告メッセージ「@MaxTransferSize can not be greater then 4194304」","中","パラメータ範囲チェック"
"6","UT-DBR-006","sp_DatabaseRestore.sql","sp_DatabaseRestore","パラメータ検証","異常系","@MaxTransferSizeが65536の倍数でない場合警告が発生すること","なし","@MaxTransferSize = 100000","警告メッセージ「@MaxTransferSize has to be a multiple of 65536」","中","パラメータ整合性チェック"
"7","UT-DBR-007","sp_DatabaseRestore.sql","sp_DatabaseRestore","パラメータ検証","異常系","@BlockSizeが無効な値の場合警告が発生すること","なし","@BlockSize = 1000","警告メッセージ「Supported values for @BlockSize are 512, 1024, ...」","中","パラメータ値チェック"
"8","UT-DBR-008","sp_DatabaseRestore.sql","sp_DatabaseRestore","パラメータ検証","正常系","@BlockSizeが有効な値（512, 1024, 2048等）の場合正常に処理されること","なし","@BlockSize = 1024","エラーなしで処理継続","中","有効なBlockSize値"
"9","UT-DBR-009","sp_DatabaseRestore.sql","sp_DatabaseRestore","パス補正","正常系","@BackupPathFullの末尾にバックスラッシュがない場合自動補完されること","なし","@BackupPathFull = 'D:\Backup\FULL'","@BackupPathFullが'D:\Backup\FULL\'に補正される","中","パス正規化"
"10","UT-DBR-010","sp_DatabaseRestore.sql","sp_DatabaseRestore","パス補正","正常系","@BackupPathFullの末尾にスラッシュがない場合自動補完されること（URL形式）","なし","@BackupPathFull = '\\\\server/share/FULL'","@BackupPathFullが'\\\\server/share/FULL/'に補正される","中","URLパス正規化"
"11","UT-DBR-011","sp_DatabaseRestore.sql","sp_DatabaseRestore","パス補正","正常系","@BackupPathDiffの末尾にバックスラッシュがない場合自動補完されること","なし","@BackupPathDiff = 'D:\Backup\DIFF'","@BackupPathDiffが'D:\Backup\DIFF\'に補正される","中","差分パス正規化"
"12","UT-DBR-012","sp_DatabaseRestore.sql","sp_DatabaseRestore","パス補正","正常系","@BackupPathLogの末尾にバックスラッシュがない場合自動補完されること","なし","@BackupPathLog = 'D:\Backup\LOG'","@BackupPathLogが'D:\Backup\LOG\'に補正される","中","ログパス正規化"
"13","UT-DBR-013","sp_DatabaseRestore.sql","sp_DatabaseRestore","パス補正","正常系","@MoveDataDriveがNULLの場合デフォルトデータパスが使用されること","なし","@MoveDataDrive = NULL, @MoveFiles = 1","InstanceDefaultDataPathが使用される","中","デフォルトパス設定"
"14","UT-DBR-014","sp_DatabaseRestore.sql","sp_DatabaseRestore","パス補正","正常系","@MoveLogDriveがNULLの場合デフォルトログパスが使用されること","なし","@MoveLogDrive = NULL, @MoveFiles = 1","InstanceDefaultLogPathが使用される","中","デフォルトログパス設定"
"15","UT-DBR-015","sp_DatabaseRestore.sql","sp_DatabaseRestore","パス補正","正常系","@MoveFilestreamDriveがNULLの場合デフォルトデータパスが使用されること","なし","@MoveFilestreamDrive = NULL, @MoveFiles = 1","InstanceDefaultDataPathが使用される","低","Filestreamデフォルト"
"16","UT-DBR-016","sp_DatabaseRestore.sql","sp_DatabaseRestore","パス補正","正常系","@MoveFullTextCatalogDriveがNULLの場合デフォルトデータパスが使用されること","なし","@MoveFullTextCatalogDrive = NULL, @MoveFiles = 1","InstanceDefaultDataPathが使用される","低","FullTextカタログデフォルト"
"17","UT-DBR-017","sp_DatabaseRestore.sql","sp_DatabaseRestore","パス補正","正常系","@FileExtensionDiffにドットが含まれる場合削除されること","なし","@FileExtensionDiff = '.dif'","@FileExtensionDiffが'dif'に補正される","中","拡張子正規化"
"18","UT-DBR-018","sp_DatabaseRestore.sql","sp_DatabaseRestore","データベース名処理","正常系","@RestoreDatabaseNameがNULLの場合@Databaseが使用されること","なし","@Database = 'TestDB', @RestoreDatabaseName = NULL","@RestoreDatabaseNameが'TestDB'に設定される","高","デフォルト復元先"
"19","UT-DBR-019","sp_DatabaseRestore.sql","sp_DatabaseRestore","データベース名処理","正常系","@RestoreDatabaseNameが空文字の場合@Databaseが使用されること","なし","@Database = 'TestDB', @RestoreDatabaseName = ''","@RestoreDatabaseNameが'TestDB'に設定される","中","空文字処理"
"20","UT-DBR-020","sp_DatabaseRestore.sql","sp_DatabaseRestore","データベース名処理","正常系","@RestoreDatabaseNameが指定された場合その名前で復元されること","なし","@Database = 'SourceDB', @RestoreDatabaseName = 'TargetDB'","データベースがTargetDBとして復元される","高","別名復元"
"21","UT-DBR-021","sp_DatabaseRestore.sql","sp_DatabaseRestore","フォルダ列挙","正常系","xp_cmdshellが無効な場合xp_dirtreeが使用されること","xp_cmdshell無効","@SimpleFolderEnumeration = 0","@SimpleFolderEnumerationが1に設定される","中","フォールバック機能"
"22","UT-DBR-022","sp_DatabaseRestore.sql","sp_DatabaseRestore","フォルダ列挙","正常系","@SimpleFolderEnumeration=1の場合xp_dirtreeでファイル列挙されること","なし","@SimpleFolderEnumeration = 1","xp_dirtreeを使用してバックアップファイルが列挙される","中","ディレクトリ列挙方式"
"23","UT-DBR-023","sp_DatabaseRestore.sql","sp_DatabaseRestore","バックアップファイル検索","異常系","フルバックアップパスが存在しない場合エラーが発生すること","なし","@BackupPathFull = 'D:\NonExistent\'","エラーメッセージ「(FULL) No rows or bad value for path」","高","パス存在確認"
"24","UT-DBR-024","sp_DatabaseRestore.sql","sp_DatabaseRestore","バックアップファイル検索","異常系","フルバックアップパスへのアクセスが拒否された場合エラーが発生すること","権限なし","@BackupPathFull = 'D:\Restricted\'","エラーメッセージ「(FULL) Access is denied to」","高","アクセス権チェック"
"25","UT-DBR-025","sp_DatabaseRestore.sql","sp_DatabaseRestore","バックアップファイル検索","異常系","フルバックアップディレクトリが空の場合エラーが発生すること","空ディレクトリ","@BackupPathFull = 'D:\Empty\'","エラーメッセージ「(FULL) Empty directory」","中","空ディレクトリチェック"
"26","UT-DBR-026","sp_DatabaseRestore.sql","sp_DatabaseRestore","バックアップファイル検索","異常系","認証エラーの場合エラーが発生すること","ネットワークパス","@BackupPathFull = '\\\\server\share\'","エラーメッセージ「(FULL) Incorrect user name or password」","高","認証エラーチェック"
"27","UT-DBR-027","sp_DatabaseRestore.sql","sp_DatabaseRestore","バックアップファイル検索","異常系","指定データベースのバックアップが見つからない場合エラーが発生すること","バックアップなし","@Database = 'NonExistentDB', @BackupPathFull = 'D:\Backup\'","エラーメッセージ「No backups for ""NonExistentDB"" found in」","高","バックアップ不在"
"28","UT-DBR-028","sp_DatabaseRestore.sql","sp_DatabaseRestore","バックアップファイル検索","異常系","バックアップファイルがデータベース名と一致しない場合エラーが発生すること","ファイル名不一致","@Database = 'TestDB'（異なるDBのバックアップ）","エラーメッセージ「Backupfile does not match @Database parameter」","高","ファイル整合性チェック"
"29","UT-DBR-029","sp_DatabaseRestore.sql","sp_DatabaseRestore","バックアップファイル検索","正常系","カンマ区切りの複数パスからファイルが検索されること","複数パス存在","@BackupPathFull = 'D:\Backup1\,D:\Backup2\'","両方のパスからバックアップファイルが検索される","中","分散バックアップ対応"
"30","UT-DBR-030","sp_DatabaseRestore.sql","sp_DatabaseRestore","フル復元","正常系","フルバックアップが正常に復元されること","バックアップファイル存在","@Database = 'TestDB', @BackupPathFull = 'D:\Backup\FULL\', @ContinueLogs = 0","RESTORE DATABASE文が実行される","高","基本復元機能"
"31","UT-DBR-031","sp_DatabaseRestore.sql","sp_DatabaseRestore","フル復元","正常系","分割バックアップが正常に復元されること","複数の分割ファイル存在","@Database = 'TestDB'（_1.bak, _2.bak形式）","複数DISKを指定したRESTORE DATABASE文が実行される","高","ストライプバックアップ対応"
"32","UT-DBR-032","sp_DatabaseRestore.sql","sp_DatabaseRestore","フル復元","正常系","@MoveFiles=1の場合MOVEオプションが生成されること","なし","@MoveFiles = 1, @MoveDataDrive = 'E:\Data\'","RESTORE文にMOVEオプションが含まれる","高","ファイル移動"
"33","UT-DBR-033","sp_DatabaseRestore.sql","sp_DatabaseRestore","フル復元","正常系","@StandbyMode=1かつ@StandbyUndoPath指定時STANDBYオプションが生成されること","なし","@StandbyMode = 1, @StandbyUndoPath = 'D:\Standby\'","RESTORE文にSTANDBYオプションが含まれる","中","スタンバイモード"
"34","UT-DBR-034","sp_DatabaseRestore.sql","sp_DatabaseRestore","フル復元","正常系","@StandbyMode=1で@StandbyUndoPathがNULLの場合警告が表示されること","なし","@StandbyMode = 1, @StandbyUndoPath = NULL","警告メッセージ「The file path of the undo file for standby mode was not specified」","中","スタンバイパス未指定警告"
"35","UT-DBR-035","sp_DatabaseRestore.sql","sp_DatabaseRestore","フル復元","正常系","@BufferCountが指定された場合バックアップパラメータに含まれること","なし","@BufferCount = 50","RESTORE文にBufferCount=50が含まれる","低","バッファカウント指定"
"36","UT-DBR-036","sp_DatabaseRestore.sql","sp_DatabaseRestore","既存DB処理","正常系","@ExistingDBAction=1の場合SINGLE_USERが設定されること","既存DB存在","@ExistingDBAction = 1","ALTER DATABASE SET SINGLE_USER文が実行される","高","シングルユーザーモード"
"37","UT-DBR-037","sp_DatabaseRestore.sql","sp_DatabaseRestore","既存DB処理","正常系","@ExistingDBAction=2の場合接続がKILLされること","既存DB存在、接続あり","@ExistingDBAction = 2","KILL文が実行される","高","接続強制切断"
"38","UT-DBR-038","sp_DatabaseRestore.sql","sp_DatabaseRestore","既存DB処理","正常系","@ExistingDBAction=3の場合データベースがDROPされること","既存DB存在","@ExistingDBAction = 3","DROP DATABASE文が実行される","高","データベース削除"
"39","UT-DBR-039","sp_DatabaseRestore.sql","sp_DatabaseRestore","既存DB処理","正常系","@ExistingDBAction=4の場合データベースがOFFLINEにされること","既存DB存在","@ExistingDBAction = 4","ALTER DATABASE SET OFFLINE文が実行される","中","オフライン設定"
"40","UT-DBR-040","sp_DatabaseRestore.sql","sp_DatabaseRestore","既存DB処理","正常系","復元対象DBが存在しない場合@ExistingDBAction>0でも警告のみ出力されること","既存DBなし","@ExistingDBAction = 1, @RestoreDatabaseName = 'NewDB'","警告メッセージ「@ExistingDBAction > 0, but no existing @RestoreDatabaseName」","中","存在しないDB処理"
"41","UT-DBR-041","sp_DatabaseRestore.sql","sp_DatabaseRestore","既存DB処理","正常系","データベースがRESTORING状態の場合SINGLE_USERをスキップすること","DB状態=RESTORING","@ExistingDBAction = 1","SINGLE_USER設定がスキップされる","中","RESTORING状態処理"
"42","UT-DBR-042","sp_DatabaseRestore.sql","sp_DatabaseRestore","差分復元","正常系","差分バックアップが正常に復元されること","差分バックアップ存在","@RestoreDiff = 1, @BackupPathDiff = 'D:\Backup\DIFF\'","RESTORE DATABASE文（差分）が実行される","高","差分復元機能"
"43","UT-DBR-043","sp_DatabaseRestore.sql","sp_DatabaseRestore","差分復元","正常系","@FileExtensionDiffがNULLの場合'bak'が使用されること","なし","@FileExtensionDiff = NULL, @RestoreDiff = 1","拡張子'.bak'で差分ファイルが検索される","中","デフォルト拡張子"
"44","UT-DBR-044","sp_DatabaseRestore.sql","sp_DatabaseRestore","差分復元","正常系","差分バックアップのカスタム拡張子が正しく処理されること","なし","@FileExtensionDiff = 'dif', @RestoreDiff = 1","拡張子'.dif'で差分ファイルが検索される","中","カスタム拡張子"
"45","UT-DBR-045","sp_DatabaseRestore.sql","sp_DatabaseRestore","差分復元","異常系","差分パスが存在しない場合エラーが発生すること","なし","@BackupPathDiff = 'D:\NonExistent\'","エラーメッセージ「(DIFF) Bad value for path」","高","差分パス確認"
"46","UT-DBR-046","sp_DatabaseRestore.sql","sp_DatabaseRestore","差分復元","異常系","差分パスへのアクセス拒否でエラーが発生すること","権限なし","@BackupPathDiff = 'D:\Restricted\'","エラーメッセージ「(DIFF) Access is denied to」","高","差分アクセス権"
"47","UT-DBR-047","sp_DatabaseRestore.sql","sp_DatabaseRestore","差分復元","正常系","差分がフルより古い場合差分復元がスキップされること","差分が古い","@RestoreDiff = 1（差分がフルより古い）","差分復元がスキップされ、@DiffLastLSN=@FullLastLSNとなる","中","LSN比較ロジック"
"48","UT-DBR-048","sp_DatabaseRestore.sql","sp_DatabaseRestore","ログ復元","正常系","ログバックアップが正常に復元されること","ログバックアップ存在","@BackupPathLog = 'D:\Backup\LOG\'","RESTORE LOG文が実行される","高","ログ復元機能"
"49","UT-DBR-049","sp_DatabaseRestore.sql","sp_DatabaseRestore","ログ復元","正常系","@ContinueLogs=1の場合既存DBのLSNから継続復元されること","DBがRESTORING状態","@ContinueLogs = 1","redo_start_lsnから適用可能なログが復元される","高","ログ継続復元"
"50","UT-DBR-050","sp_DatabaseRestore.sql","sp_DatabaseRestore","ログ復元","正常系","@StopAt指定時にSTOPATオプションが生成されること","なし","@StopAt = '20231215120000'","RESTORE LOG文にSTOPATオプションが含まれる","高","ポイントインタイム復旧"
"51","UT-DBR-051","sp_DatabaseRestore.sql","sp_DatabaseRestore","ログ復元","異常系","@StopAtが14桁でない場合エラーが発生すること","なし","@StopAt = '2023121512'","エラーメッセージ「@StopAt parameter is incorrect. It should contain exactly 14 digits」","高","StopAtフォーマット検証"
"52","UT-DBR-052","sp_DatabaseRestore.sql","sp_DatabaseRestore","ログ復元","異常系","@StopAtが無効な日時の場合エラーが発生すること","なし","@StopAt = '20231340120000'","エラーメッセージ「@StopAt is not a valid datetime」","高","StopAt日時検証"
"53","UT-DBR-053","sp_DatabaseRestore.sql","sp_DatabaseRestore","ログ復元","正常系","@OnlyLogsAfter指定時にその日時以前のログがスキップされること","なし","@OnlyLogsAfter = '20231201000000'","指定日時以前のログファイルが削除される","中","ログフィルタリング"
"54","UT-DBR-054","sp_DatabaseRestore.sql","sp_DatabaseRestore","ログ復元","正常系","@SkipBackupsAlreadyInMsdb=1の場合復元済みログがスキップされること","msdbに復元履歴あり","@SkipBackupsAlreadyInMsdb = 1","msdb.restorehistoryにあるファイルがスキップされる","中","復元済みスキップ"
"55","UT-DBR-055","sp_DatabaseRestore.sql","sp_DatabaseRestore","ログ復元","異常系","ログパスが存在しない場合エラーが発生すること","なし","@BackupPathLog = 'D:\NonExistent\'","エラーメッセージ「(LOG) No rows or bad value for path」","高","ログパス確認"
"56","UT-DBR-056","sp_DatabaseRestore.sql","sp_DatabaseRestore","ログ復元","異常系","ログディレクトリが空の場合エラーが発生すること","空ディレクトリ","@BackupPathLog = 'D:\Empty\'","エラーメッセージ「(LOG) Empty directory」","中","ログ空ディレクトリ"
"57","UT-DBR-057","sp_DatabaseRestore.sql","sp_DatabaseRestore","ログ復元","正常系","分割ログバックアップが正常に復元されること","複数分割ファイル","@BackupPathLog = 'D:\Backup\LOG\'（_1.trn, _2.trn形式）","複数DISKを指定したRESTORE LOG文が実行される","中","ストライプログ対応"
"58","UT-DBR-058","sp_DatabaseRestore.sql","sp_DatabaseRestore","復旧処理","正常系","@RunRecovery=1の場合RECOVERYオプションで復旧されること","復元完了","@RunRecovery = 1","RESTORE DATABASE WITH RECOVERY文が実行される","高","データベース復旧"
"59","UT-DBR-059","sp_DatabaseRestore.sql","sp_DatabaseRestore","復旧処理","正常系","@KeepCdc=1の場合KEEP_CDCオプションが追加されること","CDC有効DB","@RunRecovery = 1, @KeepCdc = 1","RESTORE文にKEEP_CDCオプションが含まれる","中","CDC保持"
"60","UT-DBR-060","sp_DatabaseRestore.sql","sp_DatabaseRestore","復旧処理","正常系","@EnableBroker=1の場合ENABLE_BROKERオプションが追加されること","Service Broker有効","@RunRecovery = 1, @EnableBroker = 1","RESTORE文にENABLE_BROKERオプションが含まれる","中","Broker有効化"
"61","UT-DBR-061","sp_DatabaseRestore.sql","sp_DatabaseRestore","後処理","正常系","@ForceSimpleRecovery=1の場合SIMPLE復旧モデルに変更されること","復旧完了","@ForceSimpleRecovery = 1","ALTER DATABASE SET RECOVERY SIMPLE文が実行される","中","復旧モデル変更"
"62","UT-DBR-062","sp_DatabaseRestore.sql","sp_DatabaseRestore","後処理","正常系","@RunCheckDB=1の場合DBCC CHECKDBが実行されること","復旧完了","@RunCheckDB = 1","DBCC CHECKDB文が実行される","高","整合性チェック"
"63","UT-DBR-063","sp_DatabaseRestore.sql","sp_DatabaseRestore","後処理","正常系","@DatabaseOwner指定時にオーナーが変更されること","復旧完了、ログイン存在","@DatabaseOwner = 'sa', @RunRecovery = 1","ALTER AUTHORIZATION文が実行される","中","オーナー変更"
"64","UT-DBR-064","sp_DatabaseRestore.sql","sp_DatabaseRestore","後処理","異常系","@DatabaseOwnerが無効なログインの場合警告が出力されること","ログイン存在しない","@DatabaseOwner = 'InvalidLogin'","警告メッセージ「is not a valid Login. Database Owner not set.」","中","無効オーナー処理"
"65","UT-DBR-065","sp_DatabaseRestore.sql","sp_DatabaseRestore","後処理","正常系","@RunRecovery=0の場合オーナー変更がスキップされること","RESTORING状態","@DatabaseOwner = 'sa', @RunRecovery = 0","警告メッセージ「is still in Recovery, so we are unable to change」","中","復旧前オーナー変更"
"66","UT-DBR-066","sp_DatabaseRestore.sql","sp_DatabaseRestore","後処理","正常系","@SetTrustworthyON=1でsysadminの場合TRUSTWORTHYが有効化されること","sysadmin権限あり","@SetTrustworthyON = 1, @RunRecovery = 1","ALTER DATABASE SET TRUSTWORTHY ON文が実行される","中","TRUSTWORTHY有効化"
"67","UT-DBR-067","sp_DatabaseRestore.sql","sp_DatabaseRestore","後処理","正常系","@SetTrustworthyON=1で非sysadminの場合警告が出力されること","sysadmin権限なし","@SetTrustworthyON = 1","警告メッセージ「Current user's login is NOT a member of the sysadmin role」","中","権限不足警告"
"68","UT-DBR-068","sp_DatabaseRestore.sql","sp_DatabaseRestore","後処理","正常系","@SetTrustworthyON=1で@RunRecovery=0の場合警告が出力されること","RESTORING状態","@SetTrustworthyON = 1, @RunRecovery = 0","警告メッセージ「is still in Recovery, so we are unable to enable the TRUSTWORTHY bit」","中","復旧前TRUSTWORTHY"
"69","UT-DBR-069","sp_DatabaseRestore.sql","sp_DatabaseRestore","後処理","正常系","@FixOrphanUsers=1の場合孤立ユーザーが修正されること","孤立ユーザー存在","@FixOrphanUsers = 1, @RunRecovery = 1","ALTER USER WITH LOGIN文が実行される","中","孤立ユーザー修正"
"70","UT-DBR-070","sp_DatabaseRestore.sql","sp_DatabaseRestore","後処理","正常系","孤立ユーザーがいない場合メッセージが出力されること","孤立ユーザーなし","@FixOrphanUsers = 1","メッセージ「No orphan users require a sid fixup」","低","孤立ユーザーなし"
"71","UT-DBR-071","sp_DatabaseRestore.sql","sp_DatabaseRestore","後処理","正常系","@RunStoredProcAfterRestore指定時にプロシージャが実行されること","復旧完了","@RunStoredProcAfterRestore = 'dbo.AfterRestoreProc', @RunRecovery = 1","EXEC文が実行される","中","復元後プロシージャ実行"
"72","UT-DBR-072","sp_DatabaseRestore.sql","sp_DatabaseRestore","後処理","正常系","@RunRecovery=0の場合復元後プロシージャ実行がスキップされること","RESTORING状態","@RunStoredProcAfterRestore = 'dbo.AfterRestoreProc', @RunRecovery = 0","警告メッセージ「Unable to run Run Stored Procedure After Restore as database is not recovered」","中","復旧前プロシージャ"
"73","UT-DBR-073","sp_DatabaseRestore.sql","sp_DatabaseRestore","テスト復元","正常系","@TestRestore=1の場合復元後にデータベースが削除されること","復元完了","@TestRestore = 1","DROP DATABASE文が実行される","高","テスト復元後削除"
"74","UT-DBR-074","sp_DatabaseRestore.sql","sp_DatabaseRestore","実行制御","正常系","@Execute='N'の場合コマンドが印刷されるのみで実行されないこと","なし","@Execute = 'N'","コマンドがPRINTされるが実行されない","高","実行なしモード"
"75","UT-DBR-075","sp_DatabaseRestore.sql","sp_DatabaseRestore","実行制御","正常系","@Debug=1の場合詳細情報が出力されること","なし","@Debug = 1","一時テーブル内容とSQL文がPRINTされる","中","デバッグモード"
"76","UT-DBR-076","sp_DatabaseRestore.sql","sp_DatabaseRestore","バージョン対応","正常系","SQL Server 2012以上でContainmentカラムが処理されること","SQL Server 2012+","@MajorVersion >= 11","RESTORE HEADERONLYにContainmentが含まれる","低","2012互換性"
"77","UT-DBR-077","sp_DatabaseRestore.sql","sp_DatabaseRestore","バージョン対応","正常系","SQL Server 2014 CU1以上で暗号化カラムが処理されること","SQL Server 2014 CU1+","@MajorVersion >= 13 OR (@MajorVersion = 12 AND @BuildVersion >= 2342)","KeyAlgorithm, EncryptorThumbprint等が含まれる","低","暗号化バックアップ対応"
"78","UT-DBR-078","sp_DatabaseRestore.sql","sp_DatabaseRestore","バージョン対応","正常系","SQL Server 2022以上で新カラムが処理されること","SQL Server 2022+","@MajorVersion >= 16","LastValidRestoreTime, TimeZone, CompressionAlgorithmが含まれる","低","2022互換性"
"79","UT-DBR-079","sp_DatabaseRestore.sql","sp_DatabaseRestore","ファイル移動","正常系","データファイルが@MoveDataDriveに移動されること","なし","@MoveFiles = 1, @MoveDataDrive = 'E:\Data\'","MOVE句でデータファイルがE:\Data\に移動される","高","データファイル移動"
"80","UT-DBR-080","sp_DatabaseRestore.sql","sp_DatabaseRestore","ファイル移動","正常系","ログファイルが@MoveLogDriveに移動されること","なし","@MoveFiles = 1, @MoveLogDrive = 'F:\Log\'","MOVE句でログファイルがF:\Log\に移動される","高","ログファイル移動"
"81","UT-DBR-081","sp_DatabaseRestore.sql","sp_DatabaseRestore","ファイル移動","正常系","Filestreamが@MoveFilestreamDriveに移動されること","Filestream使用","@MoveFiles = 1, @MoveFilestreamDrive = 'G:\Filestream\'","MOVE句でFilestreamがG:\Filestream\に移動される","低","Filestream移動"
"82","UT-DBR-082","sp_DatabaseRestore.sql","sp_DatabaseRestore","ファイル移動","正常系","FullTextカタログが@MoveFullTextCatalogDriveに移動されること","FullText使用","@MoveFiles = 1, @MoveFullTextCatalogDrive = 'H:\FullText\'","MOVE句でFullTextカタログがH:\FullText\に移動される","低","FullText移動"
"83","UT-DBR-083","sp_DatabaseRestore.sql","sp_DatabaseRestore","ファイル移動","正常系","@FileNamePrefix指定時にファイル名にプレフィックスが付与されること","なし","@FileNamePrefix = 'Restored_', @MoveFiles = 1","ファイル名がRestored_で始まる","低","ファイル名プレフィックス"
"84","UT-DBR-084","sp_DatabaseRestore.sql","sp_DatabaseRestore","ファイル移動","正常系","別名復元時にファイル名のDB名部分が置換されること","なし","@Database = 'SourceDB', @RestoreDatabaseName = 'TargetDB', @MoveFiles = 1","ファイル名のSourceDBがTargetDBに置換される","中","別名復元ファイル名"
"85","UT-DBR-085","sp_DatabaseRestore.sql","sp_DatabaseRestore","境界値","境界値","@BackupPathFullが空文字でログ継続の場合DatabaseLastLSNが取得されること","@ContinueLogs = 1","@BackupPathFull = NULL, @ContinueLogs = 1, @BackupPathLog = 'D:\LOG\'","master.sys.master_filesからredo_start_lsnが取得される","中","フルパスなしログ継続"
"86","UT-DBR-086","sp_DatabaseRestore.sql","sp_DatabaseRestore","境界値","境界値","@StopAtがフルバックアップ終了時刻と同じ場合ログ復元がスキップされること","なし","@StopAt = フルバックアップ終了時刻","メッセージ「@StopAt is the end time of a FULL backup, no log files will be restored」","中","StopAt=フル終了時刻"
"87","UT-DBR-087","sp_DatabaseRestore.sql","sp_DatabaseRestore","複合シナリオ","正常系","フル+差分+ログの完全復元シナリオが正常に動作すること","全バックアップ存在","@BackupPathFull, @BackupPathDiff, @BackupPathLog全て指定, @RestoreDiff = 1, @RunRecovery = 1","フル、差分、ログの順で復元され、RECOVERYが実行される","高","完全復元フロー"
"88","UT-DBR-088","sp_DatabaseRestore.sql","sp_DatabaseRestore","複合シナリオ","正常系","フル+ログのみの復元シナリオが正常に動作すること","フルとログのみ存在","@BackupPathFull, @BackupPathLog指定, @RestoreDiff = 0, @RunRecovery = 1","フル、ログの順で復元され、RECOVERYが実行される","高","フル+ログ復元"
"89","UT-DBR-089","sp_DatabaseRestore.sql","sp_DatabaseRestore","複合シナリオ","正常系","TestRestore+RunCheckDBの組み合わせが正常に動作すること","バックアップ存在","@TestRestore = 1, @RunCheckDB = 1, @RunRecovery = 1","復元、CHECKDB実行、DROP DATABASEの順で実行される","高","テスト復元+整合性チェック"
"90","UT-DBR-090","sp_DatabaseRestore.sql","sp_DatabaseRestore","複合シナリオ","正常系","ネットワークパスからの復元が正常に動作すること","UNCパスアクセス可能","@BackupPathFull = '\\\\Server\Share\FULL\'","UNCパスからバックアップファイルが検索・復元される","中","ネットワーク復元"
