What all i need to change in the DB properties here?
#db.url=jdbc:oracle:thin:#<host>:1522:<sid>
#db.driver=oracle.jdbc.driver.OracleDriver
#db.username=<system>
#db.password=<password>
#db.tableprefix=
I am using Hybris 6.2 and wanted to connect it to Oracle 11g. I have downloaded Oracle11g,SqlDeveloper and made a connection between them. I've copied the Oracle Db server properties into the local.properties file of the Config folder in Hybris.
However i'm not able to understand the steps after that (what all info i need to put in connection properties above, do i have to intialize and upadate again?).
Avoid nasty OCI driver configuration.
Because geffchang's answer only shows the configuration with the OCI driver I'm showing here the most simple configuration with the thin client.
Reference is https://help.sap.com/viewer/a74589c3a81a4a95bf51d87258c0ab15/1905/en-US/551f907063044685a309a8b22f5779c3.html
You already wrote how db.url looks like with thin client by specifying host, port and sid. Here are some examples: jdbc:oracle:thin:#192.168.1.1:1521:orcl jdbc:oracle:thin:#//ora01-ic.mydomain.net:1532/hybris jdbc:oracle:thin:#//ora901scan.de.mydomain.net:1523/shop
db.driver=oracle.jdbc.driver.OracleDriver
username and password should be self explanatory.
Avoid tableprefix. You only need it if you want to have multiple hybris instances within a single DB. But if you need multiple instances you could alternatively also create a second DB in the Oracle DBMS (see difference between DB and DBMS!) and use an additional SID like e.g. hybris2.
That's all: host/ip, port, SID, username and password. Three configuration lines depending on your local environment and one static db.driver setting.
OCI vs. Thin driver
I mostly use the Thin driver. The way the hybris documentation explains the usage of the OCI driver is somewhat nasty (to avoid the term "insecure") by using LD_LIBRARY_PATH instead of using ld.conf.
Using the Thin driver is platform-independent and most easy to configure. Using OCI is the opposite and depends on the OS. OCI with LD_LIBRARY_PATH is targeted towards Linux.
Reference OCI: https://docs.oracle.com/en/database/oracle/oracle-database/12.2/jjdbc/JDBC-OCI-features.html#GUID-A8201BD0-BAED-4C54-B53B-C26C5F295B32
Reference Thin client: https://docs.oracle.com/cd/B28359_01/java.111/b31224/jdbcthin.htm
The JDBC driver
It must be put into bin/platform/lib/dbdriver. Current version at time of this writing is ojdbc8-12.2.0.1.0.jar. Here's a list with other versions and timestamps matching their release dates:
$ ls -lnG ojdbc*jar
-rw-r--r-- 1 501 2739670 Jul 28 2014 ojdbc6-11.2.0.4.jar
-rw-r--r-- 1 501 3397734 Jun 25 2013 ojdbc7-12.1.0.1.jar
-rw-r--r-- 1 501 3698857 Apr 11 2016 ojdbc7-12.1.0.2.jar
-rw-r--r-- 1 501 4036257 Mar 1 2017 ojdbc8-12.2.0.1.0.jar
Other settings
db.pool: The values in geffchang's answer are the default values already set in advanced.properties. You don't need to specify them a second time.
oracle.statementcachesize: In Hybris docs referenced above it is mentioned "Do not set any other value than 0". In fact you don't need to set it at all.
tenant.restart.on.connection.error: Usually you don't need to set it. Keeping it on true (default in advanced.properties) MAY cause your DB to be locked at Hybris startup with wrong password because Hybris will try to connect to DB several times and some Oracle DB admins activate an user lock on e.g. 3rd failed login. In this case ask the Oracle admin to provide the correct password and to unlock the account.
Related
I am trying to export schema using data pump on Oracle Cloud Autonomous database.
I am using cloud shell to export schema.
When I tried to do the final step:
expdp admin/password#DB_HIGH schemas=SCHEMA_NAME directory=data_pump_dir dumpfile=exp%U.dmp filesize=1G logfile=expot.log
I got
UDE-12154: operation generated ORACLE error 12154 ORA-12154:
TNS:could not resolve the connect identifier specified
Do I need Oracle instant client to do export?
The Oracle client code uses one of three ways to look up connect data:
A flat file named tnsnames.ora
Oracle Names service
LDAP
When the complete ORA-12154 error appears with the text line, your program has found a working Oracle client install. However, the specified Oracle service is not listed in tnsnames.ora, Oracle Names or LDAP.
The first step in the troubleshooting process is to determine which name resolution method is deployed at your site. Most sites use tnsnames.ora, but enough use Oracle Names and LDAP, so it’s best to confirm this information.
If you are not the database administrator, get in touch with the people managing your Oracle systems and find out which method you should be using. They may be able to guide you in fixing the problem in accordance with your site’s standards.
The client code decides which mechanism to use based on the file sqlnet.ora. This file and tnsnames can usually both be found in the Oracle install directory (“ORACLE_HOME”), under network/admin/. This location may be overridden with the environment variable TNS_ADMIN.
If the sqlnet.ora file does not exist or does not specify a resolution method, then Oracle Net uses tnsnames.ora.
Example locations of Oracle networking files include:
Windows
ORANTNET80ADMIN
ORACLEORA81NETWORKADMIN
ORAWIN95NETWORKADMIN
ORAWINNETWORKADMIN
UNIX / Linux
$ORACLE_HOME/network/admin/
/etc/
/var/opt/oracle/
If you fix the naming issues, but you still see the ORA-12154 error, check the Oracle service to confirm that it’s available for connections. A power outage, server failure, or network connectivity issue will make this resource inaccessible. It’s also possible that scheduled maintenance or repairs of an unrelated Oracle issue may take that resource temporarily offline.
Thanks
I am facing below error/warning when I login to oracle 12 using sqlplus client.
Details :
SQL*Plus: Release 12.1.0.2.0 Production on Fri Nov 8 05:38:11 2019
Copyright (c) 1982, 2014, Oracle. All rights reserved.
subscriber -1581956048 create failed: Last Successful login time: Fri
Nov 08 2019 05:36:31 -05:00
Connected to: Oracle Database 12c Enterprise Edition Release
12.1.0.2.0 - 64bit Production
Not sure what is subscriber -1581956048 create failed not getting much info on Google.
is anything need to worry about?
Regards
Laks
Issue caused by Fast Application Notification (FAN) for OCI client.
FAN uses Oracle Notification Services (ONS) to publish and subscribe
service for communicating information about all Fast Application Notification (FAN) events.
ONS uses port 6200 by default. If there is a firewall between the
client and the server and port 6200 port is closed then this behavior
is expected
You can use OCI to access Oracle TimesTen In-Memory Database and Oracle TimesTen Application-Tier Database Cache. OCI is an API that provides functions you can use to access the database and control SQL execution. OCI supports the data types, calling conventions, syntax, and semantics of the C and C++ programming languages.
TimesTen and TimesTen Cache support the Oracle Call Interface (OCI) for C or C++ programs.
Starting with Oracle Database Release 12c Release 1 (12.1), Oracle provides an oraaccess.xml file, a client-side configuration file. You can use the oraaccess.xml file to configure selected OCI parameters (some of which are accepted programatically in various OCI API calls), thereby allowing OCI behavior to be changed during deployment without modifying the source code that calls OCI.
Updates to the oraaccess.xml file will not affect already running clients. In order to pick up any updates to the oraaccess.xml file, already running clients need to be restarted.
The oraaccess.xml file is read from the directory specified by the TNS_ADMIN environment variable in regular and instant client installations.
This is the $ORACLE_HOME/network/admin directory on UNIX operating systems and the %ORACLE_HOME%\NETWORK\ADMIN directory on Microsoft Windows operating systems, if TNS_ADMIN is not set in regular client installations.
The oraaccess.xml file has a top-level node with the three elements. One of them is . the tag allows specifying default values for various OCI parameters. Some parameters can only be specified once and hence apply to all connections. These global parameters are described using by some tags. One of them is <events> tag.
Ref .
If you already have an oraaccess.xml file, then convert the part
<events>true</events> to <events>false</events>.
Otherwise create an oraaccess.xml file with the following information in the default_parameters section:
<?xml version="1.0" encoding="ASCII" ?>
<oraaccess xmlns="http://xmlns.oracle.com/oci/oraaccess"
xmlns:oci="http://xmlns.oracle.com/oci/oraaccess"
schemaLocation="http://xmlns.oracle.com/oci/oraaccess
http://xmlns.oracle.com/oci/oraaccess.xsd">
<default_parameters>
<events>false</events>
</default_parameters>
</oraaccess>
put this file under TNS_ADMIN directory, and then restart the SQL*Plus Client.
it happened on Oracle fussion middleware error.
Unable to connect to the DB. Check if DB connection details entered are correct.
ORA-00604: error occurred at recursive SQL level 1
ORA-01882: timezone region not found
To be very honest, i i've searched thouroughly.
i found out that it had something to do with the jdk in my oracle 11g ee edition so i tried running timezone updater on the jdk, but the timezone was unable to update.. it returned an error saying 'cant rename {0} to {1}'.
am not even sure am on the right path... please can someone out there give me a hand.
the timezone error was coming up as a result of the character set i selected for my database. it was suppose to be utf8 however, i choose some other one. i had to uninstall my database, and recreated a new one using "utf8" character set, which happens to be a general standard. :)
Installation of FMW falls into two categories: Developer and Production. Developer uses soa_quickstart + WCC + WCP + MFT etc. WLS and all needed files are installed in this installation and then there are 3 different domains that can be used/configured - local to JDev, standalone (file based no DB or RCU required) and Compact (db required + RCU). Production requires WLS + infrastructure + binaries (SOA/OSB/BPM, MFT, WCC, WCP). These are all separate installs and require DB and RCU as well. So, the question is: what are you installing and why? If you are installing for a production env you should follow the oracle install instructions and EDG closely. If you are installing a dev env, then it is very fast and easy - a standalone env is a great choice. While there are some capabilities not available in a Standalone/File- based install, it is still the preferred choice for SOA/OSB/BPM developers. If you simply want a FMW install to play with or use as a developer, you can download and install a free VirtualBox image that comes fully configure and ready to use. You should also consult the system compatibility guide as well, just to be sure.
We have a requirement to make our products work on Oracle as well as SQL Server (around which they were originally built). Unfortunately we don't have any in house Oracle development experience to speak of but as a senior dev it has fallen to me to lead the project. So far I have managed to make our app connect to an Oracle database (I'm using Oracle XE 11.2) by using the following connection string:
Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=VS010-ORA11GR1)(PORT=1523))(CONNECT_DATA=(SERVICE_NAME=DEVORA)));User Id=dbo;Password=dbo;
The reason we decided to use this type of connection string is because we do not want to rely on changing tnsnames.ora on every client machine. However, as you can see this specifies an Oracle user and associated password. We also need to provide the ability to use the equivalent of SQL Server integrated security.
According to the literature I have read, to do this I simply need to specify / as the user id and then omit the password portion (as this is ignored anyway for Windows authentication). I also created the user in Oracle, making sure it matched the Windows user, with the following snippets:
CREATE USER "OPS$<DOMAIN>\<user>" IDENTIFIED EXTERNALLY;
GRANT CONNECT,RESOURCE TO "OPS$<DOMAIN>\<user>";
I also checked that the sqlnet.ora file on my local machine which hosts the XE instance and my dev environment contained the line:
SQLNET.AUTHENTICATION_SERVICES= (NTS)
I understood that this would enable my app to connect to the Oracle database uing Windows Authentication. However what actually happens is that I get the following Oracle error message:
ORA-01005: null password given; logon denied
this doesn't make much sense because of course its null - it's supposed to be, according to the tutorials I've read.
The app targets .Net Framework 3.5, we are using the System.Data.OracleProvider and the actual connecting and so on is handled by Enterprise Library 5. Incidentally, I am aware of the deprecation of the OracleClient component but I just want this to work before I go into the extra complexities of changing providers.
Can anyone tell me what I'm missing? Have I chosen the wrong type of connection string? I apologise for any basic mistakes but I have always managed to avoid Oracle until now so my knowledge of it is close to zero.
Many thanks
I had the same problem and solved after adding this to conn. string:
Integrated Security=yes
To expand on the answer above by #Stikut. I tested this out with NHibernate 3.3.3.GA and it works.
user id=/;password=;Integrated Security=yes
In our server,we publish a asp.net application,which use the oracle11g as the database.
We just set the connection string in the web.config,it works.
However someone install the oracle8 in the same server since they need them in other client application.
But after that,our web applcation can not work,we get the error:
ora-12154 TNS an not handle the service name
Then I found that the path environment has been changed. The "C:/app/oracle81/bin" is added at first. But even I change the "D:/app/oracle11g/bin" first,it does not work also.
Any idea to make the both work?
You might investigate what drivers are being used within .NET ... Microsoft's deprecated Oracle provider or Oracle's own provider or some kind of ODBC provider sitting on top of several kinds of possible drivers in a DSN. Each might be remedied in a different way.
But it sounds like the Oracle 8 installation has stolen priority over the Oracle 11 installation in some way that is not just the "PATH" environment variable. My guess would be the registry.
In ascending order of inconvenience and effectiveness you could try:
1) Run the Oracle 11 installer and see if it knows about the Oracle 8 home. (Unlikely if it's 8.0). Set it as default or top of the list; exit; then go back and set Oracle 11 as the default/top of the list.
2) Configure the TNS entries in your Oracle 8 home to connect to your Oracle 11 database. Live with the fact you're using a very out of date client.
3) Uninstall and reinstall Oracle 11 to get it to steal back the priority.
By default the .net framework uses the FIRST oracle directory it comes to the in the path statement. There have been some discussions on how to get around this - but your best bet is to run one client per machine.