Share Oracle Forms application on a local network - oracle

In my local network i have a server (Windows Server R2) and two computers with Windows 7, in my server i have Oracle database 10g and Oracle Forms and Reports 6i installed along with my forms application, i want to share my application on the network, and the best way i could think of is:
On the server:
Share the ORANT folder (C:\orant\).
Share the application folder (C:\app).
On the client computer:
Map a network drive for each folder, for example 'Y:' for 'orant' and 'Z:\' for 'app'.
make a shortcut on the desktop of "Y:\BIN\ifrun60.exe"
In the shortcut properties:
-The target is : Y:\BIN\ifrun60.EXE inicial.fmx
-Start in is: Z:\
I was wondering if that would work? Or do i have to do something else? is there a problem i should expect when doing this?
PS: it's for a client, and i can't test anything unless i'm sure of it.

The oracle runform client ifrun60.EXE needs a registry branch (it is necessary to copy the registry branch from the server) and also it is necessary to add paths to the PATH variable.

In order to share my application on the network, i followed the next steps:
Shared the application folder from the server.
Installed oracle forms and reports 6i on each client machine.
Created a shortcut to the ifrun60.exe with the starting form name (\server\app_dir\start.fmx) as the parameter and the application folder(\server\app_dir) as the start in.
Added this to the tnsnames.ora file in each orant directory of each machine :
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = server_IP )(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
and it worked perfectly!

Related

Oracle database 12c networking between client and server machine using TNS

I followed the instructions in the link: https://m.youtube.com/watch?v=ONGz9czAikE
And got to the point of testing a Local Net Name Configuration(8:30) when i got to the point of preforming the test it seems like the window is stuck, same thing happens when i try to connect to the server db with Sql developer there i get a socket timeout error after waiting few minutes.
I'm trying to avoid downloading the oracle client software because of a company long security verification protocol.
What am i missing? Any help will be appreciated.
From here:
Oracle 12c server cannot be accessed from remote computer using the .Net provider
Try using an external IP instead of hostname like so:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.30.50.90)(PORT = 1521))
)
)

How to connect Oracle 11G database using SQL developer from another computer in a LAN connection

I am very new in database and learning Oracle 11G. So, I do not have deep knowledge on it.
I have several computers in my lab connected via LAN. Oracle 11G is installed in computer-A(192.18.100.115). Now I want to use the database from other computers in my Lab via SQL Developer that is installed into all Computers.
Would you please explain
What I need to do in Computer-A for granting access from other Computers?
What I need to do in other computers for getting access from computer-A?
I will be grateful if any one gives me a proper solution.
What I need to do in Computer-A for granting access from other Computers?
You need to make sure the LISTENER is up and running to accept remote connection requests. Listener.ora is a SQL*Net configuration file used to configure Oracle Database Listeners. You will usually find that in ORACLE_HOME\NETWORK\ADMIN directory.
For example,
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521))
)
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = ORCL)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0)
(SID_NAME = ORCL)
)
)
As you mentioned your host 192.18.100.115, you need to put it in the hostname.
What I need to do in other computers for getting access from computer-A?
You just need to install Oracle database client. If you only want to connect to the remote DB server, you could install only Instant client.
If you are using SQL Developer, then you could use:
Basic connection type
Or,
TNS connection type
In basic connection type, you need to provide all the connection details in the connection properties itself. For using TNS connection type, you need to configure the tnsnames.ora file present in ORACLE_HOME\NETWORK\ADMIN directory.

TNS:name lookup failure

I have a stand-alone workstation at work that connects to an oracle database. It's been working fine for years and then all of sudden I get an error:
[INTERSOLV][ODBC Oracle driver][Oracle]ORA-12545: TNS:name lookup failure
When I ping the server I am trying to connect to from the command prompt, it replies back with the right IP address. If I do a TNSPING, that seems to be ok as well.
I have a separate PC that is on the computer network and it connects to the server just fine - it doesn't have that error above in bold.
There is another, different oracle database that I connect to on that stand-alone PC and it's still working fine. So, it's not like I lost the ability to connect to any or all Oracle databases - just something about this one.
I'm confused why it won't work and haven't had any luck trying to fix it. I'm not sure how to proceed.
Any help would be appreciated.
Try defining the environment variable TNS_ADMIN to point at the location where your TNSNAMES.ORA file resides.
EDIT:
Can you connect with SQL*Plus directly?
If it's installed, this should work (replace user and db with the userid and database to conenct to):
sqlplus user#db
Failing that, try connecting with EZCONNECT:
Modify sqlnet.ora file:
NAMES.DIRECTORY_PATH=(TNSNAMES,EZCONNECT)
Change your ODBC Connection in the Oracle ODBC Driver Configuration wizard to use the EZCONNECT string:
Replace the TNS Service Name with:
<db_host>:port/<db_name>
e.g.,
MYHOST:1521/MYDB
This points to the database MYDB on host MYHOST at port 1521 (the default port).
Try testing the connection. If that fails, try using the IP address instead of the hostname.
Given your TNSNAMES entry from your comments:
ESTRNP = (DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ESTRNP)(PORT = 1521))
)
(CONNECT_DATA = (SID = ESTRNP))
)
You might try changing the CONNECT_DATA line to:
(CONNECT_DATA = (SERVICE = ESTRNP))
It is possible that the SID of the database was changed. Is this entry the same as the entry on the machine that works?
do you have recently install any other oracle software?
It is possible that you have multiple tnsnames.ora files on different locations and the odbc driver finds the wrong one.
Inspect you path environment variable, whether the path to the right one is at the first place.

Connect to an Oracle DB using ODBC

I am developing an application that needs to interract with a "lightly documented" Legacy Oracle Database. To Start that process I want to start creating a view into that Database using ODBC links into an MS Access database so I can figure out the DB structure but I can't figure out how to setup the ODBC connection to the Oracle DB.
I have been able to connect using the Host and Service Name to and view the DB using SQL Developer; but, I can't figure out how to setup ODBC. I am running Windows 7 and have installed Oracle 11g, Oracle Express Edition, the Instant Client and ODBC extensitons; but on the ODBC setup Oracle wants me to pick a TNS Service Name but there is none to pick and there is no place to specify the host. I tried to setup a TNS in tnsnames.ora; but I am not really sure I know the right location for that file.
I really thought this would be the easy part; but, it really hasn't been.
Navigate to the Control Panel > Administrative Tools > Data Sources (ODBC)
Select the System DSN tab and click 'Add'. Next scroll down the lists of drivers until you find Microsoft ODBC for Oracle.
Fill in the required information in the above form and click 'OK'. Now you can add the tables to 'Access' by clicking on the 'External Data' tab then clicking on 'More'. Choose 'ODBC Databases', then 'Import the source data...', next click on the 'Machine Data Source' tab.
The simplest option to generate the tnsnames.ora file is to let Oracle do it. If you launch the Oracle Net Configuration Assistant (Start | Oracle in Oracle Home Name | Configuration and Migration Tools | Net Configuration Assistant), you should be able to choose "Local Net Service Name configuration" which allows you to add (or modify) a TNS alias. That will walk you through gathering the information you'll need to connect.
If you are more comfortable dealing with the text files directly, you can directly edit the tnsnames.ora file in %Oracle Home%\network\ADMIN\tnsnames.ora using this as a template.
<TNS alias> =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = <hostname or IP>)(PORT = <port>))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = <database service name>)
)
)
In tnsnames.ora, try changing SERVICE_NAME to SID. That worked for me.
My Experience
1. TNSNAMES.ORA is as follows.
XE =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = 192.168.2.116)
(PORT = 1521)
)
)
(CONNECT_DATA =
(SERVICE_NAME = XE)
)
)
Set Windows Environment Variables (ControlPanel --> System --> Detail..)
2-1. Add to PATH
c:\oraclexe\instantclient_11_2\ --- install directory of instantclient
2-2. Add New Environment Variable
TNS_ADMIN c:\oraclexe\instantclient_11_2\ --> install directory
NLS_LANG = JAPANESE_JAPAN.JA16SJISTILDE
Windows command prompt
cd c:\Windows\SysWow64 <--I use 32bit ODBC in 64bit Win7
odbcad32.exe
  Name : ICODBC <-- as you like
Service Name : XE
User Name: system
Press Connection Test Button

Unreliable Oracle connection (intermittent error "Connect failed because target host or object does not exist")

We recently changed physical DB's, new servers, new locations, same database schema and data and since the change over, whenever we try to connect directly to the DB in our own desktop type applications about half of the time we get this error:
SQL*Loader-704: Internal error: ulconnect: OCIServerAttach[0]
ORA-12545: Connect failed because target host or object does not exist
The rest of the time, it connects right away without any issues. Our applications that establish connections via JDBC don't seem to have any issues but we do when going through something that does a tnsnames.ora lookup (or that's my hunch at least). TNSPING works 100% but using an oracle executable like SQLLDDR fails at least 50% of the time. Here's an anonymized snppet of our TSNNAMES file and a TNSPING output:
DB_CONNECTION =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 1.2.3.4)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = MY.URL.COM)
)
)
And the TNSPING:
C:\>TNSPING DB_CONNECTION
TNS Ping Utility for 32-bit Windows: Version 9.2.0.1.0
Copyright (c) 1997 Oracle Corporation. All rights reserved.
Used parameter files:
C:\oracle\ora92\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
(HOST = 1.2.3.4)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = MY.URL.COM)))
OK (200 msec)
I have the SID of the DB, which is what the JDBC connections rely on but adding it to the tnsnames.ora doesn't improve the odds of making a connection. I don't know enough about how the tnsnames file is being used by Oracle to intelligently resolve this issue. What can I try?
Edit
The new DB's may be two load balanced databases which may be part of the problem.
We recently had a similar issue with our application. The application would sometimes connect to the Oracle RAC and sometimes it would complain with ORA-12545.
In short the issue was that the server had a real name while we were using virtual IP addresses in TNSNAMES.ORA. Once we added the mapping of the server name to IP address via system32\drivers\etc\hosts file everything started to work properly.
I have written a bit more in my blog
<shameless advert>http://dcarapic.blogspot.com/2009/04/intermittent-ora-12545-error.html</shameless advert>
Ah, gotta love the intermittent problems :)
(In the following I have had to replace the underscore character as I don't know the escape char for this wiki language)
Are you always using the same OS user to connect and to do the tnsping?
Check for environment variables TNS[underscore]ADMIN pointing to different tnsnames.ora locations. Do a scan of the client for duplicate tnsnames.ora; either in locations pointed to by $TNS[underscore]ADMIN or in different $ORACLE[underscore]HOMES (e.g. if you have 2 Oracle client installs).
Likewise check that you are using the same $ORACLE[underscore]HOME and $PATH environment variables for all connection attempts and tnsping. (E.g. always the same OS user or each user has the same values)
I see that the tnsping output reports version 9.2 so this is not likely, but in 11g the DB registers with the listener which can take a minute or so. (maybe also true with 10g). Attempts to connect prior to this will not find the target.
Another unlikely possibility - is a service with the same service name still advertised on the old host server? Remove it if at all possible.
After that I would start to look at the network itself. Is a ping of the server always successful and quick? If you're using the hostname rather than IP in the tnsnames.ora, does the hostname reliably resolve to the correct IP (nslookup). Is there a local firewall and if so is it behaving?
Regards
Karl
If you are using Oracle 10g, you may use an Easy Connect handler instead:
//servername/instancename
,
//1.2.3.4/my.url.com
in your case.
It's immune to lots of TNSNAMES issues.

Resources