Got a really weird issue.
I am writing a small program that will connect to an oracle DB and pull some stats.
My issue is that I can not get my program to connect to oracle. I am getting a "ORA-12545: Connect failed because target host or object does not exist" error.
My understanding is that this is a connection issue....IE It cant find the oracle DB. But I had several of my teammates download the code and it works fine on their machines. I can connect to the oracle DB using PL/SQL on my machine. I have checked the TNS values and they match what my teammates have.
I have been troubleshooting this for hours...anyone have any ideas?
Thanks
Turns out the issue was me. I had my code stored on a network drive and it Visual Studio will not run it if that is the case. Moved the code to a local drive and all worked fine. – user2115732 18 secs ago edit
Related
I get this error when I launch Toad for Oracle.
No valid Oracle clients found. You need at least one 64-bit client properly configured.
This has been happening since I upgraded the Oracle Client to Oracle 12c from 11g.
Here is what I have done so far to try to resolve it based on internet research:
I checked the path variable, it's currently set to C:\xyz\Oracle\ora12.1\client_2\bin, and there is an Oracle installation at this path.
I checked the TNS_ADMIN variable, it is currently set to C:\xyz\Oracle\ora12.1\client_2\network\admin. This also appears to be valid and correct, there is a tnsnames.ora file under this path.
SQL Plus works without issues, and Oracle SQL Developer also works without issues.
Is there anything else I can try to resolve this issue? Unfortunately, uninstalling and reinstalling Toad is not an option at this point as I do not have access to a new setup.
The issue is due to not having the Oracle Database installed on your computer.
You can download the database here: https://www.oracle.com/database/technologies/appdev/xe.html
Once the zip file is downloaded and extracted, run setup.exe. Once that is complete, the Oracle DB will be installed on your machine and the error will no longer appear.
With TOAD you need to have oracle client installed on your computer and you must configure the related TNSNAMES.ORA to connect to the server.
If you use SQLDeveloper you can do without oracle client installation.
I tried twice installing Windows 10 PRO and then installing the Oracle Database 11g XE. Every time, it will cause errors. Exact same issues as this thread here If anyone who has encountered this issue before and was able to resolve it, can you help me? I installed the same software on my Lenovo Laptop running Windows 10 Home and it was able to run it without any problems. So I believe the suspect here is the bootcamp.
Issue I encountered:
Get Started with Oracle Database XE doesnt work. Keeps saying that 127.0.0.1:8080/apex not found on W10 bootcamp. Ran it on windows and opened up the dashboard without any problems.
Ran the sqlplus command in cmd in W10 bootcamp, logged in as SYS AS SYSDBA and spat out this: Connected as an instance which I googled around and meant the database isnt running. Tried it on the windows and was successfully able to log in.
The exact same errors in the link I posted.
Tried creating a connection in the SQLDeveloper and it gave me ORA-12050 error which also means database is not running. Ran it on a windows machine and no errors.
I need it for my Database class and don't want to drag around a bulky laptop to college everyday. If someone could help me out, I would be grateful to you.
I'm trying to install Oracle BIEE 11g on my computer, but something wiered happend.
I've tried on a x86 computer with 2GB memory and a x64 computer with 4GB memory. Both of them are running Windows OS. I want to connect a MS-SQLSERVER database, and I've finished creating related DEV_ tables using RCU.
I followed the tutorial from the doc.oracle.com, but then I stopped at the 14th step, it says "设置数据库连接失败". I can continue install, but another error occurs, service obisch1 cannot start. I can open localhost:9704 after installation, but it will return a 500-error after I restart my computer.
I searched the internet, it says I should set my database source using "Net Manager" Tool, but I don't know how. And after install I got a database source using driver "MERANT OEM 5.3 32-BIT SQL Server Wired Protocol", but I can't make change to it, cause the system says can't find the driver...
I don't know what to do now... Anybody can help me? Thanks very much.
Well, I've kind of solved it.
I still don't know why my computer cannot find the odbc drier "MERANT OEM 5.3 32-BIT SQL Server Wired Protocol", which seems to be the reason why I can't connect to the database at the 14th step while I install OBIEE.
However, I add an odbc-connect through the system's function, I found it in the control panel.
On the other hand, the url http://localhost:7001/em and http://localhost:7001/analytics can be still accessed(after a long time, it can be accessed).
So, then I create a rpd file use my own odbc-connect, and it seems work fine.
Thanks everybody, anyway, and hopes can help
adhoc queries using opendatasource microsoft.ace.olebd.12.0 reading excel file
Everthing was working fine on my local even on production for a long time already "months". As long as the user is a sysad.
And then, just all of a sudden the script using OpenDataSource using microsoft.ace.olebd.12.0 raised an error
OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" returned message "Unspecified error".
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)".
No one is altering the script
No one has updated the server nor my local.
All of the servers for different apps that uses the script encoutered the error.
I'm really confused already on what happened on the driver? Is this some kind of a expiration on the ace driver??
Hope someone could help me.
Do you still have this issue?
Is it a x32 or a x64 server?
Did you install any windows update?
I get this error using AccessDatabaseEngine_x64 driver, and then just installed the x32 driver (no x64 removal) and it worked just fine. The might be a dll dependency or something. Check if you had any windows update regarding these drivers.
Hope you fixed your problem :D
Regards
I have installed Cognos BI 8.3 on my machine, which has a Windows 7 OS 64-bit. In IBM's supported environment list for Cognos 8.3, Windows 7 is not listed. On top of that, it says the product will only integrate with 32-bit 3rd party libraries. So, you can already see that I'm already starting on a bad foot. But anyways, this is the machine I have and that is the software I got, so I decided to see if they would work together..
I installed Oracle 10g Express database also in my machine and Apache 2.2 server. Up to there no problems.
Before moving further, I copied ojdbc14.jar to cognos/.../webapps/p2pd/WEB-INF/lib and added the Oracle database in Cognos Configuration. Tested, passed.
With the database started, the Apache server started, and Cognos started, I was successfully able to start Cognos Connection on the computer. So, it looks like the OS is not an issue.
(You can see everything I did by following the steps on this site, which since two days ago seems to be down but I'm thinking will eventually come back up)
Then I decided to try the samples, so I tried to create a data source connection from Cognos to the Oracle database. So, in the admin config console (i.e. Administer Cognos Contents > Configuration), I decided to create a new Oracle data source. I put the credentials, but BAM.. testing fails.
Fail Message:
QE-DEF-0285 The logon failed.
QE-DEF-0323 The DSN(ODBC)/ServiceName is invalid. Either the DSN is missing or the host is inaccessible.
RQP-DEF-0068 Unable to connect to at least one database during a multi-database attach to 1 database(s) in:
testDateSourceConnection
UDA-SQL-0031 Unable to access the "testDataSourceConnection" database.
UDA-SQL-0532 Data Source is not accessible: "XE".
ORA-12154: TNS:could not resolve the connect identifier specified
RSV-SRV-0042 Trace back:
...
From what I have researched, it could be a number of things, but nothing seems to work. Here is what I tried:
Adding ODBC driver. Added the Oracle XE driver, even making sure it was done in the 32-bit ODBC manager (i.e. Windows\SysWOW64\odbcad32.exe). That didn't work.
Added ORACLE_HOME, LD_LIBRARY_PATH, and TNS_ADMIN to my environment variables.
tnsping'ed the XE database and it the ping returned ok.
There are no tnsnames.ora duplicates in the computer.
I tried and I am able to connect to the database via sqlplus. Did I mention that Cognos Config database test also passed?
Installed Oracle XE client. But didn't do much with it because the Oracle server is installed in the computer and also has a client component.
Has anyone come across this problem? I haven't been able to diagnose the problem or make even the slight progress for days. If you would like me to provide more information on any of the solutions I tried, please do ask. If you have a potential solution or, even better, if you have been able to solve this problem before, please let me know how!
Thanks!
One thing to keep in mind : certain portions of Cognos BI are implemented via Java and other portions are implemented via native C++ processes (the BI Bus processes)
Cognos connects to the content store database from the Java process using JDBC.
The BI Bus processes will connect to Oracle using a native oracle client.
So based on your description, I'd say that the problem area is in the native oracle client configuration (or the Cognos service's perspective of it).
You mentioned adding the ORACLE_HOME, LD_LIBRARY_PATH, and TNS_ADMIN environment variables in windows, and the fact that Oracle Utilities like SQLPlus and TNSPing are working for you.
When you added the environment variables, did you add them to the SYSTEM area for environment variables or the User area...?
If you're running Cognos as a service, its going to be a child process of SERVICES.EXE, which is run as system (this process is also not restarted unless you reboot the machine).
I'd try this :
make sure the above environment variables are defined for the SYSTEM user (in the system area, not the user area)
once you've done this, reboot the machine
See if you can create the database connection now.
If that doesn't work, I'd suggest doing a "run as" of SQLPlus or TNSPING as the SYSTEM user (and see if that works).
In order to use oracle as data source, you must install 32 bit client.
64 bit client will not work.
So if you installed oracle express 64 bit, and you don't want to uninstall it,
you can just install additional 32 bit client, and make sure to set it as your default home.