Move-IpamDatabase

Move-IpamDatabase

Migrates the IPAM database to a SQL Server database.

構文

Parameter Set: MoveDatabaseConfig1
Move-IpamDatabase [-DatabaseServer] <String> [-DatabaseName] <String> [-DatabasePort] <UInt16> -DatabaseAuthType <AuthType> [-AsJob] [-CimSession <CimSession[]> ] [-DatabaseCredential <PSCredential> ] [-Force] [-PassThru] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

詳細説明

The Move-IpamDatabase cmdlet migrates the IP Address Management (IPAM) database to a Microsoft SQL Server database. You can migrate from Windows Internal Database (WID) or from a SQL Server database. The cmdlet creates a new IPAM schema and copies all data from the existing IPAM database. After the cmdlet completes copying data, it changes IPAM configuration settings to refer to the new database as the IPAM database. If you migrate from WID, the cmdlet renames the existing data and log files by appending a time stamp to the file names.

If the cmdlet cannot complete the migration for any reason, it returns an error and does not change the current database settings.

Verify that you can reach the database server from the IPAM server. Specify whether to connect to the destination server by using the account for the computer that hosts the IPAM server or by using a SQL Server database account. If you specify the IPAM server account, verify that the account has permissions necessary to write to the destination database. If the migration requires a new database, verify that the account has permissions to create and write to the database.

Use the Get-IpamDatabase cmdlet to view database configuration settings.

We recommend that you isolate the IPAM server and shut down all IPAM clients before you migrate a database.

NOTE: the collation of the source and destination databases should be the same. If the destination database is not present, this cmdlet creates a new database using the default collation for the destination SQL Server. This might cause errors if the default collation of the source SQL database is different. To avoid this, use the following steps to manually create the destination database.

Moving from WID to an external SQL Server

Create the destination database on external SQL Server by using the following command:

CREATE DATABASE [<DBName>] COLLATE <DB collation name>The parameter ‘DB collation name’ should be specified as SQL_LATIN1_GENERAL_CP1_CI_AS in this case.

Moving from one SQL Server database to another external SQL Server database

Read the collation of the existing database by using the following command:

SELECT collation_name FROM sys.databases WHERE name = N'<DBName>'

Create a new database on the destination SQL server by using the following command:

CREATE DATABASE [<DBName>] COLLATE <DB collation name>

パラメーター

-AsJob

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-CimSession<CimSession[]>

リモート セッションまたはリモート コンピューターでコマンドレットを実行します。New-CimSession コマンドレットや Get-CimSession コマンドレットの出力など、コンピューター名またはセッション オブジェクトを入力します。既定値は、ローカル コンピューターで実行中の現在のセッションです。

エイリアス

Session

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-DatabaseAuthType<AuthType>

Specifies which type of authentication to use to connect to the computer that runs SQL Server. このパラメーターに対して使用できる値:

-- SQL. Use the database account. Specify this credential by using the DatabaseCredential parameter.
-- Windows. Use the account for the computer that runs the IPAM server.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-DatabaseCredential<PSCredential>

Specifies credentials, as a PSCredential object, for the computer that runs SQL Server. To obtain a PSCredential object, use the Get-Credential cmdlet. For more information, type Get-Help Get-Credential.

Specify this parameter if you specified a value of SQL for the DatabaseAuthType parameter.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-DatabaseName<String>

Specifies the name of a SQL Server database. The cmdlet migrates the IPAM database to this database. If the database does not exist, IPAM creates a database that has this name on the destination server.

エイリアス

なし

必須?

true

位置は?

3

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-DatabasePort<UInt16>

Specifies the port that the IPAM server uses to connect to the database server.

エイリアス

なし

必須?

true

位置は?

4

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-DatabaseServer<String>

Specifies the fully qualified domain name (FQDN) or IP address of the database server. The cmdlet migrates the IPAM database to this server.

エイリアス

なし

必須?

true

位置は?

2

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Force

ユーザーの確認を求めずにコマンドを強制的に実行します。

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-PassThru

作業中の項目を表すオブジェクトを返します。既定では、このコマンドレットによる出力はありません。

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-ThrottleLimit<Int32>

このコマンドレットを実行するために確立できる最大同時操作数を指定します。このパラメーターを省略するか、値として 0 を入力した場合、Windows PowerShell® では、コンピューターで実行している CIM コマンドレットの数に基づいて、コマンドレットに対する最適なスロットル制限を計算します。スロットル制限は現在のコマンドレットのみに適用され、セッションまたはコンピューターには適用されません。

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Confirm

コマンドレットを実行する前に、ユーザーに確認を求めます。

必須?

false

位置は?

named

既定値

false

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-WhatIf

コマンドレットを実行するとどのような結果になるかを表示します。コマンドレットは実行されません。

必須?

false

位置は?

named

既定値

false

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

Example 1: Move an IPAM database

This example moves an IPAM database to a database named IpamDB1 on a database server named ContosoDB22.

The first command uses the Get-IpamDatabase cmdlet to get the database configuration information. The console displays configuration information, including the type of database, WID.

PS C:\> Get-IpamDatabase

The second command moves the IPAM data to a database named IpamDB1 on the server named ContosoDB22. The database uses port 1433. The command specifies Windows as the authentication type, so the command uses credentials for the IPAM server. The cmdlet prompts you for confirmation.

PS C:\> Move-IpamDatabase -DatabaseServer "ContosoDB22" -DatabaseName "IpamDB1" -DatabasePort 1433 -DatabaseAuthType Windows

The third command repeats the first command. The console displays configuration information, including the type of database, now MSSQL. The database now has values for DatabaseServer, DatabaseName, and DatabasePort, as specified in the second command.

PS C:\> Get-IpamDatabase

関連トピック

Get-IpamDatabase

Set-IpamDatabase