I'm trying to create a link between oracle 10g and ms access 2007 but I don't know how to set parameters in my tnsnames.ora file to access my MS Access db.
I've created new Data Source in ODBC Data Source Administrator with Microsoft Access Driver and selected my access db (.mdb).
In the MS Access I can link between tables and I see data from my Oracle db, but I need to create a database link from Toad or SqlDeveloper so I can change data in MS Access db with some trigger in my Oracle db. When I try to test my db link I get the following error :
Error : ORA-12154: TNS:could not resolve the connect identifier specified, because I don't know what parameters I need to write into my tnsnames.ora file. MS Access db is located on my hard drive. Here is how my tnsnames.ora looks like :
accdb =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost) (PORT = 3306)
)
(CONNECT_DATA =
(SID = hsodbc)
(HS=OK)
)
but I'm not sure for PORT and SID.
Any help?
This article shows how Oracle's Heterogeneous Services can be configured to allow a database to connect to a Microsoft Access database using standard databases links:
http://www.orafaq.com/node/60
Try this as a starting point
http://download.oracle.com/docs/html/B10544_01/ch2.htm#1005725
Related
My goal is to load data from SQL Server to MS Access table.
Informatica Server is - Red Hat Enterprise Linux 7.3
Informatica Version is - 10.2.0 Hotfix 1
MS Access Version - 2016
MS Access file location - Windows
Reading from SQL Server is no issue, but I am not able to figure out how to connect to MS Access database file that is in my local windows directory.
I created an ODBC connection in workflow manager and used dummy username and password. I am not sure if I have to use dummy credentials here either.
ODBC connection in Informatica
I created DSN in my local computer. Using the DSN, I was able to create Informatica target in mapping designer.
ODBC DSN
MS Target in Designer
When I run the wf, I get the below error. I probably need to update the ODBC.ini file in my informatica server. But I don't know what details I could use there e.g. which driver to use or other fields.
Workflow Error
Error code: -
CMN_1022 [
[DataDirect][ODBC lib] Driver Manager Message file not found. Please check for the value of InstallDir in your odbc.ini.
Database driver error...
Function Name : Connect
Database driver error...
Function Name : Connect
Database Error: Failed to connect to database using user [test] and connection string [IFRSXTRACT].]
Can someone guide me if there are any other steps to establish connection to MS Access.
Please help.. I need to connect to a SQL Server database (B) from an Oracle database (A) which are both on Windows server machines. Here is what I did.
System DS created on (A):-
Name: ISECWM
Driver: ODBC Driver 11 for SQL Server
Test Results:
Microsoft ODBC Driver for SQL Server Version 12.00.5543
Running connectivity tests...
Attempting connection Connection established Verifying option settings
Disconnecting from server
TESTS COMPLETED SUCCESSFULLY!
$ORACLE_HOME/hs/admin/initISECWM.ora file contains
HS_FDS_CONNECT_INFO = ISECWM
HS_FDS_TRACE_LEVEL = OFF
$ORACLE_HOME/network/admin/listener.ora updated:-
SID_LIST_LISTENER = (SID_LIST = (SID_DESC =
(SID_NAME=ISECWM)
(ORACLE_HOME=c:\oracle\11g)
(PROGRAM=dg4odbc)
) )
$ORACLE_HOME/network/admin/tnsnames.ora updated:-
WORLDMAP.DBL = (DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=SERVER A HOSTNAME)(PORT=1521))
(CONNECT_DATA=(SID=ISECWM)) (HS=OK) )
Database link created:-
CREATE PUBLIC DATABASE LINK TSTDBLINK CONNECT TO "sql server
username" IDENTIFIED BY "sql server password" USING 'WORLDMAP.DBL';
Tested the database link with:-
select * from dual#TSTDBLINK; --gives the error
Error:-
ORA-28513: internal error in heterogeneous remote agent ORA-02063:
preceding line from TSTDBLINK
28513. 00000 - "internal error in heterogeneous remote agent"
*Cause: An internal error has occurred in the Oracle remote agent
supporting a heterogeneous database link.
*Action: Make a note of how the error was produced and contact the
customer support representative of the agent vendor. Error at Line: 7 Column: 20
Ah, finally Oracle helped me with the issue.
It seems I had 2 homes, I put the initISECWM.ora in the wrong Oracle home.
Just copied and pasted it in the other home/hs/admin/ and it worked like a wonder! Voila!
I'm trying to access a third party Oracle database from SQL Server Reporting Services. I had it working on previous versions of SQL Server and Oracle ODAC, but it's been several years. I'm now being forced into an upgrade, and when I try to create the data source in SSRS, I get the following error:
Network Transport: SSL failure in parsing wallet location
I created an ODBC connection and am able to successfully test the connection, so I know all of the settings in tnsnames.ora and sqlnet.ora are correct. I know SSRS is looking at the correct files because I can get a different error by changing the connect identifier to something made up. The wallet is in a sub-directory of the tnsnames file. I have tried placing the wallet location in both files, but no combination seems to work.
tnsnames.ora
<Connect Identifier> =
(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCPS)(HOST = <host>)(PORT = <port>)))
(CONNECT_DATA = (SID = <SID>)(SERVER = DEDICATED))
(SECURITY = (MY_WALLET_DIRECTORY = D:\Oracle\wallet))
)
sqlnet.ora
WALLET_LOCATION= (SOURCE=
(METHOD=file)
(METHOD_DATA=(DIRECTORY=D:\Oracle\wallet)))
Current configuration
Windows Server 2016
Microsoft SQL Server 2016
64-bit ODAC 12.2c
The take away to solving this problem is each time you change the SQLORA.NET file you have to restart the SRSS Windows Service.
I am currently configuring a linked server connection between Microsoft SQL-Server and a Microsoft Access database in our network. To make things easy, I saved the Access db locally and tried to configure the linked server.
First I created a system-DSN named "BADEN32" (32 bit)
This DSN refers to my Access database (located C:\Users\xxx\Desktop\Baden.accdb)
For this DSN, I used the Microsoft Access Driver (.mdb .accdb)
When I try to create a new linked server, I keep getting the following error: Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "BADEN32"
I have already checked the MSDASQL provider if allow inprocess was true, but it was.
What am I doing wrong here?
You're linking to the SQL server from the Access Database? You would need to set up an ODBC connection to the SQL server and test it. Once it is working, go to the Access Database, External Data Tab, then ODBC Database to set up.
If this isn't what you mean, could I get more information?
I am having DB server on another machine and having asp.net application installed on local machine.
I want to connect remote DB and execute my scripts, since my local machine doesn't have oracle installed
I have go-ogled and tried few links it tells me editing transnames.ora file adding one new entry
But this will not work since my local machine doesnt contain sqlplus
So I would like to now what are the tools I will need to download on local application server to run my scripts.
You need to install oracle driver to communicate with remote server.
There are multiply options:
This 2 will have tnsnames.ora file that you we told about:
Full oracle client
Oracle instant client (small in size)
Tool specific:
oracle jdbc driver for java
cx_oracle for python
something else for other tool
OS specific:
on windows you can setup an ODBC driver to connect to ORACLE
Thanks abhi, filename is corrected.
After installing a client, you need to know where is your database server.
In simple situation you need host, port and sid.
entries in tnsnames.ora look like this:
connectionName =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = yourHost)
(Port = yourPort)
)
)
(CONNECT_DATA =
(SID = yourSID)
)
)
You fill in all information and save the file.
after that you can check connection ( I don't know, if tnsping is shipped with instant client)
>tnsping connectionName
OK (description of a connection)
Useful tip: you can just go to remote server (or some other PC that have db access already configured) and tnsping some connection (you probably already have a standard name for it).
than just grap the output in brackets and put it into your tnsnames.ora.
your connection string:
username/password#connectionname
btw, instead of conenctionname you could put the whole connection descriptions (from tnsnames.ora)
username/password#(description=...)
Now you can use the Oracle Managed Driver which does not require the installation of the Oracle Client on the machine. This is extremely helpful as Oracle Client installations are painful. It requires nothing more than putting the driver in your bin directory and providing an appropriate connection string and provider name.
To install the managed driver via NuGet run...
Install-Package odp.net.managed
You may need to change the provider name (I believe it's Oracle.ManagedDataAccess off the top of my head).
Example connection string...(replace MyHost, MyPort (usually 1521), MyOracleSid, myUsername, and myPassword with appropriate info).
SERVER=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort))(CONNECT_DATA=(SERVICE_NAME=MyOracleSID)));
uid=myUsername;pwd=myPassword;