New-AzDataMigrationLoginsMigration
Migrate logins from the source Sql Servers to the target Azure Sql Servers.
Syntax
New-AzDataMigrationLoginsMigration
-ConfigFilePath <String>
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzDataMigrationLoginsMigration
-SourceSqlConnectionString <String[]>
-TargetSqlConnectionString <String>
[-CSVFilePath <String>]
[-ListOfLogin <String[]>]
[-OutputFolder <String>]
[-AADDomainName <String>]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Migrate logins from the source Sql Servers to the target Azure Sql Servers.
Examples
Example 1: Run Migrate logins from the source Sql Servers to the target Azure Sql Servers using Parameters
New-AzDataMigrationLoginsMigration -SourceSqlConnectionString "data source=servername;user id=userid;password=;initial catalog=master;TrustServerCertificate=True" -TargetSqlConnectionString "data source=servername;user id=userid;password=;initial catalog=master;TrustServerCertificate=True" -CSVFilePath "C:\CSVFile" -ListOfLogin "loginname1" "loginname2" -OutputFolder "C:\OutputFolder" -AADDomainName "AADDomainName"
Starting Logins migration...
Starting server roles migration...
Starting user-login mappings...
Starting server role mappings...
Restoring permissions for logins...
Restoring permissions for server roles...
Login migration process complete.
This command runs Run SKU Recommendation on given SQL Server using the connection string.
Example 2: Run Migrate logins from the source Sql Servers to the target Azure Sql Servers using config file
New-AzDataMigrationLoginsMigration -ConfigFilePath "C:\Users\user\document\config.json"
Starting Logins migration...
Starting server roles migration...
Starting user-login mappings...
Starting server role mappings...
Restoring permissions for logins...
Restoring permissions for server roles...
Login migration process complete.
This command runs Run Migrate logins from the source Sql Servers to the target Azure Sql Servers using config file.
Parameters
-AADDomainName
Optional. Required if Windows logins are included in the list of logins to be migrated. (Default: empty string).
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ConfigFilePath
Path of the ConfigFile
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CSVFilePath
Optional. Location of CSV file of logins. Use only one parameter between this and listOfLogin.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ListOfLogin
Optional. List of logins in string format. If large number of logins need to be migrated, use CSV file option.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-OutputFolder
Optional. Default: %LocalAppData%/Microsoft/SqlLoginMigrations) Folder where logs will be written.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PassThru
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SourceSqlConnectionString
Required. Connection string(s) for the source SQL instance(s), using the formal connection string format.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TargetSqlConnectionString
Required. Connection string(s) for the target SQL instance(s), using the formal connection string format.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |