Tag Archives: TNSNAMES.ORA

netca Error: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

Problem: When configuring the TNS settings using the Oracle Net Configuration Assistant, the follow error appears:

Connecting… ORA-12514: TNS:listener does not currently know of service requested in connect descriptor. The test did not succeed.

Solution: Mismatch between hostnames in tnsnames.ora and listener.ora.

Read more »

Unable to connect from client machine to new 11.5.10.2 instance

Problem:

After configuring TNS names on the client, tried to connect to new 11.5.10.2 instance but failed.

Solution:

Managed SQL Access enabled. To disable, follow these steps:

Step 1:        Login to E-Business Suite with the ‘System Administrator’ Responsibility.

Step 2:        Go to : Profile –> System

Step 3:        Query the Profile “SQLNet Access’ at Site Level.

Step 4:        Set the Profile with the Value : ALLOW_ALL

Step 5:        Save and Exit Oracle Applications

Step 6:        Run Autoconfig on the 9i ORACLE_HOME

cd <9i ORACLE_HOME>/appsutil/scripts/$CONTEXT_NAME

adautocfg.sh

Step 7:        Bounce the 9i SQLNet Listener :

cd <9i ORACLE_HOME>/appsutil/scripts/$CONTEXT_NAME

addlnctl.sh stop <SID>

addlnctl.sh start <SID>

Metalink Reference:

Subject:  11.5.10 New Features : Managed SQL*Net Access from Hosts

Doc ID:  Note:291897.1

AC-50480: Internal error occurred: java.sql.SQLException: ORA-00001: unique constraint (APPLSYS.FND_TNS_ALIASES_U2) violated

Problem:

When running AutoConfig on database tier, the follow error appears in the log file:

=======================================================
[ Config tool : /u0/oracle/testdb/9.2.0/appsutil/bin/adgentns.pl ]
   Command            : /u0/oracle/testdb/9.2.0/Apache/perl/bin/perl -I /u0/oracle/testdb/9.2.0/Apache/perl/lib/5.00503:/u0/oracle/testdb/9.2.0/Apache/perl/lib/site_perl/5.005:/u0/oracle/testdb/9.2.0/appsutil/perl  /u0/oracle/testdb/9.2.0/appsutil/bin/adgentns.pl PASSWORD  contextfile=/u0/oracle/testdb/9.2.0/appsutil/TEST_ebusinesstest.xml
   Action             : execute
SCRIPT RETURNED:
#######################################################
                   Generate Tns Names
#######################################################
    Using java command: /u0/oracle/testdb/9.2.0/jdk/bin/java
    JAVA_HOME         :
    Java version      : 1.3.1_11
    Classpath         : /u0/oracle/testdb/9.2.0/jdk/jre/lib/rt.jar:/u0/oracle/testdb/9.2.0/jdk/jre/lib/i18n.jar:/u0/oracle/testdb/9.2.0/jdk/lib/dt.jar:/u0/oracle/testdb/9.2.0/jdk/lib/tools.jar:/u0/oracle/testdb/9.2.0/jdbc/lib/classes12.jar:/u0/oracle/testdb/9.2.0/appsutil/java/xmlparserv2.zip:/u0/oracle/testdb/9.2.0/appsutil/java
Loading ORACLE_HOME environment from /u0/oracle/testdb/9.2.0
Logfile: /u0/oracle/testdb/9.2.0/appsutil/log/TEST_ebusinesstest/04061541/NetServiceHandler.log
AC-50480: Internal error occurred: java.sql.SQLException: ORA-00001: unique constraint (APPLSYS.FND_TNS_ALIASES_U2) violated
ORA-06512: at "APPS.FND_APP_SYSTEM", line 931
ORA-06512: at "APPS.FND_NET_SERVICES", line 399
ORA-06512: at "APPS.FND_NET_SERVICES", line 675
ORA-06512: at "APPS.FND_NET_SERVICES", line 1097
ORA-06512: at line 1
Error generating tnsnames.ora from the database, temperory tnsnames.ora will be generated using templates
Instantiating templates
tnsnames.ora instantiated
listener.ora instantiated
adgentns.pl exiting with status 2
ERRORCODE = 2 ERRORCODE_END

Solution:

To implement the solution, please execute the following steps:

1. Be sure to have a valid backup.

2. Open an environment shell and set the Applications Environment

3. cd $AD_TOP/bin

4. perl <AD_TOP>/bin/adgentns.pl appspass=<APPSpwd> contextfile=<CONTEXT> -removesystem

5. Open a new shell and set the Database Environment

6. Run adconfig at the dbTier

7. Open a new shell and set the Applications Environment and also run autoconfig at the appsTier

Subject:  Autoconfig Fails with:ORA-00001: unique constraint (APPLSYS.FND_TNS_ALIASES_U2) violated

Doc ID:  416182.1

ServiceAliasException: Could not initialize Service Alias: TNS-04404

Problem:

After installing Oracle Database 10g (10.2.0.1) and upgrading it to 10.2.0.2, the listener service was not created. When attempting to create using netca (from the Command Prompt), the following error appears:

ServiceAliasException: Could not initialize Service Alias: TNS-04404

Solution:

In the C:oracleproduct10.2.0db_1networkADMIN directory, rename the listener.ora, sqlnet.ora and tnsnames.ora to listener.ora.bak, sqlnet.ora.bak and tnsnames.ora.bak.

Then rerun netca (Net Configuration Assistant) to recreate the sqlnet.ora (second option on the menu), listener.ora (first option) and tnsnames.ora (third option).

After exiting netca, start the listener by issuing the command ‘lsnrctl start’.

Setting Up Oracle Applications Desktop Integrator (ADI) 7.2

This documentation covers locating the latest version of ADI on Metalink, downloading it, installing it on the client machine and configuring it to access an Oracle Applications instance.

Step 1:        Log on to Oracle Metalink using your logon information (email address and password).

Step 2:        Search for and read “Application Desktop Integrator (ADI) – FAQ” (Doc ID: Note:106667.1) to obtain instructions to download the latest version of ADI.

(Adapted from the FAQ):

QUESTION: Where can I download ADI from?

Download ADI from Metalink

Log on to http://metalink.oracle.com
Click the Patches & Updates tab.
On the Patches & Updates page, click Advanced Search.
Enter:
Product or Product Family: Click the Torchlight icon to search for Applications Desktop Integrator (adi).
Release: ADI 7.2
Platform or Language: Microsoft Windows (32-bit) Client
Patch Type: Any
Press Go and the 7.2 base release will be available for download.

Step 3:        The results of the search are returned at the bottom of the page.

Click the link ‘3966101’ to locate the patchset.

Step 4:        You may be required to enter a username and password to access the file. Enter the email address and password that you used to log onto Metalink.

Step 5:        Details about the patchset are displayed on screen.

Click Download to begin downloading the file. Note that the download size is 71MB.

Step 6:        Click Save in the File Download dialog box, and then choose a location to save the file.

Step 7:        After downloading, execute the patchset by double-clicking on it.

Step 8:        Enter a location to unzip the files to, and then click Unzip.

Step 9:        Ensure that all files were unzipped correctly (you should see ‘5179 file(s) unzipped successfully’), and then click Ok.

Then click Close to close the WinZip Self-Extractor program.

Step 10:   In the folder that ADI was unzipped to, read the README.TXT file. It points the user to the ADI Installation Guide (ADI.PDF), which should be read before proceeding.

Step 11:    After reading the installation guide, double-click Setupadi.exe to begin installation.

Caution: Remove headphones while installing this product since it uses a lot of extremely annoying sound effects.

Step 12:   The Oracle ADI Installer loads.

Click Oracle Applications Desktop Integrator for Excel 2000/XP/2003.

Step 13:   Click Yes to begin installation.

Step 14:   The Oracle Installer Settings form is displayed. In the Company Name field, enter the name of the company. Then click Ok.

Step 15:   The Software Asset Manager appears.

Install all of the products listed under Available Products. The products can be installed individually (one at a time), or all products can be selected and installed.

Note: The ADI Online Help will require you to choose a language to install.

Step 16:   After installing the products, click Exit to exit the installer. You will be required to reboot the machine after exiting the installer.

