Author Topic: aix psqlodbc issue  (Read 2438 times)

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2035
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
aix psqlodbc issue
« on: เมษายน 03, 2018, 10:21:58 AM »
export PATH=/opt/IBM/xlc/13.1.2/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/opt/freeware/lib
export CCC=xlc_r cc=xlc_r CXX=xlc_r CFLAGS=-q64 ARFLAGS="-X 64" OBJECT_MODE=64 LDFLAGS="-L/usr/local/lib"
export cc=xlc_r
export CXX=xlc_r
export CFLAGS=-q64
export ARFLAGS="-X 64"
export OBJECT_MODE=64
export LDFLAGS="-L/usr/local/lib"
export odbcinst=/usr/local/lib

export CC=gcc
export CFLAGS="-maix64 -q64 -DBUILD_REAL_64_BIT_MODE"
export OBJECT_MODE=64

configure: error: unixODBC library "odbcinst" not found

# odbc_config --version
2.3.1


cd /home/tliusr01/psqlodbc/psqlodbc-09.06.0500
./configure --prefix=/usr/local --includedir=/usr/opt/freeware/include --libdir=/usr/opt/freeware/lib --with-unixodbc=/usr/opt/freeware/bin --with-libpq=/usr/opt/freeware/lib


./configure --prefix=/usr/local --includedir=/usr/local/include --libdir=/usr/lib64 --with-unixodbc=/usr/local/bin

