Is there any way to use db2look on a client against a remote server to generate DDL for tables, etc? I would be running db2look on a Windows client.
I looked at the cmd line args here:
http://publib.boulder.ibm.com/infoce...e/r0002051.htm
but there doesn't seem to be any way to specify the remote server name, or port, the way you would do in a OLEDB connection, for example. It does say this however:
Quote:
-i userid
Use this option when working with a remote database. | |
-w password
Used with the -i option, this parameter allows the user to |run db2look against a database that resides on |a remote system. The user ID and the password are used by db2look to log on to the remote system. | |
Note:
If working with |remote databases, the remote database must be the same version as the local |database. The db2look utility does not have down-level |or up-level support.
|
The problem is there doesn't seem to be a way to specify which remote server you want to connect to. You can specify the database with the -d flag, just not the server.
There is the -server flag, but that's not for specifying what server to connect to, rather it's for specifying that you want certain server level stuff to be scripted:
Quote:
-server Sname
Generates DDL statements for federated objects that apply to this server. |The federated DDL statements that might be generated include: CREATE WRAPPER, |CREATE SERVER, CREATE USER MAPPING, CREATE NICKNAME, CREATE TYPE MAPPING, |CREATE FUNCTION ... AS TEMPLATE, CREATE FUNCTION MAPPING, CREATE INDEX SPECIFICATION, |and GRANT (privileges to nicknames, servers, indexes). Only one server name |is supported; an error is returned if less than one or more than one is specified. |This option cannot be used if the -wrapper option is used.
|
I am using a cmd line like this currently (for scripting a view in this case):
Code:
db2look.exe -d SAMPLE -e -i username -w password -z JESSE -v VEMPDPT1
Am I missing something? Note that I am very new to DB2 so that is very likely.