如要重新命名資料庫檔案,使其與新資料庫名稱相符,請啟用「Rename Files to Match New Database」(重新命名檔案,使其與新資料庫相符) 選項。
在「Advanced Options」(進階選項) 部分,輸入其他必要欄位的資訊。
資源
說明
還原後復原資料庫
如果未啟用「Recover Database After Restore」,SQL Server 資料庫會處於可向前復原記錄的狀態。啟用後,SQL Server 資料庫會上線,且記錄無法回溯到裝載時指定的時間點。
復原使用者登入資訊
只有在「政策設定」或「政策設定覆寫」中的「備份 SQL Server 使用者登入」設為「是」時,才會套用這項設定 (預設為「否」)。如果設為「是」,系統會將來源執行個體備份的所有使用者登入資訊還原至目標執行個體。只有在目標 SQL Server 與來源位於相同網域或樹系,且已建立所有必要信任關係時,網域帳戶才會還原。
使用者名稱/密碼
資料庫佈建的使用者憑證。
只有在執行 Backup and DR 代理程式的帳戶 (通常是「本機系統」) 沒有權限套用交易記錄或卸離資料庫時 (通常是後續解除掛接時的必要步驟),才需要提供使用者名稱。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[[["\u003cp\u003eCloning allows copying a SQL Server database, instance, or AG image to any SQL Server host known by the backup/recovery appliance.\u003c/p\u003e\n"],["\u003cp\u003eCloning is useful for avoiding data loss when multiple databases reside on a single volume, or when the original database is corrupt or the server is being replaced.\u003c/p\u003e\n"],["\u003cp\u003eClones enable the restoration of SQL Server databases to any host, unlike traditional restores which are limited to the source host.\u003c/p\u003e\n"],["\u003cp\u003eClones create independent copies for testing and development, ensuring changes don't affect the original data, and they can recover databases to new locations or filenames.\u003c/p\u003e\n"],["\u003cp\u003eThe cloning process involves selecting a source image, a target host, and specifying details like database names, file locations, and options for point-in-time recovery using transaction logs.\u003c/p\u003e\n"]]],[],null,["# Clone Microsoft SQL Server Databases\n\nYou can clone (copy) a backup of a SQL Server database, instance or AG image to\nany SQL Server host known by your backup/recovery appliance.\n\nThe cloning process varies slightly depending on whether you are cloning a\nsingle database image such as a member of an Always on Availability Group (AG)\nor multiple images in a SQL instance.\n\nUse a clone operation:\n\n- If you have copies of multiple SQL Server databases on a single volume,\n to avoid unintentional data loss as the contents of the entire volume\n get overwritten during restore of the volume.\n\n- If the original database has been removed because of corruption,\n or if the old database server is being replaced with a new server.\n\n- You can use a clone to effective restore SQL Server databases onto any\n host, unlike a restore which can only be run to the source host.\n\n- You can use a clone to create an independent copy of SQL Server databases\n for test and development where all changes will remain on the users copy\n and not get written back to the snapshot pool.\n\n- Clones can be used to recover databases to a new location, a new filename,\n or both. Clones are created when a source database has become corrupt, or\n requires root cause analysis. The clone performs a full restore with optional\n point in time recovery to the same host (new database name or filename), or\n alternative hosts running the same version or higher. The use cases for clones\n include performance testing, long term development and testing, reporting, and\n even cloning databases from staging environments into existing production\n instances.\n\nTo clone a SQL database to a host:\n\n1. From the Backup and DR Service management console, open the\n **App Manager** to the **Applications** list.\n\n2. Right-click the application with the image that you want to clone,\n then choose **Access** . The **Access** page opens listing backup images in\n the Timeline ramp view.\n\n3. Select an image and then select **Clone** from the list of access operations.\n The Clone page opens.\n\n4. Select a target from the **Target** drop-down list.\n\n5. Optionally, enter a label for the clone job in the **Label** field.\n\n6. Under **Application Options**, select one or more databases to clone.\n Unlike the Mount operation, no new Consistency Group is created when\n multiple databases are cloned.\n\n7. If the source application is protected by a snapshot policy that has\n enabled database log backups, and logs are available with the image,\n you can use them to roll forward to a specific point in time by changing\n these options in the **Roll Forward Time** section:\n\n - The date field contains all possible dates that the database can be rolled forward to, with the application of database transaction logs. Select the date the database needs to be rolled forward to.\n - The time field contains a slider showing all possible times on the selected date that the database can be rolled forward to. If you select the latest possible date and then move the slider to the right most position, the job will apply to all available logs. If you select the earliest possible date and move the slider to the left most position, the job will apply no logs.\n - You can specify to roll forward using either **User Time** or **Host Time**. User Time is relative to the local time of the current user. Host time is relative to the system that hosts the data to be cloned.\n\n | **Note:** When performing a clone from OnVault, a roll-forward range is displayed only when logs are available on the local appliance. This includes the scenario where an OnVault import was performed on the same appliance used as a target for StreamSnap replication with log replication enabled.\n8. In SQL Server Instance Name, select a target SQL Server instance to manage\n the new database.\n\n9. If you are cloning a single database, enter the name for the new database,\n avoiding names of existing databases in the selected target server and\n instance.\n\n If you are cloning multiple SQL databases you can supply a name for each\n database. Under **Advanced Options** you can also append a suffix or a\n prefix, or both to every cloned database's name.\n10. Enable the **Rename Files to Match New Database** option if you want to\n rename the database files to match the new database names.\n\n11. In the **Advanced Options** section, enter information for the additional\n fields required.\n\n \u003cbr /\u003e\n\n12. In the File Locations section, specify whether you want to copy the\n database files to the same path as the source server, or to a new location.\n There are three options:\n\n - Copy files to the same drive or path as they were on the source server\n (default option).\n\n - Choose new file locations at the volume level.\n\n - Choose new file locations at the file level.\n\n If you select the second option (new file option at the volume level),\n you will see a table with the source volume and target volume drop-down.\n\n In Target Volume, select a target volumes from the drop-down list of all\n discovered file system applications. If needed, you can also type the\n volume, for example: M:\\\\, or L:\\\\Logs\\\\Log1.\n\n If you select the third option (new file locations at the file level),\n a table with three columns appears: File, Source Location, and\n Target Location. In Target Location, enter the new file location as needed.\n13. Click **Submit**.\n A job is submitted to clone the image to the selected host. You can verify\n that the clone operation is successful by viewing the job status in the\n Monitor.\n\nThe Backup and DR Microsoft SQL Server DBA guide\n------------------------------------------------\n\nThis page is one in a series of pages specific to protecting and recovering\nMicrosoft SQL Server databases with Backup and DR.\nYou can find additional information at:\n\n- [Backup and DR for Microsoft SQL Server Databases](/backup-disaster-recovery/docs/concepts/backupdr-for-sql-server)\n- [Prepare SQL Server databases for Backup and DR Service](/backup-disaster-recovery/docs/configuration/prepare-sql-server)\n- [Add a SQL Server database host and discover databases](/backup-disaster-recovery/docs/configuration/discover-sql-server)\n- [Configure backup plans for Microsoft SQL Server instances and databases](/backup-disaster-recovery/docs/backup/back-up-sql-server)\n- [Application details and settings for Microsoft SQL Server instances and databases](/backup-disaster-recovery/docs/backup/app-details-settings-sql-server)\n- [Mount a SQL Server database](/backup-disaster-recovery/docs/access-data/mount-sql-server)\n- [Mount databases into SQL Always On Availability Groups](/backup-disaster-recovery/docs/access-data/mount-sql-server-aag)\n- [Manage an active mount](/backup-disaster-recovery/docs/access-data/manage-active-mounts)\n- [Migrate a SQL Server database](/backup-disaster-recovery/docs/access-data/mount-and-migrate-sql-server-2)\n- [Clone SQL Server databases](/backup-disaster-recovery/docs/access-data/clone-sql-server)\n- [Recover SQL Server backups](/backup-disaster-recovery/docs/restore-data/restore-sql-server)"]]