Step 17:   After the computer restarts, load Applications Desktop Integrator by clicking on the Start button, All Programs, Oracle ADI, and finally Applications Desktop Integrator.

Note: Let the client log on to the machine so that you can configure ADI under the user’s id. This is necessary since signon details are not shared between users.

Step 18:   When the application is first loaded, a message appears informing the user to select an Applications database.

Step 19:   After reading the message by the Office Assistant, click on the Signon button.

Step 20:   The Signon form appears. Since there are no predefined databases, click Define Databases to define a new Applications database.

Step 21:   The Select Database form appears. Click Add to add a database.

Step 22:   Fill out the fields in the Add Database Details form, and then click OK.

Copy sqlnet.ora and tnsnames.ora from the “806 NET80” directory in the Project Folder to c:orantnet80admin and c:orantnetworkadmin. Note that these files contain configuration information for the production instance only.

In addition, each instance has a unique server ID. To obtain the server ID for the production instance, navigate to the Project Folder, and then open the file “Server ID.txt”. Copy the hexadecimal string under MFGP and paste it into the Server ID field in the Add Database Details form.

Step 23:   After setting up the database details, save the information and log on to ADI using an Oracle Applications username:

After logging on, perform the following:

  • Choose a Responsibility (for example, GL Super User)
  • From the ADI Toolbar, click Submit Report
  • Click Financial Statement
  • Click in the Report Name, enter % as criteria, click OK and then select a report (for example, Unaudited Balance Sheet)
  • Choose Period (for example, APR-07)
  • Click the Publishing button
  • Select Spreadsheet
  • Click Submit

The job is submitted and completes within a few minutes. It will automatically open in Excel on completion.

Errors Encountered

Error Message: “No Listener”

Solution: Either instance on server does not exist or entry in TNSNAMES.ORA is incorrect. If TNS entry in the local TNSNAMES.ORA file is correct, then listener or database is not started on the server.

Error Message: “ORA-12571: TNS Packet Writer Failure”

Solution: Cannot send packets to the server. A firewall is blocking packets on the client machine.

Error Message: “ORA-12154: TNS: could not resolve service name”

Solution: Ensure that the service name is in c:orantnet80admintnsnames.ora

Check that c:orantnet80adminsqlnet.ora has names.default_domain and name.default_zone commented off.

Check %WINDIR%system32driversetchosts file has hostname and ip address.

Error Message: “An error occurred while attempting to establish an Applications File Server connection. There may be a network configuration problem, or the TNS listener may not be running. Nodename : ORACLESRV”

Solution: Incorrect FNDFS entry is in the TNSNAMES.ORA file. Recopy sqlnet.ora and tnsnames.ora from server onto client machine.

Metalink References

Subject: Tns Packet Writer Failure When Trying To Connect To ADI Ora-12571 (Doc ID: Note:264952.1)

Subject: Unable To Start ADI ORA-12571:TNS:Packet Writer Failure (Doc ID: Note:351088.1)

Subject: Troubleshooting the “Error Occurred While Attempting to Establish an Applications File Server Connection” (Doc ID:  Note:117012.1)

[amazon asin=0071779728&template=iframe image&chan=default]     [amazon asin=1849680620&template=iframe image&chan=default]     [amazon asin=0071622292&template=iframe image&chan=default]

Upgrading 8.1.7 to 9.2.0

This documentation shows how to upgrade Oracle Applications RDBMS version 8.1.7 to 9.2.0.

Step 1:        Go to Metalink and order or download the three CDs for 9.2.0.1, for the correct platform

Step 2:        Shutdown the application tier services and the database and listener services.

Step 3:        The current RDBMS top is proddb/8.1.7. Create a new RDBMS top directory:

mkdir /raid01/oratest/oracle/proddb/9.2.0

Step 4:        Set the following environment variables:

ORACLE_HOME=/raid01/oratest/oracle/proddb/9.2.0

ORACLE_SID=TEST

Step 5:        Ensure that any TNSLSNR variables are unset.

Step 6:        If the installation was previously cancelled half-way, deinstall the installed products and/or delete the files in 9.2.0:

cd /raid01/oratest/oracle/proddb/9.2.0