./configure --with-unixodbc=/usr/local --libdir=/usr/local/lib


Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-silent-rules   less verbose build output (undo: "make V=1")
  --disable-silent-rules  verbose build output (undo: "make V=0")
  --enable-maintainer-mode
                          enable make rules and dependencies not useful (and
                          sometimes confusing) to the casual installer
  --enable-dependency-tracking
                          do not reject slow dependency extractors
  --disable-dependency-tracking
                          speeds up one-time build
  --disable-pthreads      do not build with POSIX threads
  --enable-static[=PKGS]  build static libraries [default=no]
  --enable-shared[=PKGS]  build shared libraries [default=yes]
  --enable-fast-install[=PKGS]
                          optimize for fast installation [default=yes]
  --disable-libtool-lock  avoid locking (might break parallel builds)

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-unixodbc[=DIR]   [default=yes] DIR is the unixODBC base install
                          directory or the path to odbc_config
  --with-iodbc[=DIR]      [default=no] DIR is the iODBC base install
                          directory or the path to iodbc-config
  --with-libpq[=DIR]      DIR is the PostgreSQL base install
                          directory or the path to pg_config
  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
                          both]
  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
  --with-sysroot=DIR Search for dependent libraries within DIR
                        (or the compiler's sysroot if not specified).




Could not load program /usr/bin/pg_config:
Could not load module /lib/libintl.a(libintl.so.9).
        Dependent module /opt/freeware/lib/libiconv.a(libiconv.so.2) could not be loaded.
        Member libiconv.so.2 is not found in archive
Could not load module pg_config_64.
        Dependent module /lib/libintl.a(libintl.so.9) could not be loaded.
Could not load module .
Could not load program /usr/bin/pg_config:
Could not load module /lib/libintl.a(libintl.so.9).
        Dependent module /opt/freeware/lib/libiconv.a(libiconv.so.2) could not be loaded.
        Member libiconv.so.2 is not found in archive
Could not load module pg_config_64.
        Dependent module /lib/libintl.a(libintl.so.9) could not be loaded.
Could not load module .
Could not load program /usr/bin/pg_config:
Could not load module /lib/libintl.a(libintl.so.9).
        Dependent module /opt/freeware/lib/libiconv.a(libiconv.so.2) could not be loaded.
        Member libiconv.so.2 is not found in archive
Could not load module pg_config_64.
        Dependent module /lib/libintl.a(libintl.so.9) could not be loaded.
Could not load module .

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2035
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
Re: aix psqlodbc issue
« Reply #1 on: เมษายน 10, 2018, 12:07:31 PM »
####Error log from SAS App connection
ERROR: CLI error trying to establish connection: could not connect to server: No such file or directory  Is the server running
       locally and accepting  connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
ERROR: Error in the LIBNAME statement.

ให้ลองเชค odbc.ini
ในส่วนของ servername ให้ใส่ให้ตรงด้วย

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2035
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
Re: aix psqlodbc issue
« Reply #2 on: เมษายน 10, 2018, 06:44:39 PM »
http://media.datadirect.com/download/eval_docs/odbc_unix_quickstart.htm#_MySQL_Wire_Protocol_

Connection Options

Database: The name of the database to which you want to connect by default.

HostMame: The name of the machine on which the Informix server resides.

ServerName: The name of the Informix server as it appears in the sqlhosts file.

Service: The name of the service as it appears on the host machine.

Informix Wire Protocol
To configure a connection, you might enter:

[Informix Wire Protocol]
Driver=ODBCHOME/lib/xxifclnn.zz
Database=Informix3
HostName=InformixHost
LogonID=JohnD
PortNumber=1500
ServerName=InformixServer

Connection Options

Database: The name of the database to which you want to connect by default.

Hostname: Either the name or the IP address of the server to which you want to connect.

LogonID: Your user name as specified on the Informix server.

PortNumber: The port number of the server listener.

ServerNumber: The name of the Informix server as it appears in the sqlhosts file.

MySQL Wire Protocol
To configure a connection, you might enter:

[MySQL Wire Protocol]
Driver=ODBCHOME/lib/xxmysqlnn.zz
Database=MySQL3
HostName=MySQLHost
PortNumber=3306

Connection Options

Database: The name of the database to which you want to connect by default.

Hostname: Either the name or the IP address of the server to which you want to connect.

PortNumber: The port number of the server listener. The default is 3306.

Oracle
IMPORTANT: You must have all components of your database client software installed and connecting properly; otherwise, the driver will not operate correctly.

To configure a connection, you might enter:

[Oracle]
Driver=ODBCHOME/lib/ ivor8xx.nn
ServerName=OracleServer

Connection Options

ServerName: The client connection string designating the server and database to be accessed. The information required varies depending on the client driver you are using.

Oracle Wire Protocol
To configure a connection, you might enter:

[Oracle Wire Protocol]
Driver=ODBCHOME/lib/xxorann.zz
EditionName=oracle 1
HostName=199.226.224.34
PortNumber=1521
ServiceName=TEST

Connection Options

Hostname: Either the name or the IP address of the server to which you want to connect.

PortNumber: The port number of your Oracle listener. Check with your database administrator for the number.

ServiceName: The Oracle service name that specifies the database used for the connection. The service name is a string that is the global database name—a name that is comprised of the database name and domain name, for example: sales.us.acme.com.

SID: The Oracle System Identifier that refers to the instance of Oracle running on the server. The default is ORCL.

NOTE: SID and ServiceName are mutually exclusive. Only one or the other can be specified in the data source; otherwise, an error is generated.

EditionName: Oracle 11g R2 and higher only. The name of the Oracle edition the driver uses when establishing a connection. Oracle 11g R2 and higher allows your database administrator to create multiple editions of schema objects so that your application can still use those objects while the database is being upgraded. This option is only valid for Oracle 11g R2 and higher databases and tells the driver which edition of the schema objects to use.

PostgreSQL Wire Protocol
To configure a connection, you might enter:

[PostgreSQL Wire Protocol]
Driver=ODBCHOME/lib/xxpsqlnn.zz
Database=Pgredb1
HostName=PostgreSQLServer
PortNumber=5432

Connection Options

Database: The name of the database to which you want to connect by default.

Hostname: Either the name or the IP address of the server to which you want to connect.

PortNumber: The port number of the server listener. The default is 5432.

Progress OpenEdge® Wire Protocol
To configure a connection, you might enter:

[Progress OpenEdge Wire Protocol]
Driver=ODBCHOME/lib/xxoenn.zz
Database=odb1
HostName=OpenEdgeServer
PortNumber=5432

Connection Options

Database: The name of the database to which you want to connect by default.

Hostname: Either the name or the IP address of the server to which you want to connect.

PortNumber: The port number of the server listener.

Salesforce
The driver requires a Java Virtual Machine (JVM): Java SE 7 or higher. Before you configure a data source for the Salesforce driver, you must set the library path environment variable for your operating system to the directory containing your JVM’s libjvm.so [sl | a] file, and that directory’s parent directory. The library path environment variable is:

·  LD_LIBRARY_PATH on Linux, Oracle Solaris, and HP-UX Itanium

·  SHLIB_PATH on HP-UX PA-RISC

·  LIBPATH on AIX

To configure a connection, you might enter:

[Salesforce]
Driver=ODBCHOME/lib/ivsfrc27.so
HostName=test.salesforce.com
UserName=JohnDoe
Password=secret

Connection Options

Host Name: The default Salesforce instance is login.salesforce.com. If you are logging into a different Salesforce instance, type the root of the Salesforce URL.

User Name: Type your logon ID for Salesforce.

Password: Type your case-sensitive password for the Salesforce instance.

If your Salesforce instance requires a security token, you can append it to the password, for example, secretXaBARTsLZReM4Px47qPLOS, where secret is the password and the remainder of the value is the security token. Both the password and security token are case-sensitive.

Fetch Size: Smaller fetch sizes can improve the initial response time of the query. Larger fetch sizes improve overall fetch times at the cost of additional memory. Smaller fetch sizes can improve the initial response time of the query. Larger fetch sizes improve overall fetch times at the cost of additional memory.

WS fetch size: If set to 0, the driver attempts to fetch up to a maximum of 2000 rows. This value typically provides the maximum throughput. Setting the value lower than 2000 can reduce the response time for returning the initial data.

SQL Server Wire Protocol
To configure a connection, you might enter:

[SQLServer1 Wire Protocol]
Driver=ODBCHOME/lib/xxsqlsnn.zz
HostName=123.123.0.12
Database=master
PortNumber=1433

Connection Options

HostName: The name or the IP address of the server to which you want to connect.

If your network supports named servers, you can specify an address as: server_name. For example, you can enter SSserver.

You can also specify a named instance of Microsoft SQL Server. Specify this address as: server_name\instance_name. If only a server name is specified with no instance name, the driver uses the default named instance on the server.

Database: The name of the database to which you want to connect by default.

PortNumber: The port number of the server listener. The default is 1433.

Sybase IQ Wire Protocol
To configure a connection, you might enter:

[Sybase IQ Wire Protocol]
Driver=ODBCHOME/lib/xxsyiqnn.zz
Database=master
NetworkAddress=123.226.224.34,2638

Connection Options

Database: The name of the database to which you want to connect by default. If you do not specify a value, the default is the database defined by the system administrator for each user.

NetworkAddress: The IP address of the server to which you want to connect. Specify this address as: IP_address, port_number. For example, you can enter 123.226.224.34, 2638.

If your network supports named servers, you can specify an address as: server_name, port_number. For example, you can enter SyIQserver, 2638.

User Name: The default user ID that is used to connect to your database. Your ODBC application may override this value.

Sybase Wire Protocol
To configure a connection, you might enter:

[Sybase Wire Protocol]
Driver=ODBCHOME/lib/xxasenn.zz
Database=master
NetworkAddress=123.226.224.34,5000

Connection Options

Database: The name of the database to which you want to connect by default. If you do not specify a value, the default is the database defined by the system administrator for each user.

NetworkAddress: The IP address of the server to which you want to connect. Specify this address as: IP_address, port_number. For example, you can enter 123.226.224.34, 5000.

If your network supports named servers, you can specify an address as: server_name, port_number. For example, you can enter SSserver, 5000.

Driver for the Teradata Database
IMPORTANT: You must have all components of your database client software installed and connecting properly; otherwise, the driver will not operate correctly.

To configure a connection, you might enter:

[Teradata]
Driver=ODBCHOME/lib/xxterann.zz
DBCName=123.123.12.12
SecurityMechanism=TD2
SecurityParameter=5678
UserID=John

Connection Options

DBCName: The IP address or the alias name of the Teradata Server. Using an IP address reduces the time it takes to connect, but if that address is not available at connection time, the connection fails and the driver does not attempt to fail over to another address.

Using an alias name increases the time it takes to connect because the driver must search a local hosts file to resolve the name to the IP address information, but it allows the driver to try and connect to alternate IP addresses if the first address fails. If you use an alias name, you must have or create a local hosts file that contains the alias names. The alias name cannot be more than eight characters long.

SecurityMechanism: Enter TD2.

SecurityParameter: A string of characters that is to be regarded as a parameter to the authentication mechanism. The string is ignored by the ODBC driver and is passed on to the TeraSSO function that is called to set the authentication mechanism. The characters [] {} () , ; ? * = ! @ must be enclosed in curly braces.

UserID: The default UserID for the Teradata database.

Testing the Connection
The DataDirect Connect Series for ODBC installation includes a program named example that can be used to connect to a data source and execute SQL. The application is located in the ODBCHOME/example directory. To run the program, type example and follow the prompts to enter your data source name, user name, and password. If successful, a SQL> prompt appears and you can type in SQL Statements such as

SELECT * FROM accounts

If example is unable to connect, the appropriate error message appears.