Save-SqlMigrationReport
Generates In-Memory OLTP Migration Checklist
Синтаксис
Default (по умолчанию)
Save-SqlMigrationReport
[-Server <String>]
[-Database <String>]
[-Schema <String>]
[-Username <String>]
[-Password <String>]
[-Object <String>]
[-InputObject <SqlSmoObject>]
[-MigrationType <MigrationType>]
[-FolderPath <String>]
[<CommonParameters>]
Описание
The Save-SqlMigrationReport generates an In-Memory OLTP Migration Checklist.
This informs you about which tables in your database will benefit if ported to use In-Memory OLTP. After you identify a table that you would like to port to use In-Memory OLTP, you can use the memory optimization advisor in SQL Server Management Studio to help you migrate the disk-based table to a memory-optimized table.
Note: This cmdlet is only available for PowerShell 5 (v21). It is not longer available in v22+ of the SQLServer module.
Примеры
Example 1
PS C:\> Save-SqlMigrationReport -Server 'MySQLServer' -Database 'MyDB' -FolderPath 'C:\MigrationReports'
This command will generate a report for all tables and stored procedures in database MyDb
on server MySQLServer
.
Report file (.html format) will be created for each database object and saved under C:\MigrationReports\MyDB
either
under Stored Procedure
or Tables
.
Example 2
PS C:\> $db = Get-Item 'SQLSERVER:\SQL\MySQLServer\DEFAULT\Databases\MyDB'
PS C:\> Save-SqlMigrationReport -FolderPath 'C:\MigrationReports' -InputObject $db
This command will generate the same report as Example 1; the InputObject is passed explicitly and encapsulate both the information about the server and the database.
Example 3
PS C:\> CD 'SQLSERVER:\SQL\MySQLServer\DEFAULT\Databases\MyDB'
PS SQLSERVER:\SQL\MySQLServer\DEFAULT\Databases\MyDB> Save-SqlMigrationReport -FolderPath 'C:\MigrationReports'
This command will generate the same report as Example 1 and 2. Note that the InputObject is inferred from the context, i.e. the current working directory.
Параметры
-Database
The name of the databased for which the report is going to be generated.
Свойства параметра
Тип: | String |
Default value: | None |
Поддерживаются подстановочные знаки: | False |
DontShow: | False |
Наборы параметров
(All)
Position: | Named |
Обязательно: | False |
Значение из конвейера: | False |
Значение из конвейера по имени свойства: | False |
Значение из оставшихся аргументов: | False |
-FolderPath
A path to a folder where the report files will be saved to. Report files will be organized under a folder with
the same name as the the value of the Database parameter nested under either a Stored Procedure
or Tables
folder, depending on the type of the object.
Свойства параметра
Тип: | String |
Default value: | None |
Поддерживаются подстановочные знаки: | False |
DontShow: | False |
Наборы параметров
(All)
Position: | Named |
Обязательно: | False |
Значение из конвейера: | False |
Значение из конвейера по имени свойства: | False |
Значение из оставшихся аргументов: | False |
-InputObject
The object (either a Database, a Table, or a Stored Procedure SMO object) on which to generate the report.
Свойства параметра
Тип: | SqlSmoObject |
Default value: | None |
Поддерживаются подстановочные знаки: | False |
DontShow: | False |
Наборы параметров
(All)
Position: | Named |
Обязательно: | False |
Значение из конвейера: | False |
Значение из конвейера по имени свойства: | False |
Значение из оставшихся аргументов: | False |
-MigrationType
The type of the migration. Currently, only OLTP
is supported.
Свойства параметра
Тип: | MigrationType |
Default value: | None |
Допустимые значения: | OLTP |
Поддерживаются подстановочные знаки: | False |
DontShow: | False |
Наборы параметров
(All)
Position: | Named |
Обязательно: | False |
Значение из конвейера: | False |
Значение из конвейера по имени свойства: | False |
Значение из оставшихся аргументов: | False |
-Object
The name of the object (Table or Stored Procedure) for which the report is going to be generated.
Свойства параметра
Тип: | String |
Default value: | None |
Поддерживаются подстановочные знаки: | False |
DontShow: | False |
Наборы параметров
(All)
Position: | Named |
Обязательно: | False |
Значение из конвейера: | False |
Значение из конвейера по имени свойства: | False |
Значение из оставшихся аргументов: | False |
-Password
Specifies the password for the SQL Server Authentication login ID that was specified in the Username parameter. Passwords are case-sensitive. When possible, use Windows Authentication. Do not use a blank password, when possible use a strong password.
If you specify the Password parameter followed by your password, the password is visible to anyone who can see your monitor.
If you code Password followed by your password in a .ps1 script, anyone reading the script file will see your password.
Assign the appropriate NTFS permissions to the file to prevent other users from being able to read the file.
Свойства параметра
Тип: | String |
Default value: | None |
Поддерживаются подстановочные знаки: | False |
DontShow: | False |
Наборы параметров
(All)
Position: | Named |
Обязательно: | False |
Значение из конвейера: | False |
Значение из конвейера по имени свойства: | False |
Значение из оставшихся аргументов: | False |
-Schema
The schema of the object (Table or Stored Procedure) for which the report is going to be generated.
Свойства параметра
Тип: | String |
Default value: | None |
Поддерживаются подстановочные знаки: | False |
DontShow: | False |
Наборы параметров
(All)
Position: | Named |
Обязательно: | False |
Значение из конвейера: | False |
Значение из конвейера по имени свойства: | False |
Значение из оставшихся аргументов: | False |
-Server
The name of server to connect to (either MYCOMPUTER or MYCOMPUTER\MYINSTANCE).
Свойства параметра
Тип: | String |
Default value: | None |
Поддерживаются подстановочные знаки: | False |
DontShow: | False |
Наборы параметров
(All)
Position: | Named |
Обязательно: | False |
Значение из конвейера: | False |
Значение из конвейера по имени свойства: | False |
Значение из оставшихся аргументов: | False |
-Username
Specifies the login ID for making a SQL Server Authentication connection to an instance of the Database Engine.
The password must be specified through the Password parameter.
If Username and Password are not specified, this cmdlet attempts a Windows Authentication connection using the Windows account running the Windows PowerShell session. When possible, use Windows Authentication.
Свойства параметра
Тип: | String |
Default value: | None |
Поддерживаются подстановочные знаки: | False |
DontShow: | False |
Наборы параметров
(All)
Position: | Named |
Обязательно: | False |
Значение из конвейера: | False |
Значение из конвейера по имени свойства: | False |
Значение из оставшихся аргументов: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.