Configuring the Adapter for Netezza

In this section:

x

Configuring the adapter consists of specifying connection and authentication information for each of the connections you want to establish.

You can configure the adapter for an ODBC-based or a JDBC--based implementation. ODBC is preferred.


Top of page

x
Declaring Connection Attributes

How to:

Reference:

In order to connect to a Netezza data source, the adapter requires connection and authentication information.

You supply this information using the SET CONNECTION_ATTRIBUTES command. You can:

You can declare connections to more than one Netezza data source using the SET CONNECTION_ATTRIBUTES commands. The actual connection takes place when the first query is issued. If you issue multiple SET CONNECTION_ATTRIBUTES commands:



x
Procedure: How to Declare Connection Attributes

You can configure the adapter from either the Web Console or the Data Management Console.

  1. From the Web Console menu bar, click Adapters

    or

    from the Data Management Console, expand the Adapters folder.

    The Adapters folder opens.

  2. Expand the Available folder, if it is not already expanded.
  3. Expand the appropriate group folder and the specific adapter folder. The group folder is described in the connection attributes reference.
  4. Right-click the adapter name/version and select Configure.

    The Add Adapter to Configuration pane opens.

  5. Enter values for the parameters required by the adapter as described in the connection attributes reference.
  6. Click Configure. The configured adapter is added to the Adapters list in the navigation pane.


x
Reference: Connection Attributes for Netezza ODBC

The Netezza adapter is under the SQL group folder.

The following list describes the connection attributes for which you can supply values. To complete the attribute declaration, click the Configure button.

Connection name

Logical name used to identify this particular set of connection attributes. The default is CON01.

Datasource

The data source name (DSN). There is no default data source name. You must enter a value.

Security

There are two methods by which a use can be authenticated when connecting to an ODBC data source:

  • Explicit. The user ID and password are explicitly specified for each connection pass to the ODBC data source, at connection time, for authentication.
  • Trusted. The adapter connects to the ODBC data source as a Windows login using the credentials of the operating system user impersonated by the server data access agent.
User

Primary authorization ID by which you are known to the data source.

Password

Password associated with the primary authorization ID.

Select profile

Select a profile from the drop-down menu to indicate the level of profile in which to store the CONNECTION_ATTRIBUTES command. The global profile, edasprof.prf, is the default.

If you wish to create a new profile, either a user profile (user.prf) or a group profile if available on your platform (using the appropriate naming convention), choose New Profile from the drop-down menu and enter a name in the Profile Name field (the extension is added automatically).

Store the connection attributes in the server profile (edasprof).



x
Syntax: How to Declare Connection Attributes Manually (ODBC)

Explicit authentication. The user ID and password are explicitly specified for each connection and passed to ODBC, at connection time, for authentication.

ENGINE SQLNEZ SET CONNECTION_ATTRIBUTES connection DSN_name/userid,password            

Trusted authentication. The adapter connects to ODBC as a Windows login using the credentials of the Windows user impersonated by the server data access agent.

ENGINE SQLNEZ SET CONNECTION_ATTRIBUTES connection DSN_name/,

where:

SQLNEZ

Indicates the adapter. You can omit this value if you previously issued the SET SQLENGINE command.

connection

Is the logical name used to identify this particular set of connection attributes.

Note that one blank space is required between connection and DSN_name.

DSN_name

Is the Netezza Data Source Name (DSN) you wish to access. It must match an entry in the odbc.ini file.

userid

Is the primary authorization ID by which you are known to Netezza.

password

Is the password associated with the primary authorization ID.



Example: Declaring Connection Attributes (ODBC)

The following SET CONNECTION_ATTRIBUTES command declares connection CON1 to the Netezza DSN named SAMPLESERVER with an explicit user ID (MYUSER) and password (PASS). To ensure security, specify connection attributes from the Web Console, which encrypts the password before adding it to the server profile.

ENGINE SQLNEZ SET CONNECTION_ATTRIBUTES CON1 SAMPLESERVER/MYUSER,PASS


x
Reference: Updating the Connection String (ODBC)

The syntax for the CONNECTION_ATTRIBUTES command for this adapter has been enhanced to include a logical connection name that is designed to support the porting of applications from development to production environments. This enhanced syntax may necessitate the migration of existing CONNECTION_ATTRIBUTES commands.

The Web Console's Migrate option migrates your server settings to the newer release. To access this option, select Workspace, then Configuration/Monitor from the menu bar. Right-click Migrate from the Server folder in the navigation pane, and select Configure. On the Migrate pane, type the full path of the configuration instance directory (EDACONF) and click the Migrate button. This is the recommended approach.

If you choose not to use the Migrate option, please note the following information:



x
Reference: Connection Attributes for Netezza JDBC

The Netezza adapter is under the SQL group folder.

This chart describes the connection attributes for which you can supply values. To complete the attribute declaration, click the Configure button.

Attribute

Description

xConnection name

Name to be used as a reference to the connection.

xURL

Location URL for the Netezza data source.

xDriver name

Name for the JDBC driver.

See driver documentation for the specific release you are using.

xUser

Primary authorization ID by which you are known to the target data source.

xPassword

Password associated with the primary authorization ID.

xSelect profile

Select a profile from the drop-down list to indicate the level of profile in which to store the CONNECTION_ATTRIBUTES command. The global profile, edasprof.prf, is the default.

If you wish to create a new profile, either a user profile (user.prf) or a group profile if available on your platform (using the appropriate naming convention), choose New Profile from the drop-down menu and enter a name in the Profile Name field. (The extension is added automatically.)



x
Syntax: How to Declare Connection Attributes Manually (JDBC)
ENGINE SQLNEZ SET CONNECTION_ATTRIBUTES connection 
'URL'/userid,password            

where:

SQLNEZ

Indicates the adapter. You can omit this value if you previously issued the SET SQLENGINE command.

connection

Is the connection name.

URL

Is the URL to the location of the Netezza data source.

userid

Is the primary authorization ID by which you are known to the target database.

password

Is the password associated with the primary authorization ID.



Example: Declaring Connection Attributes (JDBC)

The following SET CONNECTION_ATTRIBUTES command connects to data source using the Netezza Driver, with an explicit user ID (MYUSER) and password (PASS). To ensure security, specifying connection attributes from the Web Console or DMC will encrypt the password before adding it to the server profile.

ENGINE SQLNEZ SET CONNECTION_ATTRIBUTES CON1
  'jdbc:xxxxxxx://hostname:port/datasource

Top of page

x
Overriding the Default Connection

How to:

If multiple connections have been defined, the connection named in the first SET CONNECTION_ATTRIBUTES command serves as the default connection.



x
Syntax: How to Change the Default Connection
ENGINE SQLNEZ SET DEFAULT_CONNECTION connection

where:

SQLNEZ

Indicates the adapter. You can omit this value if you previously issued the SET SQLENGINE command.

connection

Is the connection defined in a previously issued SET CONNECTION_ATTRIBUTES command. If this name was not previously declared, the following message is issued:

FOC1671, Command out of sequence

Note:



Example: Selecting the Default Connection (ODBC)

The following SET DEFAULT_CONNECTION command selects the Netezza database server named SAMPLENAME as the default Netezza database server:

ENGINE SQLNEZ SET DEFAULT_CONNECTION SAMPLENAME


Example: Selecting the Default Connection (JDBC)

The following SET DEFAULT_CONNECTION command selects CON1 as the default connection.

ENGINE SQLNEZ SET DEFAULT_CONNECTION CON1

Top of page

x
Controlling the Connection Scope

How to:

The SET AUTODISCONNECT command controls the persistence of connections when using the adapter for each of the connections you want to establish.



x
Syntax: How to Control the Connection Scope
x
ENGINE SQLNEZ SET AUTODISCONNECT ON {FIN|COMMIT}

where:

SQLNEZ

Indicates the adapter. You can omit this value if you previously issued the SET SQLENGINE command.

FIN

For ODBC implementation only, disconnects automatically only after the session has been terminated. If connection scope is not set then FIN is the default behavior.

COMMIT

For ODBC implementation only, disconnects automatically only after COMMIT orROLLBACK is issued as a native SQL command.


iWay Software