db_catalog command for IBM® Db2 Warehouse
Catalogs a remote Db2® Warehouse database for use with the tools in the Db2 Warehouse client container. You can use this command as an alternative to specifying the -e REMOTE_DB server [:port] parameter for the docker run command when deploying the client container.
db_catalog {--add {server [:port] [--alias db_alias] [--ssl]}|--source db_alias|--remove db_alias|--change old_alias:new_alias|--list}
- --add {server[:port] [--alias db_alias] [--ssl]}
- Catalogs a remote database.
For a Linux® deployment, specify the host name or IP address of the remote Db2 Warehouse database server for the server parameter. For a Windows or Macintosh deployment, specify the container name for the server parameter. By convention, the container name is Db2wh.
You can specify the following optional parameters:- port
- Specifies a port number. If you do not specify a port number, the default port number (50001 for SSL deployments or 50000 for non-SSL deployments) is used.
- --alias db_alias
- Specifies an alias for the database that you are cataloging.
- --ssl
- Catalogs the remote database with SSL support. You can then run Db2 CLP commands and scripts over SSL.
Before you try to catalog by using the -ssl parameter, ensure that the Db2 Warehouse SSL port (default port 50001 or the port that you specify by using the port parameter) is open in the firewall rules for the remote Db2 Warehouse deployment.
- --source db_alias
- Returns the host name or IP address for the specified db_alias.
- --remove db_alias
- Uncatalogs a remote database.
- --change old_alias:new_alias
- Changes old_alias to new_alias in the catalog. The host name and SSL information are retained.
- --list
- Lists the cataloged remote databases.
docker exec -it client cli
podman exec -it client cli