Was this helpful?
gwalias Command—Create Gateway Alias
The simplest way to create and use a gateway alias is to pass the hard-coded server class, alias name, host database name, user name, and password information using the gwalias command. You can also use this command to list existing aliases.
This command has the following format:
gwalias list
gwalias server_class alias_name host_dbname username password
The list option displays all alias names and definitions in the config.dat file. You may use this option to discover any aliases already defined without having to open and scan config files. If you use the list option, you may not specify any other parameters.
Example: gwalias command
To create an alias called 'oracledb' for a gateway user called 'fred' that connects to the local oracle database 'localora' as the DBMS user 'fred' with the password 'secret', you would enter the following:
gwalias oracle oracledb localora fred secret
This creates the alias definition in the config.dat file. There are obvious security implications to using hard-coded passwords; a number of solutions are discussed later in this chapter.
Last modified date: 02/16/2024