oracle 12c sqlplus login error subscriber - oracle

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.

Related

Data Pump export using cloud shell

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

how to connect oracle database from unix without showing password

i am trying to connect Oracle database from Linux server where environment variables and tnsnames.ora cannot be modified.
I am using following code to connect which is working fine and i am able to connect database using sqlplus.
export ORACLE_HOME=/opt/oracle/product/112030_cl_64/cl
export PATH=/opt/oracle/product/112030_cl_64/cl/bin:$PATH
sqlplus myuser/mypass#(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(Host=x)(Port=x)))(CONNECT_DATA=(SERVICE_NAME=x)))
Now i am not able to find any solution how can i execute it so that i don't need to execute it manually every time and i don't want to share the password with anyone else. i want to connect db using sqlplus from a shell script to spool data.
any lead would be appreciable. Thanks in advance.
The cleanest way is to use Oracle Wallet to store database passwords and so that your scripts can use them.
Otherwise if you can login as the oracle product owner ("oracle" most of the time) and it belong to the "dba" group you can connect as sys without typing the password (sqlplus / as sysdba) but it's privileged access, don't use it for business processes.
Omit the password; you'll be prompted to enter it, but it'll be invisible (Windows example, but doesn't matter in this case):
M:\>sqlplus scott#orcl
SQL*Plus: Release 11.2.0.1.0 Production on ╚et Tra 11 13:01:35 2019
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL>
That, of course, requires you to type it every time. If it is stored, somewhere, anyone else could see it. Perhaps there is a way, but I don't know it.

SAP Hybris Connection with Oracle DB

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.

ODP.NET and OLEDB with Multiple Oracle Homes

For legacy reasons, our .NET 4.0 application currently uses both the Oracle OLEDB and ODP.NET providers to connect to an Oracle instance. We have standardized on the 11.2.0.3.0 Oracle client. Both data providers work as expected when one Oracle client is installed.
Issues have been reported on computers that already had the 11.2.0.1.0 client installed. A second client, 11.2.0.3.0, was installed for our application. The installation looks like this:
c:\oracle
\product
\11.2.0
\client_1 <-- (existing) 11.2.0.1.0
\bin <-- OraOLEDB11.dll registered here
\network
\admin <-- TNSNAMES does NOT contain ORACLESVR
\client_2 <-- (new) 11.2.0.3.0
\bin
\network
\admin <-- TNSNAMES contains ORACLESVR
Due to a bug in the 11.2.0.3.0 installer, the OLEDB driver is not registered in the second home, meaning the 11.2.0.1.0 driver remains registered.
This leads to some interesting/odd behavior that I cannot explain:
if the "ODP.NET from 11.2.0.3.0" part of the application is used first, both providers can connect, meaning the "OLEDB from 11.2.0.1.0" is using the tnsnames.ora from the _2 home.
if the "OLEDB from 11.2.0.1.0" part of the application is used first, neither provider will connect, presumably because both are using the tnsnames.ora from the _1 home.
So, once the Oracle home is determined for the application, both clients attempt to use that home, causing complete success or complete failure.
To work around this, we can do things like: register the 11.2.0.3.0 OLEDB provider, add the TNS_ADMIN environment variable, or add ORACLESVR the tnsnames.ora from the _1 home.
However, I want to know WHY this is happening? I cannot find, in the Oracle documentation for each provider, how the tnsnames.ora file is located when two clients are present and TNS_ADMIN is not specified.
How does one provider affect the other?
OLEDB is based on Microsoft COM and each DLL you register has to have a distinct name. Thus you cannot register OraOLEDB11.dll several times from different locations, i.e. OLEDB can be installed only once (per architecture).
In case you try to install several OLEDB on one machine the Oracle Installer creates a mess. It is always a challenge to have several Oracle Clients installed.
These locations are searched for tnsnames.ora, resp. sqlnet.ora:
current path (associated with the running client application)
Environment variable TNS_ADMIN defined for the session
Environment variable TNS_ADMIN defined for the system
Windows Registry Key HKLM\SOFTWARE\ORACLE\KEY_{ORACLE_HOME_NAME}\TNS_ADMIN (for x64) or HKLM\SOFTWARE\Wow6432Node\ORACLE\KEY_{ORACLE_HOME_NAME}\TNS_ADMIN (for x86)
%ORACLE_HOME%\network\admin
I got this list from Oracle Metalink 111942.1 (referring to Oracle 9.x and Windows NT/2000)
I don't know whether it applies for each individual Oracle Provider/Driver you may use. When you trace your application with Process Monitor you can get a different order.

Can OracleXE's APEX access another Oracle Database (10g) on the same Server, or is it Restricted to those Users/Tablespaces in the XE Database?

My work uses Oracle 10G and is planning on installing Apex. In the meantime, I have downloaded Oracle XE and have taught myself APEX on it; however, I can only access users/tablespaces that I have made in the XE database. What I would like to do is use the XE's Apex to access the users/tablespaces in the production databases of my work.
My colleague says that this should be possible because my workstation is connected to the server, and that there should be a way to configure access from my XE's Apex to the 10g's databases, such as by setting up an appropriate DAD.
I see nothing in the Apex user interface to allow this. I've read every word of the Apex documentation but nothing registered.
XE uses the embedded PL/SQL gateway, as opposed to 10/11G which uses either an Apex Listener or an HTTP Server with the mod_plsql plugin.
Thank you,
Matthew Moisen
I have done this before where we didn't have access to the actual database hosting the data to be worked with save for the standard port 1521 listener access. Apex at the time was new enough to the organization that the DBA's also had a voodoo taboo on using their database server as a webserver gateway as well. You can use your database instance with APEX installed as a "middle tier" or app server with the following steps:
Set up an account on your 10g database that is accessible remotely via dblink.
Set up dblinks to your 10g database table on your workstation with XE installed, use the account and connection information for the 10g database as set up in (1). Note, you may have to update a TNS names file or explicitly indicate your host/networking settings within the dblink itself.
For simple sanity and simplicity in coding your apex projects, set up synonyms for all your dblinked objects (i.e., table1 for table1#dblink) so you're not referencing the dblinks directly in your apex code. Making changes later will be easier if you adhere to this.
That's it. One proviso is that you need to know that LOBs will not work with the out-of-the-box functionality of APEX driven DML operations while using dblinks. This may have changed with the newest version. One workaround you may consider is trying to use a stored procedure which passes your LOB data as a input parameter which will do your DML operation for you.
Otherwise, this approach works nicely. The place where I implemented this model has several production level apps, a test and a development tier all using servers hosting APEX separately from the actual data sources. We used Oracle Standard Edition One (for the support), but Oracle XE should work as well since APEX is the platform in common between either Oracle version.

Resources