rm –rf *

Step 7:        When installing, use the following values:

Destination Name: TEST_920

Destination Path: /raid01/oratest/oracle/proddb/9.2.0

Begin installation.

Creating Database Link To Transfer FSG Reports

Problem: A database link must be created in the Target instance to pull (transfer) FSG information to the production instance from the test instance.

Solution: Use Define Database Links in Oracle Applications.

To define a database link in General Ledger perform the following steps

on the Target instance (the one you are copying to):

Step 1:        Log on as sysadmin user and select a GL responsibility.

Step 2:        Navigate to Setup > System > Database Links.

There are six fields that have to be entered:

  1. Database Name
  2. Description
  3. Connect String
  4. Domain Name
  5. APPS Username
  6. APPS Password

Step 3:        In the source database, enter the following SQL query:

SELECT value FROM v$parameter
WHERE UPPER(name) = 'DB_NAME';
VALUE
--------------
PROD

This value is to be entered in the ‘Database Name’ field in Oracle Applications.

Step 4:        In the source database, enter the following SQL query:

SELECT value FROM v$parameter
WHERE UPPER(name) = 'DB_DOMAIN';
VALUE
---------------------

This value must be entered into the ‘Domain Name’ field in the form. If it is null, any value can be entered into this field (e.g. WORLD).

Step 5:        On the target database, grant privilege to apps user (log on as system user):

grant create database link to apps;

Step 6:        Ensure the two hosts are in the hosts file on each host.

127.0.0.1     localhost
128.x.x.x   oracleserver.domainname  oracleserver
128.x.x.x   oraclesrv.domainname     oraclesrv

Step 7:        Update the TNSNAMES.ORA file on each server with the entry for both instances:

PROD=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=ORACLESERVER.domainname)
(PORT=1525))
(CONNECT_DATA=
(SID=PROD)
)
)
MFGP=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=ORACLESRV.domainname)
(PORT=1527))
(CONNECT_DATA=
(SID=MFGP)
)
)

Step 8:        Ensure that the TNSNAMES.ORA was set up correctly using tnsping to ping the remote instance.

Step 9:        Ensure that SQL Restriction is turned off

Step 10:   Bounce the 920 TNS listener on each node.

Step 11:    Ensure that you can log on the other instance using SQL*Plus.

Step 12:   Enter the following values into the form:

Field Value
Database Name PROD
Description Test Database
Connect String PROD
Domain Name WORLD (since it is null, any value can be entered)
APPS Username apps
APPS Password apps

In the SQLNET.ORA file, I had to comment out the line: sqlnet.authentication_services= (NTS)

# sqlnet.authentication_services= (NTS)

Refer to Metalink Documents:

Doc ID 161635.1: (FSG Transfer Troubleshooting Guide)

Doc ID:  Note:1057188.6 (WHERE DO YOU DEFINE DATABASE LINKS FOR FSG’S?)

[amazon asin=0070077290&template=iframe image&chan=default]    [amazon asin=1453742735&template=iframe image&chan=default]    [amazon asin=0615238440&template=iframe image&chan=default]

Setting up TNSNAMES.ORA for ADI

In Oracle Applications 11.5.10, there is a security feature which prevents users from logging on to the database using SQL tools such as SQL*Plus or TOAD. Refer to Note: 291897.1 (11.5.10 New Features: Managed SQL*Net Access from Hosts) for information on resolving this problem.

To get information pertaining to the host, log on to Oracle Applications Manager, click on Site Map, Administration, and then Hosts. Click the Show link to see the host name, domain and IP address. To determine the port numbers associated with the instance, click View Configuration.

All information is available to place entries into the TNSNAMES.ORA.

NEWTEST = (DESCRIPTION=
                (ADDRESS=(PROTOCOL=tcp)(HOST=ORACLESERVER.company.local)(PORT=1521))
                (CONNECT_DATA=(SID=PROD))
            )
FNDFS_ORACLESERVER=
        (DESCRIPTION=
                (ADDRESS=(PROTOCOL=tcp)(HOST=ORACLESERVER.company.local)(PORT=1626))
            (CONNECT_DATA=
                (SID=FNDFS)
            )
        )