This section describes the LIBNAME statement that SAS/ACCESS Interface to Netezza supports. For general information about this feature, see LIBNAME Statement for Relational Databases.
Here is the LIBNAME statement syntax for accessing Netezza.
For general information about the LIBNAME statement that is not specific to SAS/ACCESS, see LIBNAME Statement in SAS Global Statements: Reference.
specifies any SAS name that serves as an alias to associate SAS with a database, schema, server, or group of tables and views.
netezzaspecifies the SAS/ACCESS engine name for the Netezza interface.
provide connection information and control how SAS manages the timing and concurrence of the connection to the DBMS. When you use the LIBNAME statement, you can connect to the Netezza Performance Server in one of two ways. Specify only one of these methods for each connection because they are mutually exclusive.
Here is how these options are defined.
specifies the server name or IP address of the Netezza Performance Server to which you want to connect. This server accesses the database that contains the tables and views that you want to access. If the server name contains spaces or nonalphanumeric characters or if it is an IP address, you must enclose it in quotation marks.
specifies the name of the database on the Netezza Performance Server that contains the tables and views that you want to access. If the database name contains spaces or nonalphanumeric characters, you must enclose it in quotation marks.
Alias: DB=
specifies the port number that is used to connect to the specified Netezza Performance Server. If you do not specify a port, the default is 5480.
specifies the Netezza user name (also called the user ID) that you use to connect to your database. If the user name contains spaces or nonalphanumeric characters, you must enclose it in quotation marks.
specifies the password that is associated with your Netezza user name. If the password contains spaces or nonalphanumeric characters, you must enclose it in quotation marks.
Alias: PASS=, PW=, PWD=
specifies whether to connect to the Netezza database in Read-Only mode (YES) or read-write (NO) mode. If you do not specify anything for READ_ONLY=, the default of NO is used.
Alias: READONLY=
specifies the configured Netezza ODBC data source to which you want to connect. Use this option if you have existing Netezza ODBC data sources that are configured on your client. This method requires additional setup—either through the ODBC Administrator control panel on Windows platforms or through the odbc.ini file or a similarly named configuration file on UNIX platforms. It is recommended that you use this connection method only if you have existing, functioning data sources that have been specified.
Aliases: DSN=, DS=
specify how SAS processes DBMS objects. Some LIBNAME options can enhance performance, and others determine locking or naming behavior. The following table describes the LIBNAME options for SAS/ACCESS Interface to Netezza, with the applicable default values. This table also identifies LIBNAME options that are valid in the CONNECT statement in the SQL procedure. For more information, see LIBNAME Options for Relational Databases or SQL Pass-Through Facility.
|
Option |
Default Value |
Valid in CONNECT |
|---|---|---|
|
none |
|
|
|
none |
|
|
|
operation-specific |
● |
|
|
NO |
● |
|
|
NO |
|
|
|
UNIQUE |
● |
|
|
none |
● |
|
|
none |
● |
|
|
1000 when inserting rows, 0 when updating rows |
|
|
|
none |
● |
|
|
none |
● |
|
|
none |
|
|
|
DBMS |
● |
|
|
NO |
|
|
|
none |
|
|
|
none |
|
|
|
1024 |
● |
|
|
NO |
|
|
|
YES |
|
|
|
NO |
● |
|
|
COMPAT |
|
|
|
NO |
● |
|
|
none |
|
|
|
YES |
|
|
|
NO |
|
|
|
YES |
||
|
automatically calculated based on row length |
|
|
|
0 |
● |
|
|
NONE |
|
|
|
none |
|
|
|
NO |
|
|
|
NO |
|
|
|
NO |
● |
|
|
none |
|
|
|
0 |
● |
|
|
none |
|
|
|
automatically calculated based on row length |
● |
|
|
NO |
|
|
|
the current connection schema |
|
|
|
YES |
|
|
|
none |
|
|
|
none |
|
|
|
none |
|
|
|
NO |
● |
|
|
none |
|
|
|
YES |
|
|
|
NO |
● |
|
|
none |
● |
|
|
NO |
|
In this example, SERVER=, DATABASE=, USER=, and PASSWORD= are connection options.
libname mydblib netezza server=mysrv11 database=test
user=myuser password=mypwd;
proc print data=mydblib.customers;
where state='CA';
run;
In the next example, DATASRC=, USER=, and PASSWORD= are connection options. The NZSQL data source is configured in the ODBC Administrator Control Panel on Windows platforms or in the odbc.ini file or a similarly named configuration file on UNIX platforms.
libname mydblib netezza datasrc=NZSQL
user=myuser password=mypwd;
proc print data=mydblib.customers;
where state='CA';
run;