...
- Install PostgreSQL 8.3.9 or later along with client tools. You can install the server in a different host than your development host if necessary. However, you must have the client tools available on your development host including the JDBC driver and command line utility
psql
. - Place the JDBC driver in the third-party lib directory that you created earlier.
- The location of PostgreSQL server is specified in the
build.properties
file by the value for the propertysqoop.test.postgresql.connectstring.host_url
. This property defaults tojdbc:postgresql://localhost/
which assumes local installation and default port setup. If however your PostgreSQL server is installed on a different host or on a different port you should specify it explicitly as follows:Code Block sqoop.test.postgresql.connectstring.host_url=jdbc:postgresql://<pgsqlhost>:<pgsqlport>/
- In order to run PostgreSQL third-party tests, you would need to configure the database as follows:
- Edit the
pg_hba.conf
file and setup the authentication scheme to allow for testing. In a secured environment, it may be easy to setup up full trust based access by adding the following lines in this file, and commenting out any other lines referencing 127.0.0.1 or ::1.Code Block local all all trust host all all 127.0.0.1/32 trust host all all ::1/128 trust
- Also in the file
postgresql.conf
uncomment the line that starts withlisten_address
and set its value to '*' as follows:Code Block listen_address = '*'
- Restart your PostgreSQL server after modifying the configuration files above.
- Create the necessary user and database for Sqoop testing as follows:
Code Block $ sudo -u postgres psql -U postgres template1 template1=> CREATE USER sqooptest; template1=> CREATE DATABASE sqooptest; tempalte1=> \q $
- Edit the
Setting up Oracle
- Install Oracle 10.2.x or later and download the corresponding JDBC driver.
- Place the JDBC driver in the third-party lib directory that you created earlier.
- The location of Oracle server is specified in the
build.properties
file by the value for the propertysqoop.test.oracle.connectstring
. This property defaults tojdbc:oracle:thin:@//localhost/xe
which assumes local installation and default port setup. If however your Oracle server is installed on a different host or on a different port you should specify it explicitly as follows:Code Block sqoop.test.oracle.connectstring=jdbc:oracle:thin:@//<oraclehost>:<port>/<sid>
- In order to run Oracle third-party tests, you would need to configure the database as follows:
Code Block $ sqlplus system/<password>@<sid> SQL> CREATE USER SQOOPTEST identified by 12345; SQL> GRANT CONNECT, RESOURCE to SQOOPTEST; SQL> CREATE USER SQOOPTEST2 identified by ABCDEF; SQL> GRANT CONNECT, RESOURCE to SQOOPTEST2; SQL> exit $
- Note: If you are using Oracle XE and see an error like
ORA-12516, TNS:listener could not find available handler with matching protocol stack
, you are likely running into connection exhaustion problem. To circumvent this, log into the Oracle server asSYSTEM
, run the command below and restart your server.Code Block $ sqlplus system/<password>@<sid> SQL> ALTER SYSTEM SET processes=200 scope=spfile; SQL> exit $