In this scenario, you want to relocate an exceptions database
(ESDB) to a different computer. Perhaps you have just acquired a computer
with more resources and want move the database to the new server,
using a different host name.
About this task
This scenario assumes that you are relocating the repository from one computer
to another and you are using the same services tier to manage repository registration in the same
metadata repository. In this example, the names of the computers are different, but the credentials
and database properties remain the same. It is also assumed that you have already relocated the
physical database, including the data, to the new computer using standard backup and restore
operations. In addition, it is assumed that this repository is the only schema in the database. If
there are additional repositories in the database, repeat the process for each repository. The
following process describes the steps that are necessary to update the registration of the relocated
repository.
Procedure
- Log into the services tier computer.
- If you do not know the name of the
existing repository, first list
the repositories:
For example:
cd \IBM\InformationServer\ASBServer\bin
RepositoryAdmin.bat -listRepositories
DSODB
QSSRDDB
ESDB
- Create a repository properties
file to use as a template by displaying
the properties and redirecting the output to a file. You need
a properties file in subsequent steps to register the new repository.
RepositoryAdmin.bat -displayRepository -rn ESDB -res ESDB.properties
Example contents of the ESDB.properties file:
DatabasePlatform.databaseType=DB2
DatabasePlatform.version=10.5
DatabaseServer.host=server1
DatabaseServer.port=50000
Database.name=ESDB
Database.alias=ESDB
Database.location=C:\
Repository.name=ESDB
Repository.description=Exception Stage repository
Repository.tool=DataQualityConsole
Repository.context=test
Repository.schema=ESDB
RepositoryConnection.userName=ESDB
RepositoryConnection.password={iisenc}gwFQseoj24I/SnCFEH+cWg==
RepositoryConnection.connectionURL=jdbc:db2://test1:50000/ESDB
- Edit the ESDB.properties file with
the values to use for the new computer. In this example, only the
host name is changed. If you have also renamed the database or repository,
change those values as well.
If the database is not configured
for high availability, remove the connection URL property. The tool
can derive the URL from other properties in the file.
DatabasePlatform.databaseType=DB2
DatabasePlatform.version=10.5
DatabaseServer.host=server2
DatabaseServer.port=50000
Database.name=ESDB
Database.alias=ESDB
Database.location=C:\
Repository.name=ESDB
Repository.description=Exception Stage repository.
Repository.tool=DataQualityConsole
Repository.context=
Repository.schema=ESDB
RepositoryConnection.userName=ESDB
RepositoryConnection.password={iisenc}gwFQseoj24I/SnCFEH+cWg==
- Unregister
the existing repository.
Because
your new repository will have the same name as the existing registered
repository, you must first unregister the existing repository. Repository
names must be unique.
RepositoryAdmin.bat -unregisterRepository -rn ESDB
- Register the new server, database,
and repository by using the edited properties file.
For this step, you need only register
the repository. When you register a repository with the RepositoryAdmin tool,
if the server and database have not yet been registered, they will
be registered during the same operation.
RepositoryAdmin.bat -registerRepository -pf ESDB.properties
- On each engine tier, update
the connection configuration file with the connection information
for the new repository. Run the RegistrationCommand tool
from the directory that corresponds to the repository as in the following
example:
cd /opt/IBM/InformationServer/Server/ESDB
../../ASBNode/bin/RegistrationCommand.sh -get_config
-authfile isadmin.credentials -rp ESDB -cf ESDBConnect.tmpl
-res ESDBConnect.cfg
With the -cf option,
the connection details for the repository that correspond to the parameters
in the configuration template file (.tmpl file)
replace the variable names in the template, and the result is written
to the output file (.cfg file). The following
parameters will be replaced if values for them are found: @DBTYPE@, @DRIVER_CLASS@, @DRIVER_JARFILES@, @CONNECTION_URL@, @DATABASE_USER@, @PASSWORD@.
- From the services tier, test the connection to
the new repository.
RepositoryAdmin.bat -testRepositoryConnection -rn ESDB -cn ESDB
- Repeat the procedure for each repository
that you want to relocate.
If you are migrating all of
your repositories from one or more databases to others or from one
or more servers to others, unregister the original databases or servers,
and drop the original databases. Use caution, though, because when
you unregister a database, it unregisters all repositories in the
database. Likewise, when you unregister a server, it unregisters all
databases on the server. For example, the following command will unregister server1 and
all databases and repositories on that server; therefore, you would
want to first register all of your repositories on the new server
before running the command.
RepositoryAdmin.bat -unregisterDatabaseServer -dt Db2 -dv 10.5 -sh server1
However, if you do unregister an old repository before registering
the new one, it only means that you would need to create a properties
file from scratch to register the new repository. Completing the unregistration
process last means that you can first use the -displayRepository command
option to create a template file to work with and save you some work,
as described in this task.