Wednesday, December 19, 2012

Oracle Client installation on Windows

Download the client here: http://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win32soft-098987.html

The file is win32_11gR2_client.zip.

I run install the setup ad Administrator - otherwise it fails to assess the prerequisites - and I specify as installation directory C:\pierre\oradb\product\11.2.0\client_1

I also do custom installation and choose "Oracle Database Utilities"




This will surely install also exp and imp export utilities.

Once installation is done, I go to C:\pierre\oradb\product\11.2.0\client_1\network\admin
and AS ADMINISTRATOR I create a tnsname.ora file with this content (be careful about spaces etc):


PIPPO_PPRD =(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dmhost.acme.com)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=srv_osb)))

To test, I go to C:\pierre\oradb\product\11.2.0\client_1\bin and run:

exp help=y
the BUFFERS parameter is very important for performance
Make sure you define
PATH=C:\pierre\oradb\product\11.2.0\client_1\bin;C:\pierre\oradb\product\11.2.0\client_1\

I have also set
set TNS_ADMIN=%PATH%;C:\pierre\oradb\product\11.2.0\client_1\network\admin
but I am not sure if it's required

This command should work:

exp pp1_soainfra/pp1_peppo@PIPPO_PPRD TABLES=PIPPO_FTP SERVERS file=c:\pierre\myexport.exp log=c:\pierre\mylog.log STATISTICS=NONE

if not, check the TNSNAMES.ORA with this command:

tnsping PIPPO_PPRD

TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 19-DEC-2012 16:02:39

Copyright (c) 1997, 2010, Oracle.  All rights reserved.

Used parameter files:
c:\pierre\oradb\product\11.2.0\client_1\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dmhost.acme.com)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=srv_osb)))

OK (50 msec)


No comments: