Oracle forms connecting SQL Server [message #286321] |
Fri, 07 December 2007 03:05 |
mann.rulz
Messages: 5 Registered: December 2007 Location: Kerala
|
Junior Member |
|
|
Could anyone please guide me in detail to connect Oracle Forms 9i/10g with MS SQL Server database?
To connect with Oracle Database, we need to copy and paste the tnsnames.ora file from the Oracle Database folder to the Oracle Forms folder.
But how do i connect with other databases like SQL Server, MS Access, and so on?
Thanks in advance.
|
|
|
|
|
Re: Oracle forms connecting SQL Server [message #286439 is a reply to message #286379] |
Fri, 07 December 2007 06:58 |
mann.rulz
Messages: 5 Registered: December 2007 Location: Kerala
|
Junior Member |
|
|
Thanks for the reply.
Could you please tell me in detail about the configuration of the ODBC driver to for the SQL Server to connect with Oracle Forms?
Or could you please give some useful detailed reference so that I can learn properly?
Thanks.
|
|
|
|
Re: Oracle forms connecting SQL Server [message #286488 is a reply to message #286457] |
Fri, 07 December 2007 10:34 |
mann.rulz
Messages: 5 Registered: December 2007 Location: Kerala
|
Junior Member |
|
|
Now I'm fully in a confused and frustrated state. Each person is saying different solutions for the problem. One person is saying to connect using ODBC driver while other is saying to connect JDBC driver. Actually which driver should I configure? Also no one is giving a clear picture for the problem.
How can I get a detailed solution for this problem (with screen shots) which include step by step procedure to configure a driver?
Thanks.
|
|
|
Re: Oracle forms connecting SQL Server [message #286490 is a reply to message #286439] |
Fri, 07 December 2007 10:36 |
mann.rulz
Messages: 5 Registered: December 2007 Location: Kerala
|
Junior Member |
|
|
Following is what I got from Oracle Forum:
""""<<<
You should be aware that Oracle SQL is not quite the same as Microsoft SQL, so some of your code will give errors.
In the past, Oracle did a product called Oracle Gateway Server, which acted as a interpreter layer between Oracle applications and MS SQL Server - it would be worth investigating this, as I think it is your best hope.
Assuming that you can connect forms to MS SQLServer direct (and I have my doubts), I would expect that it would be via a JDBC driver....
However, Microsoft's own docs say: "It is not possible to modify an Oracle Forms application for interoperation with a Microsoft® SQL Server™ database, and it is recommended that applications of this type are rewritten." source: http://www.microsoft.com/technet/solutionaccelerators/cits/interopmigration/unix/oracleunixtosql/or2sql17.mspx
cheers,
J
"""">>>>
|
|
|
|
Re: Oracle forms connecting SQL Server [message #286558 is a reply to message #286519] |
Sat, 08 December 2007 04:02 |
mann.rulz
Messages: 5 Registered: December 2007 Location: Kerala
|
Junior Member |
|
|
So, I would be pleased if you could please guide me with step by step procedure to get connected with Oracle Forms using SQL Server?
Or atleast some reference site where I can find the same.
Thanks.
|
|
|
|
|
Re: Oracle forms connecting SQL Server [message #286922 is a reply to message #286878] |
Mon, 10 December 2007 08:00 |
|
Maaher
Messages: 7065 Registered: December 2001
|
Senior Member |
|
|
Ok, here it is. A small example using Access instead of MS SQL Server.
NOTE: No guarantees whatsoever. This example just shows how to connect to an Access database from within Forms. I strongly suggest that you do this from the database and not from forms directly. But for the sake of the example, here goes:
Environment:- WIndows XP
- Oracle 10g XE
- MS Access 2003
- Forms 10g
STEP I:
Create a simple access database. In this example, it is "C:\orafaq\Orafaq.mdb". This database contains a single table, called "emp" with the columns "ename" and "empno".
STEP II:
In the ODBC Data source administrator, you need to add a System DSN pointing to this database. So you select "MS Access Driver" and add the name "OrafAccess" in the data source name. Make sure you've added the correct .mdb file (orafaq.mdb)
STEP III:
Now we set up the HS init file: it's name is fixed (init<ODBCNAME>.ora). It contains only two lines of code:
$ORACLE_HOME/hs/admin/initOrafAccess.ora:
#
# HS init parameters
#
HS_FDS_CONNECT_INFO = OraFaccess
HS_FDS_TRACE_LEVEL = 0
STEP IV:
Next, I changed the listener.ora of my XE database:
$ORACLE_HOME/network/admin/listener.ora:
added in SID_LIST:
(SID_DESC =
(SID_NAME = OrafAccess)
(ORACLE_HOME = <oracle_home>)
(program = hsodbc)
)
STEP V:
$ORACLE_HOME/network/admin/tnsnames.ora:
The setup of the HSODBC is done, and we need to make it accessible for our Oracle users. Like any other database there has to be an entry in the TNSNAMES.ORA file:
ORAFACCESS =
(description =
(address = (protocol=tcp)(host=localhost)(port=1521))
(connect_data = (sid=orafaccess))
(hs=ok)
)
STEP VI:
bounce the listener. You can do this befor step V, but I just did it in this order.
STEP VII:
SQL*Plus:
SQL> create database link orafaccess using 'ORAFACCESS';
Database link created.
SQL> desc emp@orafaccess
Name Null? Type
----------------------------------------- -------- ----------------------------
empno NUMBER(10)
ename VARCHAR2(50)
SQL> create synonym access_emp for emp@orafaccess;
Synonym created.
SQL> desc access_emp;
Name Null? Type
----------------------------------------- -------- ----------------------------
empno NUMBER(10)
ename VARCHAR2(50)
SQL>
STEP VIII:
In Forms we make a basic form:
- data block wizard
- table Access_emp
- key mode UPDATEABLE (rowid won't work)
- empno = primary key
- layout wizard
- tabular design
I added double quotes (") around the column names in the property palette. I also added the following triggers:
ON-COMMIT:
ON-LOCK:
ON-DELETE:
BEGIN
DELETE_RECORD;
END; I'm not 100% convinced that the ON-DELETE trigger is necessary but it didn't hurt. The ON-LOCK trigger and ON-COMMIT triggers were necessary due to differences in Access locking mechanism. I can't tell whether it will work like that in MS SQL Server...
Test the form. Enjoy!
How's that as a step for step explanation .
MHE
[edit]typo...again
[Updated on: Tue, 11 December 2007 01:13] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
Re: Oracle forms connecting SQL Server [message #334387 is a reply to message #334381] |
Wed, 16 July 2008 06:20 |
krishnamoorthi
Messages: 4 Registered: July 2008 Location: annur coimbatore india
|
Junior Member |
|
|
Hi
I 've done this way
Create a database called northwind in any prompt. Eg) d:\northwind.mdb.
Then Create the ODBC Connection for northwind databse.
Create the HS service
Run the rdbms\caths.sql Sys account in particular DB
HS_FDS_CONNECT_INFO = odbcnorth ## ODBC file Name
HS_FDS_TRACE_LEVEL = 0
Configure Listener in
(SID_DESC =
(SID_NAME = south)
(ORACLE_HOME = d:\oracle\ora90)
(PROGRAM = hsodbc)
)
Configure TNS Name in
south.GRSYSTEMS =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = grs6)(PORT = 1521))
)
(CONNECT_DATA = (SERVICE_NAME = south))
(HS=OK)
)
Note:
If Listener Properties have Local system Account, you should be changed to This Account.
STOP the OracleOraHome90TNSListener service. Again
START the OracleOraHome90TNSListener service.
Create the Link for MS-Access database from oracle
(user syscreate database link nwind connect to sys identified by change_on_install using 'south.grsystems’;
STOP the OracleOraHome90TNSListener service. Again
START the OracleOraHome90TNSListener service.
select * from orders@nwind;
That’s all
If hav any doubts see this links
http://www.oracle-base.com/articles/9i/HSGenericConnectivity9i.php
Hope this...
Krish
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Oracle forms connecting SQL Server [message #334580 is a reply to message #334573] |
Thu, 17 July 2008 03:57 |
Frank
Messages: 7901 Registered: March 2000
|
Senior Member |
|
|
Check to see if you edited the correct listener.ora
My listener starts correctly, except for the fact that it whines about a target that cannot be found (I did not create the extra tnsname, because I don't want to connect to Access.)
|
|
|
|
|
|
|