Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore-SqlDscDatabase: New command proposal #2026

Open
johlju opened this issue May 6, 2024 · 1 comment
Open

Restore-SqlDscDatabase: New command proposal #2026

johlju opened this issue May 6, 2024 · 1 comment
Labels
command proposal The issue is proposing to add a new command to the module. help wanted The issue is up for grabs for anyone in the community.

Comments

@johlju
Copy link
Member

johlju commented May 6, 2024

Command proposal

Command that restores a database on a SQL Server Database Engine instance.

Proposed parameters

Parameter Mandatory Data type Description Default value Allowed values
ParameterName Yes String Detailed description None None

Special considerations or limitations

Suggest using WorldWideImporters for the tests as suggested in issue #1836.

Not sure this command would work best if it used SMO as suggested for a resource in issue #954 or build and invoke a T-SQL script like below.

USE [master];
GO
RESTORE DATABASE [WideWorldImporters]
FROM DISK = 'C:\Temp\WideWorldImporters.bak'
WITH
    MOVE 'WWI_Primary' TO 'C:\Data\WideWorldImporters.mdf',
    MOVE 'WWI_UserData' TO 'C:\Data\WideWorldImporters_UserData.ndf',
    MOVE 'WWI_Log' TO 'C:\Data\WideWorldImporters.ldf',
    MOVE 'WWI_InMemory_Data_1' TO 'C:\Data\WideWorldImporters_InMemory_Data_1',
    FILE = 1,
    NOUNLOAD,
    STATS = 5;
GO
@johlju johlju added help wanted The issue is up for grabs for anyone in the community. command proposal The issue is proposing to add a new command to the module. labels May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
command proposal The issue is proposing to add a new command to the module. help wanted The issue is up for grabs for anyone in the community.
Projects
None yet
Development

No branches or pull requests

1 participant