Ошибка oracle ccb 11003 11262

Here is a short error and trouble shoot performed while performing the RMAN duplicate. Database version: 12.2.0.1 Error encountered:...

Here is a short error and trouble shoot performed while performing the RMAN duplicate.

Database version: 12.2.0.1

Error encountered:

..
..
..

executing command: SET NEWNAME

Starting Duplicate Db at 18-FEB-20
current log archived at primary database

contents of Memory Script:
{
   sql clone "create spfile from memory";
}
executing Memory Script

sql statement: create spfile from memory

contents of Memory Script:
{
   shutdown clone immediate;
   startup clone nomount;
}
executing Memory Script

Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area  178241142784 bytes

Fixed Size                    19249424 bytes
Variable Size             124017182448 bytes
Database Buffers           53687091200 bytes
Redo Buffers                 517619712 bytes
allocated channel: a1
channel a1: SID=1940 device type=DISK

contents of Memory Script:
{
   sql clone "alter system set  db_name =
 ''BRP'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   sql clone "alter system set  db_unique_name =
 ''BRT'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   shutdown clone immediate;
   startup clone force nomount
   backup as copy current controlfile auxiliary format  '+ARCH/BRT/cntrlbrt.dbf';
   restore clone primary controlfile to  '+DATA/BRT/cntrlbrt.dbf' from
 '+ARCH/BRT/cntrlbrt.dbf';
   restore clone primary controlfile to  '+RECO/BRT/cntrlbrt.dbf' from
 '+ARCH/BRT/cntrlbrt.dbf';
   alter clone database mount;
}
executing Memory Script

sql statement: alter system set  db_name =  ''BRP'' comment= ''Modified by RMAN duplicate'' scope=spfile
released channel: t1
released channel: t2
released channel: t3
released channel: t4
released channel: t5
released channel: t6
released channel: t7
released channel: t8
released channel: t9
released channel: t10
released channel: t11
released channel: t12
released channel: t13
released channel: t14
released channel: t15
released channel: t16
released channel: a1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 02/18/2020 09:17:41
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of sql command on clone_default channel at 02/18/2020 09:17:41
RMAN-11003: failure during parse/execution of SQL statement: alter system set  db_name =  'BRP' comment= 'Modified by RMAN duplicate' scope=spfile
ORA-32001: write to SPFILE requested but no SPFILE is in use

RMAN> **end-of-file**

RMAN> exit

You can see that even though RMAN internal script created spfile using memory as in the highlighted line above, it failed with ORA-32001.

Cause:


The environment uses ASM as storage and the previous database was dropped prior to the RMAN duplicate attempt. So when the create spfile is executed, the spfile created by default inside the ASM storage whereas RMAN expects the spfile to be in the default directory i.e $ORACLE_HOME/dbs

Solution:


As the database is dropped, we can now remove the service from the CRS using below command as shown

-sh-4.2$ srvctl stop database -d BRT
-sh-4.2$ srvctl remove database -d BRT
Remove the database BRT? (y/[n]) y


This would also remove the entry from /etc/oratab if you are using and has to be added manually again if you tend to use . oraenv to set up your oracle environment before starting sqlplus.

Once the service is removed and the same duplicate command is executed, RMAN continues without issues and succeeds.

..
..
..
executing Memory Script

sql statement: create spfile from memory

contents of Memory Script:
{
   shutdown clone immediate;
   startup clone nomount;
}
executing Memory Script

Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area  178241142784 bytes

Fixed Size                    19249424 bytes
Variable Size             124017182448 bytes
Database Buffers           53687091200 bytes
Redo Buffers                 517619712 bytes
allocated channel: a1
channel a1: SID=1826 device type=DISK

contents of Memory Script:
{
   sql clone "alter system set  db_name =
 ''BRP'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   sql clone "alter system set  db_unique_name =
 ''BRT'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   shutdown clone immediate;
   startup clone force nomount
   backup as copy current controlfile auxiliary format  '+ARCH/BRT/cntrlbrt.dbf';
   restore clone primary controlfile to  '+DATA/BRT/cntrlbrt.dbf' from
 '+ARCH/BRT/cntrlbrt.dbf';
   restore clone primary controlfile to  '+RECO/BRT/cntrlbrt.dbf' from
 '+ARCH/BRT/cntrlbrt.dbf';
   alter clone database mount;
}
executing Memory Script

sql statement: alter system set  db_name =  ''BRP'' comment= ''Modified by RMAN duplicate'' scope=spfile

sql statement: alter system set  db_unique_name =  ''BRT'' comment= ''Modified by RMAN duplicate'' scope=spfile

Oracle instance shut down

Oracle instance started

Total System Global Area  178241142784 bytes

Fixed Size                    19249424 bytes
Variable Size             124017182448 bytes
Database Buffers           53687091200 bytes
Redo Buffers                 517619712 bytes
allocated channel: a1
channel a1: SID=1826 device type=DISK

Starting backup at 18-FEB-20
channel t1: starting datafile copy
copying current control file
output file name=/oracle/BRP/122/dbs/snapcf_BRP.f tag=TAG20200218T093756
channel t1: datafile copy complete, elapsed time: 00:00:07
Finished backup at 18-FEB-20

Starting restore at 18-FEB-20

channel a1: copied control file copy
..
..
..

Once the duplicate is completed, you can add the service back to the CRS.

Happy Troubleshooting!!!

I had this issue and the fix was to make sure in tnsnames.ora the SERVICE_NAME is a valid service name in your database. To find out valid service names, you can use the following query in oracle:

select value from v$parameter where name='service_names'

Once I updated tnsnames.ora to:

TEST =
   (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = *<validhost>*)(PORT = *<validport>*))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = *<servicenamefromDB>*)
    )
)

then I ran:

sqlplus user@TEST

Success!
The listener is basically telling you that whatever service_name you are using isn’t a valid service according to the DB.

(*I was running sqlplus from Win7 client workstation to remote DB and blame the DBAs ;) *)

answered Apr 16, 2013 at 23:36

Brad Rippe's user avatar

Brad RippeBrad Rippe

3,3071 gold badge18 silver badges20 bronze badges

11

I know this is an old question, but still unanswered. It took me a day of research, but I found the simplest solution, at least in my case (Oracle 11.2 on Windows 2008 R2) and wanted to share.

The error, if looked at directly, indicates that the listener does not recognize the service name. But where does it keep service names? In %ORACLE_HOME%NETWORKADMINlistener.ora

The «SID_LIST» is just that, a list of SIDs and service names paired up in a format you can copy or lookup.

I added the problem Service Name, then in Windows «Services» control panel, I did a «Restart» on the Oracle listener service. Now all is well.


For example, your listener.ora file might initially look like:

# listener.ora Network Configuration File: C:apporacle_userproduct12.1.0dbhome_1networkadminlistener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = C:apporacle_userproduct12.1.0dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:C:apporacle_userproduct12.1.0dbhome_1binoraclr12.dll")
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

… And to make it recognize a service name of orcl, you might change it to:

# listener.ora Network Configuration File: C:apporacle_userproduct12.1.0dbhome_1networkadminlistener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = C:apporacle_userproduct12.1.0dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:C:apporacle_userproduct12.1.0dbhome_1binoraclr12.dll")
    )
    (SID_DESC = 
        (GLOBAL_DBNAME = orcl)
        (ORACLE_HOME = C:apporacle_userproduct12.1.0dbhome_1)
        (SID_NAME = orcl)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

Kevin's user avatar

Kevin

74.1k12 gold badges128 silver badges163 bronze badges

answered Mar 25, 2014 at 12:13

Joseph Argenio's user avatar

3

In my circumstances the error was due to the fact the listener did not have the db’s service registered. I solved this by registering the services. Example:

My descriptor in tnsnames.ora:

LOCALDB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = LOCALDB)
    )
  )

So, I proceed to register the service in the listener.ora manually:

SID_LIST_LISTENER =
    (SID_DESC =
      (GLOBAL_DBNAME = LOCALDB)
      (ORACLE_HOME = C:Oracleproduct11.2.0dbhome_1)
      (SID_NAME = LOCALDB)
    )

Finally, restart the listener by command:

> lsnrctl stop
> lsnrctl start

Done!

answered May 31, 2017 at 23:39

manix's user avatar

manixmanix

14.3k10 gold badges68 silver badges104 bronze badges

1

I had this issue at Windows server 2008 R2 and Oracle 11g

go to Net Manager > Listener > select database services form the combox > «Global Database Name» must be same as «SID» and «Oracle Home Directory» must be correct.

If you don’t have any entry for database services, create one and set correct global database , sid and oracle home.

Mr_and_Mrs_D's user avatar

Mr_and_Mrs_D

31.2k37 gold badges175 silver badges355 bronze badges

answered Dec 21, 2013 at 14:27

Sepideh's user avatar

SepidehSepideh

1491 silver badge2 bronze badges

1

This really should be a comment to [Brad Rippe][1]’s answer, but alas, not enough rep. That answer got me 90% of the way there. In my case, the installation and configuration of the databases put entries in the tnsnames.ora file for the databases I was running. First, I was able to connect to the database by setting the environment variables (Windows):

set ORACLE_SID=mydatabase
set ORACLE_HOME=C:Oracleproduct11.2.0dbhome_1

and then connecting using

sqlplus / as sysdba

Next, running the command from Brad Rippe’s answer:

select value from v$parameter where name='service_names';

showed that the names didn’t match exactly. The entries as created using Oracle’s Database Configuration Assistant were originally:

MYDATABASE =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = mylaptop.mydomain.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = mydatabase.mydomain.com)
    )
  ) 

The service name from the query was just mydatabase rather than mydatabase.mydomain.com. I edited the tnsnames.ora file to just the base name without the domain portion so they looked like this:

MYDATABASE =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = mylaptop.mydomain.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = mydatabase)
    )
  ) 

I restarted the TNS Listener service (I often use lsnrctl stop and lsnrctl start from an administrator command window [or Windows Powershell] instead of the Services control panel, but both work.) After that, I was able to connect.
[1]: https://stackoverflow.com/users/979521/brad-rippe

answered Dec 19, 2016 at 14:38

Capricorn1's user avatar

Capricorn1Capricorn1

8099 silver badges15 bronze badges

1

Starting the OracleServiceXXX from the services.msc worked for me in Windows.

answered Jun 16, 2015 at 7:48

Ishildur Baggins's user avatar

1

For thoses Who are using spring-boot and jdbc for connection.
You have to be careful while writing jdbcUrl in application.properties

With SID in Database connection —
source.datasource.jdbcUrl = jdbc:oracle:thin:@[HOST][:PORT]:SID

With Service name in db connection
globe.datasource.jdbcUrl = jdbc:oracle:thin:@//[HOST][:PORT]/SERVICE

This worked for me :)

answered Jun 16, 2020 at 8:18

surajmall's user avatar

surajmallsurajmall

1491 silver badge5 bronze badges

For Dbeaver users: try selecting «SID» instead of «Service name» in connection settings.

answered Aug 30, 2021 at 6:49

JanBrus's user avatar

JanBrusJanBrus

9618 silver badges13 bronze badges

1

I had the same problem. For me, just writing

sqlplus myusername/mypassword@localhost

did the trick, doing so makes it connect to the default service name, I guess.

Hosana Gomes's user avatar

answered Sep 9, 2014 at 4:01

Hossein's user avatar

HosseinHossein

23.3k34 gold badges117 silver badges217 bronze badges

2

This error can occur when an application makes a new connection for every database interaction or the connections are not closed properly. One of the free tools to monitor and confirm this is Oracle Sql developer (although this is not the only tool you can use to monitor DB sessions).

you can download the tool from oracle site Sql Developer

here is a screenshot of how to monitor you sessions. (if you see many sessions piling up for your application user during when you see the ORA-12514 error then it’s a good indication that you may have connection pool problem).

enter image description here

answered Apr 1, 2013 at 0:21

grepit's user avatar

grepitgrepit

20.4k6 gold badges100 silver badges81 bronze badges

Check to see the database is up. Log onto the server, set the ORACLE_SID environment variable to your database SID, and run SQL*Plus as a local connection.

answered May 29, 2012 at 0:50

DCookie's user avatar

DCookieDCookie

42.2k11 gold badges83 silver badges91 bronze badges

1

I resolved this issue in my linux enviroment updating the IP of my machine in /etc/hosts file.

You can verify your network IP (inet end.) with:

$ifconfig

See if your IP matches with /etc/hosts file:

$cat /etc/hosts

Edit your /etc/hosts file, if nedded:

$sudo gedit /etc/hosts

Bye.

answered Sep 3, 2014 at 15:27

Sergio Marcelo C Figueiredo's user avatar

2

what worked for me was really simple, I just needed to initiate the service manually in the «Windows Services» (services.msc in cmd trompt).
my service name is: OracleServiceXXXXX.

answered May 12, 2016 at 13:57

isabelle martz's user avatar

isabelle martzisabelle martz

1711 gold badge3 silver badges12 bronze badges

1

I had also faced the same problem and spent 3 days to dig it out.

This happens because of your wrong TNS service entry.

First check whether you are able to connect to standby database from primary database using sql > sqlplus sys@orastand as sysdba (orastand is a standby database).

If you are not able to connect then it is a problem with the service. Correct the entry of service name in TNS file at primary end.

Check standby database the same way. Make the changes here too if required.

Make sure the log_archive_dest_2 parameter has the correct service name.

Gryu's user avatar

Gryu

2,0142 gold badges15 silver badges27 bronze badges

answered Jun 26, 2014 at 6:41

user3778101's user avatar

For those that may be running Oracle in a VM (like me) I saw this issue because my VM was running out of memory, which seems to have prevented OracleDB from starting up/running correctly. Increasing my VM memory and restarting fixed the issue.

answered Apr 14, 2016 at 18:14

th3uiguy's user avatar

th3uiguyth3uiguy

1,8791 gold badge11 silver badges8 bronze badges

Lots of answers here, but here comes a working example with code that you can copy and paste and test immediately:

For me the error 12514 was solved after specifying the correct SERVICE_NAME.
You find that on the server in the file tnsnames.ora which comes with 3 predefined service names (one of them is «XE»).

  1. I installed the Oracle Express database OracleXE112 which already comes with some preinstalled demo tables.
  2. When you start the installer you are asked for a password. I entered «xxx» as password. (not used in production)
  3. My server runs on the machine 192.168.1.158
  4. On the server you must explicitely allow access for the process TNSLSNR.exe in the Windows Firewall. This process listens on port 1521.
  5. OPTION A: For C# (.NET2 or .NET4) you can download ODAC11, from which you have to add Oracle.DataAccess.dll to your project. Additionally this DLL depends on: OraOps11w.dll, oci.dll, oraociei11.dll (130MB!), msvcr80.dll.
    These DLLs must be in the same directory as the EXE or you must specify the DLL path in: HKEY_LOCAL_MACHINESOFTWAREOracleODP.NET4.112.4.0DllPath. On 64 bit machines write additionally to HKLMSOFTWAREWow6432NodeOracle...
  6. OPTION B: If you have downloaded ODAC12 you need Oracle.DataAccess.dll, OraOps12w.dll, oci.dll, oraociei12.dll (160MB!), oraons.dll, msvcr100.dll. The Registry path is HKEY_LOCAL_MACHINESOFTWAREOracleODP.NET4.121.2.0DllPath
  7. OPTION C: If you don’t want huge DLL’s of more than 100 MB you should download ODP.NET_Managed12.x.x.x.xxxxx.zip in which you find Oracle.ManagedDataAccess.dll which is only 4 MB and is a pure managed DLL which works in 32 bit and 64 bit processes as well and depends on no other DLL and does not require any registry entries.
  8. The following C# code works for me without any configuration on the server side (just the default installation):
using Oracle.DataAccess.Client;
or
using Oracle.ManagedDataAccess.Client;

....

string oradb = "Data Source=(DESCRIPTION="
    + "(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.158)(PORT=1521)))"
    + "(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=XE)));"
    + "User Id=SYSTEM;Password=xxx;";

using (OracleConnection conn = new OracleConnection(oradb)) 
{
    conn.Open();
    using (OracleCommand cmd = new OracleCommand())
    {
        cmd.Connection  = conn;
        cmd.CommandText = "select TABLESPACE_NAME from DBA_DATA_FILES";

        using (OracleDataReader dr = cmd.ExecuteReader())
        {
            while (dr.Read())
            {
                listBox.Items.Add(dr["TABLESPACE_NAME"]);
            }
        }
    }
}

If the SERVICE_NAME=XE is wrong you get error 12514. The SERVICE_NAME is optional. You can also leave it away.

answered Apr 20, 2017 at 21:19

Elmue's user avatar

ElmueElmue

7,3042 gold badges45 silver badges56 bronze badges

1

In my case the database had ran out of disk space. Which caused it to not respond. Once I cleared up that issue everything worked again.

answered Apr 20, 2014 at 2:12

Pete Brumm's user avatar

Pete BrummPete Brumm

1,62618 silver badges13 bronze badges

1

I got the same error because the remote SID specified was wrong:

 > sqlplus $DATASOURCE_USERNAME/$DATASOURCE_PASSWORD@$DB_SERVER_URL/$REMOTE_SID 

I queried the system database:

select * from global_name;

and found my remote SID («XE»).

Then I could connect without any problem.

answered Oct 13, 2017 at 10:55

Laura Liparulo's user avatar

In my case, round brackets around the SERVICE_NAME was missing in the tnsnames.ora file.

<DBNAME> =
  (DESCRIPTION =
    (ADDRESS_LIST =
     (ADDRESS = (PROTOCOL=TCP)(HOST = nupark-cnvr-ora )(PORT=1521))
    )
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = <DBNAME> ***CLOSING ROUND BRACKET WAS MISSING HERE***
    )
  )

LISTENER_<DBNAME> =

  (ADDRESS = (PROTOCOL = TCP)(HOST = nupark-cnvr-ora)(PORT = 1521))

answered Mar 10, 2020 at 17:59

Mosab Sasi's user avatar

Mosab SasiMosab Sasi

1,1108 silver badges11 bronze badges

I had just to replace my connection string

from:

jdbc:oracle:thin:@localhost:1521:xe

To:

jdbc:oracle:thin:@localhost:1521:orcl

Steven's user avatar

Steven

1,9073 gold badges21 silver badges33 bronze badges

answered Oct 27, 2022 at 2:49

rahul Bhavar's user avatar

For me this was caused by using a dynamic ipadress using installation. I reinstalled Oracle using a static ipadress and then everything was fine

answered Dec 3, 2016 at 7:45

Steef's user avatar

SteefSteef

5335 silver badges20 bronze badges

Restarting the VM worked for me

answered Mar 20, 2019 at 3:35

wishman's user avatar

wishmanwishman

7744 gold badges14 silver badges31 bronze badges

My issue was resolved by replacing the’SID’ in URL with ‘service name’ and correct host.

answered Aug 23, 2019 at 13:47

Sir. Hedgehog's user avatar

Sir. HedgehogSir. Hedgehog

1,2503 gold badges18 silver badges39 bronze badges

tnslsnr is up but database is down.

For oracle novice it is not obvious that database may be down while connections are accepted.

I had to start up database manually like that

su - oracle
export ORACLE_SID=XE
sqlplus sys as sysdba

And then in sql console

startup

In my case i failed to startup but got another error message and found the source of a problem — i had to change host name and then database auto startup was functional again.

answered Nov 11, 2019 at 9:38

user3132194's user avatar

user3132194user3132194

2,19123 silver badges17 bronze badges

I have implemented below workaround to resolve this issue.

  1. I have set the ORACLE_HOME using command prompt
    (right click cmd.exe and Run as System administrator).

  2. Used below command

    set oracle_home="path to the oracle home"

  3. Go to All programs —> Oracle -ora home1 —> Configuration migration tools —> Net Manager —> Listener

  4. Select Database Services from dropdown.
    Both Global database name and SID are set to the same (ORCL in my case).
    Set Oracle Home Directory.

Oracle Net Manager window example from oracle documentation:
Oracle Net Manager example

  1. Click on File and save network configuration.

Gryu's user avatar

Gryu

2,0142 gold badges15 silver badges27 bronze badges

answered Nov 29, 2017 at 12:34

Raman B's user avatar

Raman BRaman B

3214 silver badges5 bronze badges

The problem was that my connection string url contained database name instead of SID.
Replacing database name with oracle database connection SID solved this problem.

To know your oracle SID’s you can browse tnsnames.ora file.

XE was the actual SID, so this is how my tomcat connection string looks like now:

    <Resource
       name="jdbc/my_db_conn"
       auth="Container"
       type="javax.sql.DataSource"
       driverClassName="oracle.jdbc.driver.OracleDriver"
       url="jdbc:oracle:thin:@//127.0.0.1:1521/XE"
       username="test_user"
       password="test" />

My server version was «Oracle 11.2 Express», but solution should work on other versions too.

answered Dec 5, 2019 at 12:07

Benas's user avatar

BenasBenas

1,9572 gold badges38 silver badges65 bronze badges

I had a case that I used DBMS where I had to fulfill a db connection form.

I put SID into the Database field and in the dropdown, next to the field, I had had ‘Service Name’ value instead of ‘SID’ value.
(normally I don’t use Oracle database so I’ve not been aware of the difference)

That was the reason I got the error message.

answered Jul 28, 2020 at 16:02

Bronek's user avatar

BronekBronek

10.5k2 gold badges44 silver badges46 bronze badges

The problem can be in the incorrect URL.

For example, I’m using Oracle database (inside VM) with Spring framework and having this issue.

I had in my application.properties file:

spring.datasource.url=jdbc:oracle:thin:@//localhost:1521/orcl12c

But the db version was defferent:

spring.datasource.url=jdbc:oracle:thin:@//localhost:1521/orclcdb

The correct URL can be found in the tnsnames.ora file (this file would be available where the Oracle server, so if you using VM, you should look for this file inside your host VM).
For example for Oracle in the VirtualBox the command to see this file is:

nano /u01/app/oracle/product/version/db_1/network/admin/tnsnames.ora

Dharman's user avatar

Dharman

29.3k21 gold badges80 silver badges131 bronze badges

answered Apr 17, 2021 at 21:59

x3hree's user avatar

x3hreex3hree

711 gold badge2 silver badges4 bronze badges

In my case for Linux environment, the oracle file at ORACLE_HOME/bin was highlighted in «Red» color with different permissions as below:
enter image description here

I changed the permissions of this file as below:

1) Stop Oracle -> sudo systemctl stop oracle.service
2) Change the permission of oracle file at ORACLE_HOME/bin directory as «sudo chmod 777 oracle«
3) Start Oracle -> sudo systemctl start oracle.service

Then after this change, I checked the status of listener using lsnrctl status.Here, I can see the db instances loaded successfully.

However, I can connect using sqldeveloper only, with sqlplus command line I’m getting ORA-12547: TNS Lost Contact error. So, this can a quick workaround to use sqldeveloper.

Note: Take a backup of oracle file before changing the permissions.

answered Aug 11, 2021 at 13:49

Rohit Gaikwad's user avatar

Rohit GaikwadRohit Gaikwad

3,6093 gold badges17 silver badges40 bronze badges

I had this issue and the fix was to make sure in tnsnames.ora the SERVICE_NAME is a valid service name in your database. To find out valid service names, you can use the following query in oracle:

select value from v$parameter where name='service_names'

Once I updated tnsnames.ora to:

TEST =
   (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = *<validhost>*)(PORT = *<validport>*))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = *<servicenamefromDB>*)
    )
)

then I ran:

sqlplus user@TEST

Success!
The listener is basically telling you that whatever service_name you are using isn’t a valid service according to the DB.

(*I was running sqlplus from Win7 client workstation to remote DB and blame the DBAs ;) *)

answered Apr 16, 2013 at 23:36

Brad Rippe's user avatar

Brad RippeBrad Rippe

3,3071 gold badge18 silver badges20 bronze badges

11

I know this is an old question, but still unanswered. It took me a day of research, but I found the simplest solution, at least in my case (Oracle 11.2 on Windows 2008 R2) and wanted to share.

The error, if looked at directly, indicates that the listener does not recognize the service name. But where does it keep service names? In %ORACLE_HOME%NETWORKADMINlistener.ora

The «SID_LIST» is just that, a list of SIDs and service names paired up in a format you can copy or lookup.

I added the problem Service Name, then in Windows «Services» control panel, I did a «Restart» on the Oracle listener service. Now all is well.


For example, your listener.ora file might initially look like:

# listener.ora Network Configuration File: C:apporacle_userproduct12.1.0dbhome_1networkadminlistener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = C:apporacle_userproduct12.1.0dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:C:apporacle_userproduct12.1.0dbhome_1binoraclr12.dll")
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

… And to make it recognize a service name of orcl, you might change it to:

# listener.ora Network Configuration File: C:apporacle_userproduct12.1.0dbhome_1networkadminlistener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = C:apporacle_userproduct12.1.0dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:C:apporacle_userproduct12.1.0dbhome_1binoraclr12.dll")
    )
    (SID_DESC = 
        (GLOBAL_DBNAME = orcl)
        (ORACLE_HOME = C:apporacle_userproduct12.1.0dbhome_1)
        (SID_NAME = orcl)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

Kevin's user avatar

Kevin

74.1k12 gold badges128 silver badges163 bronze badges

answered Mar 25, 2014 at 12:13

Joseph Argenio's user avatar

3

In my circumstances the error was due to the fact the listener did not have the db’s service registered. I solved this by registering the services. Example:

My descriptor in tnsnames.ora:

LOCALDB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = LOCALDB)
    )
  )

So, I proceed to register the service in the listener.ora manually:

SID_LIST_LISTENER =
    (SID_DESC =
      (GLOBAL_DBNAME = LOCALDB)
      (ORACLE_HOME = C:Oracleproduct11.2.0dbhome_1)
      (SID_NAME = LOCALDB)
    )

Finally, restart the listener by command:

> lsnrctl stop
> lsnrctl start

Done!

answered May 31, 2017 at 23:39

manix's user avatar

manixmanix

14.3k10 gold badges68 silver badges104 bronze badges

1

I had this issue at Windows server 2008 R2 and Oracle 11g

go to Net Manager > Listener > select database services form the combox > «Global Database Name» must be same as «SID» and «Oracle Home Directory» must be correct.

If you don’t have any entry for database services, create one and set correct global database , sid and oracle home.

Mr_and_Mrs_D's user avatar

Mr_and_Mrs_D

31.2k37 gold badges175 silver badges355 bronze badges

answered Dec 21, 2013 at 14:27

Sepideh's user avatar

SepidehSepideh

1491 silver badge2 bronze badges

1

This really should be a comment to [Brad Rippe][1]’s answer, but alas, not enough rep. That answer got me 90% of the way there. In my case, the installation and configuration of the databases put entries in the tnsnames.ora file for the databases I was running. First, I was able to connect to the database by setting the environment variables (Windows):

set ORACLE_SID=mydatabase
set ORACLE_HOME=C:Oracleproduct11.2.0dbhome_1

and then connecting using

sqlplus / as sysdba

Next, running the command from Brad Rippe’s answer:

select value from v$parameter where name='service_names';

showed that the names didn’t match exactly. The entries as created using Oracle’s Database Configuration Assistant were originally:

MYDATABASE =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = mylaptop.mydomain.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = mydatabase.mydomain.com)
    )
  ) 

The service name from the query was just mydatabase rather than mydatabase.mydomain.com. I edited the tnsnames.ora file to just the base name without the domain portion so they looked like this:

MYDATABASE =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = mylaptop.mydomain.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = mydatabase)
    )
  ) 

I restarted the TNS Listener service (I often use lsnrctl stop and lsnrctl start from an administrator command window [or Windows Powershell] instead of the Services control panel, but both work.) After that, I was able to connect.
[1]: https://stackoverflow.com/users/979521/brad-rippe

answered Dec 19, 2016 at 14:38

Capricorn1's user avatar

Capricorn1Capricorn1

8099 silver badges15 bronze badges

1

Starting the OracleServiceXXX from the services.msc worked for me in Windows.

answered Jun 16, 2015 at 7:48

Ishildur Baggins's user avatar

1

For thoses Who are using spring-boot and jdbc for connection.
You have to be careful while writing jdbcUrl in application.properties

With SID in Database connection —
source.datasource.jdbcUrl = jdbc:oracle:thin:@[HOST][:PORT]:SID

With Service name in db connection
globe.datasource.jdbcUrl = jdbc:oracle:thin:@//[HOST][:PORT]/SERVICE

This worked for me :)

answered Jun 16, 2020 at 8:18

surajmall's user avatar

surajmallsurajmall

1491 silver badge5 bronze badges

For Dbeaver users: try selecting «SID» instead of «Service name» in connection settings.

answered Aug 30, 2021 at 6:49

JanBrus's user avatar

JanBrusJanBrus

9618 silver badges13 bronze badges

1

I had the same problem. For me, just writing

sqlplus myusername/mypassword@localhost

did the trick, doing so makes it connect to the default service name, I guess.

Hosana Gomes's user avatar

answered Sep 9, 2014 at 4:01

Hossein's user avatar

HosseinHossein

23.3k34 gold badges117 silver badges217 bronze badges

2

This error can occur when an application makes a new connection for every database interaction or the connections are not closed properly. One of the free tools to monitor and confirm this is Oracle Sql developer (although this is not the only tool you can use to monitor DB sessions).

you can download the tool from oracle site Sql Developer

here is a screenshot of how to monitor you sessions. (if you see many sessions piling up for your application user during when you see the ORA-12514 error then it’s a good indication that you may have connection pool problem).

enter image description here

answered Apr 1, 2013 at 0:21

grepit's user avatar

grepitgrepit

20.4k6 gold badges100 silver badges81 bronze badges

Check to see the database is up. Log onto the server, set the ORACLE_SID environment variable to your database SID, and run SQL*Plus as a local connection.

answered May 29, 2012 at 0:50

DCookie's user avatar

DCookieDCookie

42.2k11 gold badges83 silver badges91 bronze badges

1

I resolved this issue in my linux enviroment updating the IP of my machine in /etc/hosts file.

You can verify your network IP (inet end.) with:

$ifconfig

See if your IP matches with /etc/hosts file:

$cat /etc/hosts

Edit your /etc/hosts file, if nedded:

$sudo gedit /etc/hosts

Bye.

answered Sep 3, 2014 at 15:27

Sergio Marcelo C Figueiredo's user avatar

2

what worked for me was really simple, I just needed to initiate the service manually in the «Windows Services» (services.msc in cmd trompt).
my service name is: OracleServiceXXXXX.

answered May 12, 2016 at 13:57

isabelle martz's user avatar

isabelle martzisabelle martz

1711 gold badge3 silver badges12 bronze badges

1

I had also faced the same problem and spent 3 days to dig it out.

This happens because of your wrong TNS service entry.

First check whether you are able to connect to standby database from primary database using sql > sqlplus sys@orastand as sysdba (orastand is a standby database).

If you are not able to connect then it is a problem with the service. Correct the entry of service name in TNS file at primary end.

Check standby database the same way. Make the changes here too if required.

Make sure the log_archive_dest_2 parameter has the correct service name.

Gryu's user avatar

Gryu

2,0142 gold badges15 silver badges27 bronze badges

answered Jun 26, 2014 at 6:41

user3778101's user avatar

For those that may be running Oracle in a VM (like me) I saw this issue because my VM was running out of memory, which seems to have prevented OracleDB from starting up/running correctly. Increasing my VM memory and restarting fixed the issue.

answered Apr 14, 2016 at 18:14

th3uiguy's user avatar

th3uiguyth3uiguy

1,8791 gold badge11 silver badges8 bronze badges

Lots of answers here, but here comes a working example with code that you can copy and paste and test immediately:

For me the error 12514 was solved after specifying the correct SERVICE_NAME.
You find that on the server in the file tnsnames.ora which comes with 3 predefined service names (one of them is «XE»).

  1. I installed the Oracle Express database OracleXE112 which already comes with some preinstalled demo tables.
  2. When you start the installer you are asked for a password. I entered «xxx» as password. (not used in production)
  3. My server runs on the machine 192.168.1.158
  4. On the server you must explicitely allow access for the process TNSLSNR.exe in the Windows Firewall. This process listens on port 1521.
  5. OPTION A: For C# (.NET2 or .NET4) you can download ODAC11, from which you have to add Oracle.DataAccess.dll to your project. Additionally this DLL depends on: OraOps11w.dll, oci.dll, oraociei11.dll (130MB!), msvcr80.dll.
    These DLLs must be in the same directory as the EXE or you must specify the DLL path in: HKEY_LOCAL_MACHINESOFTWAREOracleODP.NET4.112.4.0DllPath. On 64 bit machines write additionally to HKLMSOFTWAREWow6432NodeOracle...
  6. OPTION B: If you have downloaded ODAC12 you need Oracle.DataAccess.dll, OraOps12w.dll, oci.dll, oraociei12.dll (160MB!), oraons.dll, msvcr100.dll. The Registry path is HKEY_LOCAL_MACHINESOFTWAREOracleODP.NET4.121.2.0DllPath
  7. OPTION C: If you don’t want huge DLL’s of more than 100 MB you should download ODP.NET_Managed12.x.x.x.xxxxx.zip in which you find Oracle.ManagedDataAccess.dll which is only 4 MB and is a pure managed DLL which works in 32 bit and 64 bit processes as well and depends on no other DLL and does not require any registry entries.
  8. The following C# code works for me without any configuration on the server side (just the default installation):
using Oracle.DataAccess.Client;
or
using Oracle.ManagedDataAccess.Client;

....

string oradb = "Data Source=(DESCRIPTION="
    + "(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.158)(PORT=1521)))"
    + "(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=XE)));"
    + "User Id=SYSTEM;Password=xxx;";

using (OracleConnection conn = new OracleConnection(oradb)) 
{
    conn.Open();
    using (OracleCommand cmd = new OracleCommand())
    {
        cmd.Connection  = conn;
        cmd.CommandText = "select TABLESPACE_NAME from DBA_DATA_FILES";

        using (OracleDataReader dr = cmd.ExecuteReader())
        {
            while (dr.Read())
            {
                listBox.Items.Add(dr["TABLESPACE_NAME"]);
            }
        }
    }
}

If the SERVICE_NAME=XE is wrong you get error 12514. The SERVICE_NAME is optional. You can also leave it away.

answered Apr 20, 2017 at 21:19

Elmue's user avatar

ElmueElmue

7,3042 gold badges45 silver badges56 bronze badges

1

In my case the database had ran out of disk space. Which caused it to not respond. Once I cleared up that issue everything worked again.

answered Apr 20, 2014 at 2:12

Pete Brumm's user avatar

Pete BrummPete Brumm

1,62618 silver badges13 bronze badges

1

I got the same error because the remote SID specified was wrong:

 > sqlplus $DATASOURCE_USERNAME/$DATASOURCE_PASSWORD@$DB_SERVER_URL/$REMOTE_SID 

I queried the system database:

select * from global_name;

and found my remote SID («XE»).

Then I could connect without any problem.

answered Oct 13, 2017 at 10:55

Laura Liparulo's user avatar

In my case, round brackets around the SERVICE_NAME was missing in the tnsnames.ora file.

<DBNAME> =
  (DESCRIPTION =
    (ADDRESS_LIST =
     (ADDRESS = (PROTOCOL=TCP)(HOST = nupark-cnvr-ora )(PORT=1521))
    )
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = <DBNAME> ***CLOSING ROUND BRACKET WAS MISSING HERE***
    )
  )

LISTENER_<DBNAME> =

  (ADDRESS = (PROTOCOL = TCP)(HOST = nupark-cnvr-ora)(PORT = 1521))

answered Mar 10, 2020 at 17:59

Mosab Sasi's user avatar

Mosab SasiMosab Sasi

1,1108 silver badges11 bronze badges

I had just to replace my connection string

from:

jdbc:oracle:thin:@localhost:1521:xe

To:

jdbc:oracle:thin:@localhost:1521:orcl

Steven's user avatar

Steven

1,9073 gold badges21 silver badges33 bronze badges

answered Oct 27, 2022 at 2:49

rahul Bhavar's user avatar

For me this was caused by using a dynamic ipadress using installation. I reinstalled Oracle using a static ipadress and then everything was fine

answered Dec 3, 2016 at 7:45

Steef's user avatar

SteefSteef

5335 silver badges20 bronze badges

Restarting the VM worked for me

answered Mar 20, 2019 at 3:35

wishman's user avatar

wishmanwishman

7744 gold badges14 silver badges31 bronze badges

My issue was resolved by replacing the’SID’ in URL with ‘service name’ and correct host.

answered Aug 23, 2019 at 13:47

Sir. Hedgehog's user avatar

Sir. HedgehogSir. Hedgehog

1,2503 gold badges18 silver badges39 bronze badges

tnslsnr is up but database is down.

For oracle novice it is not obvious that database may be down while connections are accepted.

I had to start up database manually like that

su - oracle
export ORACLE_SID=XE
sqlplus sys as sysdba

And then in sql console

startup

In my case i failed to startup but got another error message and found the source of a problem — i had to change host name and then database auto startup was functional again.

answered Nov 11, 2019 at 9:38

user3132194's user avatar

user3132194user3132194

2,19123 silver badges17 bronze badges

I have implemented below workaround to resolve this issue.

  1. I have set the ORACLE_HOME using command prompt
    (right click cmd.exe and Run as System administrator).

  2. Used below command

    set oracle_home="path to the oracle home"

  3. Go to All programs —> Oracle -ora home1 —> Configuration migration tools —> Net Manager —> Listener

  4. Select Database Services from dropdown.
    Both Global database name and SID are set to the same (ORCL in my case).
    Set Oracle Home Directory.

Oracle Net Manager window example from oracle documentation:
Oracle Net Manager example

  1. Click on File and save network configuration.

Gryu's user avatar

Gryu

2,0142 gold badges15 silver badges27 bronze badges

answered Nov 29, 2017 at 12:34

Raman B's user avatar

Raman BRaman B

3214 silver badges5 bronze badges

The problem was that my connection string url contained database name instead of SID.
Replacing database name with oracle database connection SID solved this problem.

To know your oracle SID’s you can browse tnsnames.ora file.

XE was the actual SID, so this is how my tomcat connection string looks like now:

    <Resource
       name="jdbc/my_db_conn"
       auth="Container"
       type="javax.sql.DataSource"
       driverClassName="oracle.jdbc.driver.OracleDriver"
       url="jdbc:oracle:thin:@//127.0.0.1:1521/XE"
       username="test_user"
       password="test" />

My server version was «Oracle 11.2 Express», but solution should work on other versions too.

answered Dec 5, 2019 at 12:07

Benas's user avatar

BenasBenas

1,9572 gold badges38 silver badges65 bronze badges

I had a case that I used DBMS where I had to fulfill a db connection form.

I put SID into the Database field and in the dropdown, next to the field, I had had ‘Service Name’ value instead of ‘SID’ value.
(normally I don’t use Oracle database so I’ve not been aware of the difference)

That was the reason I got the error message.

answered Jul 28, 2020 at 16:02

Bronek's user avatar

BronekBronek

10.5k2 gold badges44 silver badges46 bronze badges

The problem can be in the incorrect URL.

For example, I’m using Oracle database (inside VM) with Spring framework and having this issue.

I had in my application.properties file:

spring.datasource.url=jdbc:oracle:thin:@//localhost:1521/orcl12c

But the db version was defferent:

spring.datasource.url=jdbc:oracle:thin:@//localhost:1521/orclcdb

The correct URL can be found in the tnsnames.ora file (this file would be available where the Oracle server, so if you using VM, you should look for this file inside your host VM).
For example for Oracle in the VirtualBox the command to see this file is:

nano /u01/app/oracle/product/version/db_1/network/admin/tnsnames.ora

Dharman's user avatar

Dharman

29.3k21 gold badges80 silver badges131 bronze badges

answered Apr 17, 2021 at 21:59

x3hree's user avatar

x3hreex3hree

711 gold badge2 silver badges4 bronze badges

In my case for Linux environment, the oracle file at ORACLE_HOME/bin was highlighted in «Red» color with different permissions as below:
enter image description here

I changed the permissions of this file as below:

1) Stop Oracle -> sudo systemctl stop oracle.service
2) Change the permission of oracle file at ORACLE_HOME/bin directory as «sudo chmod 777 oracle«
3) Start Oracle -> sudo systemctl start oracle.service

Then after this change, I checked the status of listener using lsnrctl status.Here, I can see the db instances loaded successfully.

However, I can connect using sqldeveloper only, with sqlplus command line I’m getting ORA-12547: TNS Lost Contact error. So, this can a quick workaround to use sqldeveloper.

Note: Take a backup of oracle file before changing the permissions.

answered Aug 11, 2021 at 13:49

Rohit Gaikwad's user avatar

Rohit GaikwadRohit Gaikwad

3,6093 gold badges17 silver badges40 bronze badges

Issue

How to troubleshoot Oracle Connection errors.

Oracle drivers require very specific connection statements in a unique format, though a TNSNames.ora file may not always be required. For instance, if you have installed only the Tableau-provided Oracle files and do not have a stand-alone Oracle client, the Oracle error messages will still refer to the TNSNames.ora file, making troubleshooting complicated.

    Environment

    • Tableau Desktop
    • Tableau Server
    • Oracle

    Resolution

    Often, correcting route or naming syntax in the Advanced Oracle Connection dialog box or using your full .WORLD database name resolves most Oracle connection issues. If your connection error requires more troubleshooting, refer to the five common connection errors listed below.

    • ORA-03113: end-of-file on communication channel
    • ORA-12154: TNS: could not resolve the connect identifier specified: HOST value incorrect or Global name incorrect or unknown
    • ORA-12514: TNS listener does not currently know of service requested in connect descriptor: SERVICE value incorrect
    • ORA-12541: TNS: no listener: PORT value incorrect
    • ORA-00932: inconsistent data types

      ORA-03113: end-of-file on communication channel

      ORA-03113 is a catch-all type error for any problem interrupting an Oracle session. There can be numerous causes for this error. Please refer to the list below for some troubleshooting guidance.

      • Refer to Oracle documentation specific to this error: My Oracle Support.
        • Refer to Oracle’s B Troubleshooting Common Errors page.
      • Oracle recommends that you check for network problems and review the SQL*Net setup.
      • If you are connecting to Oracle 9.2.0.5, in many cases the primary cause of this error is Oracle bug 3010227. Ask your Oracle database administrator to apply Oracle patch 9.2.0.6 or another patch appropriate for your server.
      • Set the Oracle initialization parameter ‘STAR_TRANSFORMATION_ENABLED’ to FALSE.
      • Test changing the scheduled time of the extract refresh
      • Alternatively, if you would like to test this issue further follow the optional procedure listed below.

      Step 1 

      From the Tableau Desktop start page, select Connect to Data.

      Step 2 

      On the Connect page, click Oracle, then click OK.

      For more information about completing the connection steps, refer to the Oracle Database topic in the Desktop Help.

      Step 3 

      1. In the join area, hover over the Custom SQL table until the edit icon displays, and then click the icon.
      2. Copy the query in the Edit Custom SQL dialog box.

      SELECT "NumericBins", "Key" as "Key",
      "NumericBins", "Measure E-2" AS "Measure E-2",
      "NumericBins", "Measure E-1" AS "Measure E-1",
      "NumericBins", "Measure E+0" AS "Measure E+0",
      "NumericBins", "Measure E+1" AS "Measure E+1",
      "NumericBins", "Measure E+4" AS "Measure E+4",
      "NumericBins", "Measure E+7" AS "Measure E+7"
      FROM "TestV1", "NumericBins" "NumericBins"

       

      Where «TestV1» is the name of your connection in Tableau.

      Step 4 

      In a SQL session connected to this database, paste and run the query. The expected response is error ORA-7445: exception encountered: core dump, which confirms that the problem is ORA-3113, as expected.

      ORA-12154: TNS: could not resolve the connect identifier specified

      ORA-12154 occurs when the transparent network substrate (TNS) cannot resolve the service name. The service name is specified in the TNSNames.ora file, which is located in your %ORACLE_HOME%networkadmin folder. Most often, this error occurs when information in the TNSNames.ora file is incorrect. For example:

      • The .world extension is not included on the database name.
      • The SERVICE_NAME or HOST variable is incorrect.

      To resolve this issue, try one of the three following troubleshooting options, in the order listed below.

      • Option 1: Setting an Oracle Connection to Use TNSNames.ora or LDAP.ora
      • Option 2: Error «ORA-12154» Connecting to Oracle When Not Using TNSNames.ora

      Option 1: Edit TNSNames.ora

       Provide the full database name, including the .world extension in both of the following locations:

      • The TNSNames.ora file.

        And

      • The Server text box of the Connect page.

      Option 2: Ensure that Tableau Server Run As User account has permissions to TNSNames.ora (Tableau Server only)

      If you have Tableau Server installed, complete the procedure below to ensure that the Tableau Server Run As user account has permissions to the location of the TNSNames.ora file. If the Run As user account does not have permissions, Tableau Server is unable to access the Oracle Data source details.

      Step 1 

      Verify the location of the TNSNames.ora file, or the equivalent SQLNET.ora and LDAP.ora files on the machine.

      Note: By default, the TNSNames.ora file is located in <oracle-directory>networkadmin directory. For example, C:Oracle_Clientnetworkadmin.

      Step 2 

      Confirm that the TNS_ADMIN variable points to the location of the file or files described in step 1.

      Note: To check the TNS_ADMIN variable, click the Start button, and select Control Panel > System. Click Advanced system settings, click the Advanced tab, and click Environmental Variables button.
      The system variable file path must be in UNC format.

      Step 3 

      Open TSM in a browser: https://<tsm-computer-name>:8850 For more information, see Sign in to Tableau Services Manager Web UI.

      Step 4 

      Click the Security tab, and then click the Run As Service Account tab.
      Under Server Run As User, copy the information in the Username field.

      Step 5 

      Go to the folder where the TNSNames.ora file is located.

      Step 6 

      Right-click the folder and select Properties. Click the Security tab and click the Edit button.

      Step 7 

      Under Group or user names, click the Add button.

      Step 8 

      In the Enter the object names to select text box, paste the details of the Run As User account you copied in step 6.

      Step 9 

      When finished, click OK.

      Step 10 

      In the Permissions area,ensure that the Full control and Modify check boxes are selected.

      Step 11 

      Click OK to close the dialog boxes.

        Option 3: Verify that all information in TNSNames.ora is correct

         If the above troubleshooting steps do not resolve the issue, continue reading and complete the procedure to verify the other information in the TNSNames.ora file is provided correctly.

        An example of a TNSNames.ora file is shown here:

        QAORCL10.world =

        (DESCRIPTION =

        (ADDRESS_LIST =

        (ADDRESS = (PROTOCOL = TCP)(HOST = MY_HOST_NAME)(PORT = 1521))

        )

        (CONNECT_DATA =

        (SERVICE_NAME = MY_SERVICE_NAME)

        )

        )

        The three variables of interest in the file are HOST, PORT, and SERVICE_NAME. Copy these variables from the TNSNames.ora file and keep them available. These variables are case sensitive.The following steps describe how to provide these variables for your connection.

        Step 1 

        From the Tableau Desktop start page, select Connect to Data.

        Step 2 

        On the Connect page, click Oracle.

        Step 3 

        Provide the following information from the TNSNames.ora file:

        • In the Server name text box, type the HOST name.
        • In the Service text box, type the SERVICE_NAME.
        • In the Port text box, type the PORT number.
        • Specify whether to use Windows Authentication or a specific user name and password, and then click Connect.

        Note: Variables are case sensitive.

        Step 4 

        Select a schema from the Schema drop-down list, drag a table to the join area, and then click Go to Worksheet.

        Step 5 

        Complete the steps in the Setting an Oracle Connection to Use TNSNames.ora or LDAP.ora article.

        Important: 

        • Make sure that you save the TNSNames.ora file you use in ASCII encoding. Any other encoding besides ASCII, for example UTF-8 or Unicode, causes the ORA-12154 error message.
        • These steps are usually required even if the Oracle software is already installed on the machine.

        Step 6

        Download and install the appropriate Oracle drivers from the Tableau Drivers page. Even if an Oracle driver is installed on your computer, it could be incompatible with Tableau and will require the version specified on the Drivers page.

        ORA-12514: TNS listener does not currently know of service requested in connect descriptor

        Typically this error occurs when the SERVICE value is incorrect.

        To resolve this issue, find out what the correct SERVICE value is, open the TNSNames.ora file located in your %ORACLE_HOME%networkadmin folder. Refer to the steps under ORA_12154 if necessary.

        ORA-12541: TNS: no listener

        Typically this error occurs when the PORT value is incorrect.

        To resolve this issue, replace the PORT value with either 1521 or 1526. Try the value that is currently not in use.

        ORA-00932: inconsistent data types

        This error occurs when connecting to Oracle or when creating an extract from an Oracle data source. Typically this error is caused by the installation of incorrect Oracle drivers.

        To resolve this issue, install the correct Oracle drivers from the Drivers page for the version of Tableau you are using.

        In addition to the above common errors, if you are using Tableau Desktop/Server 2020.2 or later and experiencing performance issues e.g. extract refresh taking long time, you can try downloading and installing the Oracle OCI driver. Refer to the article in Related Links. Driver can be downloaded from here.

          Additional Information

          Suggestions

          If you do not have an Oracle Client installed on your machine, be sure to get the necessary files from your database administrator. If the Oracle data connection errors persist, do the following:

          • Check the TNSNames.ora folder path used to create the TNS_ADMIN variable.
          • Restart your machine to ensure that the TNS_ADMIN variable is recognized.
          • Check that the Oracle connection name used in Tableau exactly matches the TNSNames.ora Net Service Name entry. This name is case sensitive.
          • In some cases Windows will need to be restarted before the Oracle driver will pick up the TNS_ADMIN system variable
          • Contact local IT to verify that the TNSNames.ora file is current.
          • If the Oracle connection uses LDAP, make sure to include the SQLNet.ora file as well as the TNSNames.ora file.

          Discuss this article…




          When trying to connect to an ORACLE user via TOAD (Quest Software) or any other means (Oracle Enterprise Manager) I get this error:

          ORA-011033: ORACLE initialization or shutdown in progress

          Nicolás Alarcón Rapela's user avatar

          asked Sep 10, 2008 at 9:14

          rohancragg's user avatar

          After some googling, I found the advice to do the following, and it worked:

          SQL> startup mount
          
          ORACLE Instance started
          
          SQL> recover database 
          
          Media recovery complete
          
          SQL> alter database open;
          
          Database altered
          

          Vega's user avatar

          Vega

          27.2k27 gold badges91 silver badges98 bronze badges

          answered Sep 10, 2008 at 9:22

          rohancragg's user avatar

          rohancraggrohancragg

          4,9605 gold badges35 silver badges45 bronze badges

          8

          Here is my solution to this issue:

          SQL> Startup mount
          ORA-01081: cannot start already-running ORACLE - shut it down first
          SQL> shutdown abort
          ORACLE instance shut down.
          SQL>
          SQL> startup mount
          ORACLE instance started.
          
          Total System Global Area 1904054272 bytes
          Fixed Size                  2404024 bytes
          Variable Size             570425672 bytes
          Database Buffers         1325400064 bytes
          Redo Buffers                5824512 bytes
          Database mounted.
          SQL> Show parameter control_files
          
          NAME                                 TYPE        VALUE
          ------------------------------------ ----------- ------------------------------
          control_files                        string      C:APPUSERORADATAORACLEDBC
                                                           ONTROL01.CTL, C:APPUSERFAST
                                                           _RECOVERY_AREAORACLEDBCONTRO
                                                           L02.CTL
          SQL> select a.member,a.group#,b.status from v$logfile a ,v$log b where a.group#=
          b.group# and b.status='CURRENT'
            2
          SQL> select a.member,a.group#,b.status from v$logfile a ,v$log b where a.group#=
          b.group# and b.status='CURRENT';
          
          MEMBER
          --------------------------------------------------------------------------------
          
              GROUP# STATUS
          ---------- ----------------
          C:APPUSERORADATAORACLEDBREDO03.LOG
                   3 CURRENT
          
          
          SQL> shutdown abort
          ORACLE instance shut down.
          SQL> startup mount
          ORACLE instance started.
          
          Total System Global Area 1904054272 bytes
          Fixed Size                  2404024 bytes
          Variable Size             570425672 bytes
          Database Buffers         1325400064 bytes
          Redo Buffers                5824512 bytes
          Database mounted.
          SQL> recover database using backup controlfile until cancel;
          ORA-00279: change 4234808 generated at 01/21/2014 18:31:05 needed for thread 1
          ORA-00289: suggestion :
          C:APPUSERFAST_RECOVERY_AREAORACLEDBARCHIVELOG2014_01_22O1_MF_1_108_%U_.AR
          
          C
          ORA-00280: change 4234808 for thread 1 is in sequence #108
          
          
          Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
          C:APPUSERORADATAORACLEDBREDO03.LOG
          Log applied.
          Media recovery complete.
          SQL> alter database open resetlogs;
          
          Database altered.
          

          And it worked:

          enter image description here

          Vega's user avatar

          Vega

          27.2k27 gold badges91 silver badges98 bronze badges

          answered Jan 23, 2014 at 3:14

          z atef's user avatar

          z atefz atef

          6,7623 gold badges52 silver badges48 bronze badges

          5

          I had a similar problem when I had installed the 12c database as per Oracle’s tutorial . The instruction instructs reader to create a PLUGGABLE DATABASE (pdb).

          The problem

          sqlplus hr/hr@pdborcl would result in ORACLE initialization or shutdown in progress.

          The solution

            1. Login as SYSDBA to the dabase :

              sqlplus SYS/Oracle_1@pdborcl AS SYSDBA
              
            1. Alter database:

              alter pluggable database pdborcl open read write;
              
            1. Login again:

              sqlplus hr/hr@pdborcl
              

          That worked for me

          Some documentation here

          Nicolás Alarcón Rapela's user avatar

          answered May 9, 2017 at 13:28

          Witold Kaczurba's user avatar

          Witold KaczurbaWitold Kaczurba

          9,5873 gold badges58 silver badges63 bronze badges

          5

          This error can also occur in the normal situation when a database is starting or stopping. Normally on startup you can wait until the startup completes, then connect as usual. If the error persists, the service (on a Windows box) may be started without the database being started. This may be due to startup issues, or because the service is not configured to automatically start the database. In this case you will have to connect as sysdba and physically start the database using the «startup» command.

          answered Sep 27, 2008 at 2:33

          JoshL's user avatar

          JoshLJoshL

          10.6k11 gold badges55 silver badges61 bronze badges

          I used a combination of the answers from rohancragg, Mukul Goel, and NullSoulException from above. However I had an additional error:

          ORA-01157: cannot identify/lock data file string — see DBWR trace file

          To which I found the answer here: http://nimishgarg.blogspot.com/2014/01/ora-01157-cannot-identifylock-data-file.html

          Incase the above post gets deleted I am including the commands here as well.

          C:>sqlplus sys/sys as sysdba
          SQL*Plus: Release 11.2.0.3.0 Production on Tue Apr 30 19:07:16 2013
          Copyright (c) 1982, 2011, Oracle.  All rights reserved.
          Connected to an idle instance.
          
          SQL> startup
          ORACLE instance started.
          Total System Global Area  778387456 bytes
          Fixed Size                  1384856 bytes
          Variable Size             520097384 bytes
          Database Buffers          251658240 bytes
          Redo Buffers                5246976 bytes
          Database mounted.
          ORA-01157: cannot identify/lock data file 11 – see DBWR trace file
          ORA-01110: data file 16: 'E:oracleappnimish.gargoradataorcltest_ts.dbf'
          
          SQL> select NAME from v$datafile where file#=16;
          NAME
          --------------------------------------------------------------------------------
          E:ORACLEAPPNIMISH.GARGORADATAORCLTEST_TS.DBF
          
          SQL> alter database datafile 16 OFFLINE DROP;
          Database altered.
          
          SQL> alter database open;
          Database altered.
          

          Thanks everyone you saved my day!

          Fissh

          answered Jan 27, 2016 at 1:02

          gadildafissh's user avatar

          gadildafisshgadildafissh

          2,1831 gold badge20 silver badges21 bronze badges

          0

          The issue can also be due to lack of hard drive space. The installation will succeed but on startup, oracle won’t be able to create the required files and will fail with the same above error message.

          answered Jul 27, 2017 at 10:30

          Alan Hollis's user avatar

          Alan HollisAlan Hollis

          1,2523 gold badges13 silver badges29 bronze badges

          I hope this will help somebody, I solved the problem like this

          There was a problem because the database was not open.
          Command startup opens the database.

          This you can solve with command alter database open
          in some case with alter database open resetlogs

          $ sqlplus / sysdba
          
          SQL> startup
          ORACLE instance started.
          
          Total System Global Area 1073741824 bytes
          Fixed Size          8628936 bytes
          Variable Size         624952632 bytes
          Database Buffers      436207616 bytes
          Redo Buffers            3952640 bytes
          Database mounted.
          Database opened.
          
          SQL> conn user/pass123
          Connected.
          

          Nicolás Alarcón Rapela's user avatar

          answered Jan 23, 2019 at 11:29

          Goku's user avatar

          GokuGoku

          4415 silver badges18 bronze badges

          I faced the same problem. I restarted the oracle service for that DB instance and the error is gone.

          answered Jan 24, 2019 at 6:09

          Hari's user avatar

          HariHari

          4161 gold badge6 silver badges20 bronze badges

          What worked for me is that i hadn’t set the local_listener, to see if the local listener is set login to sqlplus / as sysdba, make sure the database is open and run the following command
          show parameter local_listener, if the value is empty, then you will have to set the local_listener with the following SQL command ALTER SYSTEM SET LOCAL_LISTENER='<LISTENER_NAME_GOES_HERE>'

          answered Oct 17, 2020 at 20:27

          Ian Nato's user avatar

          Ian NatoIan Nato

          9151 gold badge13 silver badges24 bronze badges

          Неструктурированное перечисление некоторых ошибок

          ORA-1555

          Причины, анализ, методы разрешения, включая описание GV$UNDOSTAT и об анализе ошибки в RAC окружении: 389554.1 ORA-1555 Using Automatic Undo Management — How to troubleshoot 269814.1 ORA-01555 Using Automatic Undo Management — Causes and Solutions

          Bug 10389818: SSKGXPRRGN, INVALID HEADER ON UPDATE MESSAGE TOSSING BAD MUPD MSG Oracle 10.2.0.4 RAC OEL 5.1 x86_64, в каталоге udump трейс файлы вида:

          SSKGXPRRGN, invalid header on update message
           magic 0x47464544 t1 0x43424140 t2 0x0 index 0x4b4a
           SKGXPGPID 0x7fffacd309d8        Internet address 10.0.1.1       UDP port number 11630
           tossing bad MUPD msg
           bad update to
           SKGXPGPID 0x2aaaac83fc64        Internet address 10.0.1.2       UDP port number 42626
           bad update from
           SKGXPGPID 0x7fffacd30798        Internet address 10.0.1.1       UDP port number 11630
           header:START MEMORY DUMP, 0x7fffacd30768, for 48 bytes

          в alert.log ошибок нет

          Верхняя оценка необходимого размера undo при текущей нагрузке и сравнение установленного параметра undo_retention со статистикой использования undo сегментов — How To Size UNDO Tablespace For Automatic Undo Management [ID 262066.1]

          Запрос V$UNDOSTAT

          Ora-1555 Dbms_Refresh.Refresh or Dbms_Mview.Refresh On a Distributed Refresh (Doc ID 464524.1) — проявилась в 12.1, как и у Mikhail Velikikh

          ORA-08104 / ORA-08106

          ORA-08104: this index object 15634 is being online built or rebuilt -- object_id
          
          ORA-08106: cannot create journal table SCOTT.SYS_JOURNAL_15634 -- object_id
          
           SQL> begin
           2    if dbms_repair.online_index_clean(15634) then null;
           3    end if;
           4  end;
           5  /

          Bug 3805539: ORA-8106 AFTER FAILED ALTER INDEX REBUILD ONLINE, SMON SLOW IN CLEANING UP
          http://www.dbaglobe.com/2010/10/how-to-reslove-ora-08104-this-index.html

          FAL[server]: FAL archive blocked because of KCRR_LOCK_BUSY, will try later

          • служебное сообщение о блокировки записи в controlfile, определяемое установкой недефолтного значения параметра, например: log_archive_trace = 71
          • в primary alert.log может указывать на проблемы передачи логов на определённый log_archive_dest[ination], возникшие, например, из-за временных сетевых проблем. Soft workaround: после восстановления работоспособности standby рестартовать ARCH процессы на primary помощью kill -9:

          Killing archive process on primary instance will not cause any harm to your running instance. It will autoamatically start within seconds. This new arch process initates FAL server and FAL client to fill the GAP

          ORA-0311

          документ MOS DIAGNOSING ORA-3113 ERRORS [ID 1020463.6]

          Частный случай: Linux x86_64, Oracle 11.1.0.7, стабильная ошибка при выполнении конкретного запроса:

          SQL> SELECT empno,
          ...
          SELECT empno,
          *
          ERROR at line 1:
          ORA-03113: end-of-file on communication channel

          Core Dump-ов и записей в alert.log нет, SQL трейс показывает получение от пользовательской сессии сигнала ORA-01013 : user requested cancel of current operation

          ERROR #1:err=1013 tim=1332419144016887

          SQL*Net Client trace:

          nserror: nsres: id=0, op=68, ns=12535, ns2=12609; nt[0]=0, nt[1]=0, nt[2]=0; ora[0]=0, ora[1]=0, ora[2]=0
          nsrdr: error exit
          nsfull_pkt_rcv: nsctxrnk=0
          nsfull_pkt_rcv: error exit
          nioqrc:  wanted 1 got 0, type 0
          nioqper:  error from nioqrc
          nioqper:    ns main err code: 12535
          nioqper:    ns (2)  err code: 12609

          ORA-03113 TNS-12535 and TNS-12609 Errors Using TAF W Send/Recv Timeout Parameters [ID 782914.1] — причиной являются установленые в клиентском sqlnet.ora параметры:

          SQLNET.SEND_TIMEOUT
          SQLNET.RECV_TIMEOUT

          проявление ошибки зависит также от версии Oracle | SQL*Net Client — попробовать обновить

          ORA-12805: parallel query server died unexpectedly

          может вызываться Bug 7111619 PQ slaves may get stuck or abort, при этом PX slave на соседней ноде ожидает IPC send completion sync длительное время (до 300 секунд), workaround:

          SQL> alter system set parallel_force_local = true;

          How to Diagnose ORA-12805 Parallel Query Server Died Unexpectedly Error [ID 1348002.1]

          ORA-00932 для столбцов типа LONG

          SQL> select * from user_views where text like '%SSS%';
          select * from dba_views where text like '%SSS%'
          *
          ERROR at line 1:
          ORA-00932: inconsistent datatypes: expected NUMBER got LONG
          
          SQL> set serveroutput on
          SQL> BEGIN
          2       FOR r IN (SELECT * FROM user_views) LOOP
          3          IF lower(r.text) LIKE '%SSS%' THEN
          4             DBMS_OUTPUT.PUT_LINE(
          5                'view ' || r.view_name
          6                );
          7          END IF;
          8       END LOOP;
          9  END;
          10  /
          view MONITOR_VIEW1
          view MONITOR_VIEW2
          
          PL/SQL procedure successfully completed.

          , или так (более полное описание — working with long columns):

          SQL> select TO_LOB(high_value) from dba_tab_partitions where table_name = 'PART_TABLE'
            2  /
           
          select TO_LOB(high_value) from dba_tab_partitions where table_name = 'PART_TABLE'
           
          ORA-00932: inconsistent datatypes: expected - got LONG
          SQL> WITH xml AS (
            2          SELECT DBMS_XMLGEN.GETXMLTYPE(
            3                    'SELECT partition_name, high_value FROM dba_tab_partitions where table_name = ''PART_TABLE'''
            4                    ) AS xml
            5          FROM   dual
            6          )
            7  SELECT xs.partition_name
            8  ,      xs.high_value
            9  FROM   xml x
           10  ,      XMLTABLE('/ROWSET/ROW'
           11                  PASSING x.xml
           12                  COLUMNS partition_name   VARCHAR2(30) PATH 'PARTITION_NAME',
           13                          high_value       VARCHAR2(100) PATH 'HIGH_VALUE') xs
           14  WHERE xs.high_value = 21
           15  /
           
          PARTITION_NAME                 HIGH_VALUE
          ------------------------------ --------------------------------------------------------------------------------
          SYS_P943628                    21

          ORA-01089: immediate shutdown in progress — no operations are permitted при запросах через db link

          Bug 13724193 — ORA-1089 over database link [ID 13724193.8]: … для primary instance, кот.не был рестартован после преобразования из«open read only» standby

          аналогично для Active Standby системы:

          SQL> select version, open_mode from v$instance, v$database;
          
          VERSION           OPEN_MODE
           ----------------- --------------------
           11.2.0.3.0        READ ONLY WITH APPLY

          Workaround: primary instance | Active Standby restart

          ORA-01436: CONNECT BY loop in user data

          SQL> create table t1 as select 1 as c1, 1 as c2 from dual;
          
          Table created.
          
          SQL> select c2 from t1 CONNECT BY PRIOR c2 = c1 START WITH c1 = 1
            2  /
          ERROR:
          ORA-01436: CONNECT BY loop in user data
          
          no rows selected
          
          SQL> select c2, CONNECT_BY_ISCYCLE
            2    from t1
            3  CONNECT BY NOCYCLE PRIOR c2 = c1
            4   START WITH c1 = 1
            5  /
          
                  C2 CONNECT_BY_ISCYCLE
          ---------- ------------------
                   1                  1

          ORA-01156

          При попытке удалить standby redo log на physical standby:

          11.1.0.7@ SQL> alter database drop standby logfile group 20;
          
          alter database drop standby logfile group 20
          
          ORA-01156: recovery in progress may need access to files

          How to Drop/Rename Standby Redolog file in Oracle 11g

          ORA-01157: cannot identify/lock data file 101

          на любых запросах, использующих временные сегменты, при отсутствии временных файлов (101,102,…), например:

          SQL> select file_name from dba_temp_files;
          select file_name from dba_temp_files
                                *
          ERROR at line 1:
          ORA-01157: cannot identify/lock data file 101 - see DBWR trace file
          ORA-01110: data file 101: '+DATA'

          FUTEX_WAIT_PRIVATE

          наблюдались сессии, формально находятся состоянием On CPU / runqueue (v$session.state <> ‘WAITING’), процессы ОС:

          # strace -p 28174
          Process 28174 attached - interrupt to quit
          futex(0x3e3c354594, FUTEX_WAIT_PRIVATE, 2, NULL^C <unfinished ...>
          Process 28174 detached

          на MOS несколько платформозависимых багов Linux x86_64 Oracle 11.1.0.7 типа Bug 6918493 Net DCD (sqlnet.expire_time>0) can cause OS level mutex hang, possible to get PMON failed to acquired latch

          ORA-01031: недостаточно привилегий

          If you are not the owner of the table, then you need the DROP ANY TABLE privilege in order to use the drop_table_partition or truncate_table_partition clause — до 12.1 включительно

          11.2.0.3.@USER1 SQL> select * from user_tab_privs where table_name = 'T1';
          
          GRANTEE  OWNER  TABLE_NAME  GRANTOR  PRIVILEGE GRANTABLE HIERARCHY
          -------- ------ ----------- -------- --------- --------- ---------
          USER1    USER2  T1          USER2    ALTER     NO        NO
          
          11.2.0.3.@USER1 SQL> alter table USER2.T1 drop partition for (TO_DATE(' 2013-08-14 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN') - 1);
          
          alter table USER2.T1 drop partition for (TO_DATE(' 2013-08-14 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN') - 1)
          
          ORA-01031: insufficient privileges
          
          11.2.0.3.@SYS SQL> grant drop any table to USER1; -- Drop or truncate tables or table partitions in any schema
          
          Grant succeeded
          
          11.2.0.3.@USER1 SQL> alter table USER2.T1 drop partition for (TO_DATE(' 2013-08-14 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN') - 1);
          
          Table altered

          ORA-16000: database open for read-only access

          11.2, для запросов с Temporary table transformation — Bug 13847666 — ORA-16000 in read only database — superseded (Doc ID 13847666.8), есть патч, исправлен в версии 11.2.0.4

          Materialized View using a dblink from readonly standby database ->
          Create a Distributed Materialized View Based on a Master Table on a Read-Only Database (Doc ID 276023.1):

          create materialized view test1
             refresh complete
             as select s1.*
                from test@read-only-db s1 
          WHERE ROWNUM > 0 -- to make materialized view complex. This enables not to consider fast refresh and no registration at remote site
          /

          ORA-12838 / ORA-12839

          11.2.0.3.SCOTT@ SQL> create table t23 as select * from emp;
          
          Table created.
          
          SQL> alter session enable parallel dml;
          
          Session altered.
          
          SQL> delete /*+ PARALLEL */ from t23;
          
          14 rows deleted.
          
          SQL> insert into t23 select * from emp;
          insert into t23 select * from emp
          *
          ERROR at line 1:
          ORA-12838: cannot read/modify an object after modifying it in parallel
          
          
          SQL> rollback;
          
          Rollback complete.
          
          SQL> delete /*+ NO_PARALLEL */ from t23; -- после изменений в непараллельном режиме
          
          14 rows deleted.
          
          SQL> insert into t23 select * from emp;
          
          14 rows created.                         -- ошибки не возникает
          
          SQL> rollback;
          
          Rollback complete.
          
          SQL> delete /*+ NO_PARALLEL */ from t23;
          
          14 rows deleted.
          
          SQL> insert /*+ APPEND PARALLEL */ into t23 select * from emp;
          insert /*+ APPEND PARALLEL */ into t23 select * from emp
                                            *
          ERROR at line 1:                                                  -- , однако, невозможно выполнить PDML
          ORA-12839: cannot modify an object in parallel after modifying it
          
          
          SQL> insert /*+ APPEND NO_PARALLEL */ into t23 select * from emp;
          
          14 rows created.                                                  --, но допускается непараллельный direct path insert

          ORA-600 / ORA-7445

          ORA-07445 [kghbshrt]
          PMON failed to acquire latch, see PMON dump
          ORA-07445 [opiaba]
          ORA-00600 [kgh_heap_sizes:ds]
          ORA-00600 [17147]
          Instance terminated by PMON

          11.1.0.7 Linux x86_64, причина — запрос с большим кол-вом связанных переменных:

          ----- Current SQL Statement for this session (sql_id=fbd4nkwxragfd) -----
          DELETE /*+ PARALLEL */ FROM "ST"."CORE_STAT" WHERE ("FIELDDATE" = TO_DATE(:p1, 'YYYY-MM-DD HH24:MI:SS')) OR
          ...
          OR ("FIELDDATE" = TO_DATE(:p240776, 'YYYY-MM-DD HH24:MI:SS')) OR ("FIELDDATE" = TO_DATE(:p240777, 'YYYY-MM-DD HH24:MI:SS')) OR ("FIELDDATE" = TO_DATE(:p240778, 'YYYY-MM-DD HH24:MI:SS'))

          Instance crashed after ORA-7445 [opiaba] and ORA-600 [17147] [ID 1466343.1]

          ORA-600 [12869]

          $ sql
          
          SQL*Plus: Release 11.1.0.7.0 - Production on Wed Feb 26 11:56:53 2014
          
          Copyright (c) 1982, 2008, Oracle.  All rights reserved.
          
          Connected to:
          Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
          With the Partitioning, OLAP, Data Mining and Real Application Testing options
          
          SQL> select * from local_entity_attr
            2  /
          select * from local_entity_attr
                              *
          ERROR at line 1:
          ORA-00600: internal error code, arguments: [12869], [308614], [567942], [], [], [], [], [], [], [], [], []
          
          SQL> ANALYZE TABLE local_entity_attr partition(EA_P003) VALIDATE STRUCTURE CASCADE;
          ANALYZE TABLE local_entity_attr partition(EA_P003) VALIDATE STRUCTURE CASCADE
                              *
          ERROR at line 1:
          ORA-00600: internal error code, arguments: [12869], [308614], [567942], [], [], [], [], [], [], [], [], []

          Bug 11891554 : ORA-600 [12869], [220538], [223953] ON READ-ONLY PHYSICAL STANDBY DATABASE — всё как описано, 11.1.0.7, Linux x86-64, READ-ONLY STANDBY, лечится рестартом инстанса, в 11.2 не встречалось, предположительно, исправлено

          ORA-00600 [krr_read_lwn_part]

          MOS ID 1311095.1 — попытка накатить corrupted log file на стендбай

          ORA-00600 [17016]

          Наблюдалась после прерывания ALTER TABLE DROP UNUSED COLUMNS CHECKPOINT 1000 на партиционированной таблице в форме:

          11.2.0.4@ SQL> alter table my_table DROP COLUMNS CONTINUE CHECKPOINT 1000;
           
          alter table my_table DROP COLUMNS CONTINUE CHECKPOINT 1000
           
          ORA-00600: internal error code, arguments: [17016], [0x68F54BD70], [], [], [], [], [], [], [], [], [], []
           
          SQL> drop table my_table;
           
          drop table my_table
           
          ORA-00604: error occurred at recursive SQL level 1
          ORA-12986: columns in partially dropped state. Submit ALTER TABLE DROP COLUMNS CONTINUE

          Bug 13345070 : ALTER TABLE DROP COLUMN FAILS WITH ORA-600 [17016], под руководством поддержки лечится исправлением tab$.flags, для 11.2 есть патчи, исправлен в 12.1.0.2

          ORA-00600 [25027]

          Стабильно воспроизводилась на версии 11.2.0.2 при попытке вставки в конкретную партицию таблицы без LOB в виде:

          ORA-00600: internal error code, arguments: [25027], [3987], [0], [], [], [], [], [], [], [], [], []

          — где согласно ORA-600 [25027] (Doc ID 284433.1) [3987] — Tablespace Number в нашем случае связанный с номером проблемной партиции;
          при этом в alert.log накануне появления ошибок были отмечены проблемы ASM:

          ERROR: direct connection failure with ASM
          NOTE: Deferred communication with ASM instance
          Errors in file /opt/oracle/admin/diag/rdbms/orcl/orcl2/trace/orcl2_m002_12275.trc:
          ORA-15055: unable to connect to ASM instance
          ORA-00020: maximum number of processes (115) exceeded
          ORA-15055: unable to connect to ASM instance
          ORA-00020: maximum number of processes (115) exceeded
          ORA-17503: ksfdopn:2 Failed to open file +DATA/orcl/datafile/splog_2014_11_10.34660.863141129
          ORA-15055: unable to connect to ASM instance
          ORA-00020: maximum number of processes (115) exceeded
          ORA-01122: database file 120 failed verification check
          ORA-01110: data file 120: '+DATA/orcl/datafile/splog_2014_11_10.34660.863141129'
          ORA-01565: error in identifying file '+DATA/orcl/datafile/splog_2014_11_10.34660.863141129'
          ORA-17503: ksfdopn:2 Failed to open file +DATA/orcl/datafile/splog_2014_11_10.34660.863141129
          ORA-15055: unable to connect to ASM instance
          ORA-00020: maximum number of processes (115) exceeded
          NOTE: deferred map free for map id 2139183

          Проблема была решена пересозданием (+перезаливкой данных) партиции в табличном пространстве № [3987]

          ORA-08103: object no longer exists

          наблюдалось в READ ONLY standby версии 12.1.0.2, подобно Bug 8740993 ORA-1410 / ORA-8103 on ADG STANDBY during table scan after DROP/TRUNCATE/SHRINK in PRIMARY, пофикшеному в 11.2.0.2 Patch Set, с подобным же лечением методом flush shared_pool

          ORA-10237: simulate ^C (for testing purposes)

          How To Cancel A Query Running In Another Session

          ORA-04021: timeout occurred while waiting to lock object

          ORA-04021 is a timeout error that will be thrown if an objected cannot be locked after a certain period. The hiddner Parameter _kgl_time_to_wait_for_locks controls this period and it is set to 15 minutes by default

          SQL> @param_ _kgl_time_to_wait_for_locks
           
          NAME                         VALUE IS_DEF   IS_MOD     IS_ADJ   DSC
          ---------------------------- ----- -------- ---------- -------- -------------------------------------------------
          _kgl_time_to_wait_for_locks  15    TRUE     FALSE      FALSE    time to wait for locks and pins before timing out

          наблюдалось в версии 12.1.0.2:

          On demand
          MV SCO.MY_TROUBLE_MVIEW was not refreshed successfully.
          Number of MV refresh failures: 1.
          Encountered error ORA-12008.
          kkzifr3g: Encountered error ORA-12008.
          Thu Oct 19 14:22:04 2017
          Errors in file /opt/oracle/base/diag/rdbms/orcl/orcl/trace/orcl_j018_28936.trc:
          ORA-12012: ошибка при автоисполнении задания 82266
          ORA-12008: ошибка в пути обновления материализованного представления
          ORA-00913: слишком много значений
          ORA-00904: "F19"."SERVICES": недопустимый идентификатор
          ORA-06512: на  "SYS.DBMS_SNAPSHOT", line 2821
          ORA-06512: на  "SYS.DBMS_SNAPSHOT", line 3058
          ORA-06512: на  "SYS.DBMS_IREFRESH", line 687
          ORA-06512: на  "SYS.DBMS_REFRESH", line 195
          ORA-06512: на  line 1
          Thu Oct 19 14:22:34 2017
          
          12.1.0.2@ SQL> drop materialized view "SCO"."MY_TROUBLE_MVIEW" preserve table;
          drop materialized view "SCO"."MY_TROUBLE_MVIEW" preserve table
          *
          ERROR at line 1:
          ORA-04021: timeout occurred while waiting to lock object
          
          SQL> alter materialized view SCO.MY_TROUBLE_MVIEW compile
          /
          
          Materialized view altered.
          
          SQL> drop materialized view "SCO"."MY_TROUBLE_MVIEW" preserve table
          /
          
          Materialized view dropped.

          ORA-08176: consistent read failure; rollback data not available

          Bug 16438098 — ORA-8176 WHEN QUERYING TABLE VIA DATABASE LINK
          This was closed as «not a bug», but expected behavior. Basically, if an index is being created at the time the query is accessing the remote table and tries to access the new index, the the ora-8176 is signalled

          — например, при индексном доступе к interval partition table в момент добавления партиции

          ORA-14278: column type or size mismatch in EXCHANGE [SUB]PARTITION

          после Online Redefinition / DBMS_REDEFINITION using BY ROWID method:

          SQL> alter table MY_TEMP_FOR_EXCHANGE add M_ROW$$ varchar2(255);
          
          Table altered
          
          SQL> alter table MY_TEMP_FOR_EXCHANGE set unused column M_ROW$$;
          
          Table altered
          
          SQL> ALTER TABLE MY_TARGET_FOR_EXCHANGE EXCHANGE SUBPARTITION FOR ((TO_DATE('2017-11-24T00:00:00', 'YYYY-MM-DD"T"HH24:MI:SS')) , 16) WITH TABLE MY_TEMP_FOR_EXCHANGE INCLUDING INDEXES WITHOUT VALIDATION
            2  /
           
          Table altered

          ORA-14097 column type or size mismatch in ALTER TABLE EXCHANGE PARTITION

          Common Causes of ORA-14097 At Exchange Partition Operation (Doc ID 1418545.1)
          ORA-14097 At Exchange Partition After Adding Column With Default Value (Doc ID 1334763.1)

          ORA-12154: TNS:could not resolve the connect identifier specified

          Troubleshooting — Heartbeat failed to connect to standby (Doc ID 1432367.1):
          The given Connect Descriptor used for Log Transport Services cannot be resolved

          Verify if you modified the TNSNAMES.ORA since the Database ARCn and LNS-Processes started; they may not be aware of the Change. So you may have to kill those so that they get respawned again

          ARC and LGWR(TT) processes depending

          Oracle Linux: ORA-27301:OS Failure Message: No Buffer Space Available (Doc ID 2041723.1)

          ORA-23413: table … does not have a materialized view log

          SQL> select * FROM sys.slog$;
          
          no rows selected
          
          SQL> select * from dba_registered_mviews;
          
          no rows selected
          
          SQL> update MASTER_TABLE set ...
          
          1 row updated
          
          SQL> commit;
          
          ORA-23413: table MASTER_TABLE does not have a materialized view log
          
          SQL> CREATE MATERIALIZED VIEW LOG ON MASTER_TABLE ...
          
          Materialized view log created
          
          SQL> update MASTER_TABLE set ...
          
          1 row updated
          
          SQL> commit;
          
          ORA-12034: materialized view log on MASTER_TABLE younger than last refresh
          
          SQL> select count(*)
            2    from dba_mviews
            3   where refresh_method = 'FAST'
            4     and mview_name in
            5         (select name
            6            from dba_dependencies
            7           where referenced_name = 'MASTER_TABLE');
          
            COUNT(*)
          ----------
                   1

          ORA-00600: internal error code, arguments: [qcsfbdnp:1], [AWR_TOP_SQL], [], [0], [], [], [], [], [], [], [], []

          Кроме патча Bug 25515215 — ORA-600 [qcsfbdnp:1] during with clause statement (Doc ID 25515215.8) в качестве workaround-а можно отказаться от использования связанных переменных/binds в запросе: [AWR_TOP_SQL] -наименование первого bind-а

          ORA-942 error due to missing ora_debug_table… when trying events ‘trace[sql_compiler.*]

          SQL> CREATE GLOBAL TEMPORARY TABLE system.ora_debug_table (
            2     time DATE,
            3     txt0 VARCHAR2(4000),
            4     txt1 VARCHAR2(4000),
            5     txt2 VARCHAR2(4000),
            6     txt3 VARCHAR2(4000),
            7     txt4 VARCHAR2(4000),
            8     num0 NUMBER,
            9     num1 NUMBER,
           10     num2 NUMBER,
           11     num3 NUMBER,
           12     num4 NUMBER,
           13     num5 NUMBER,
           14     num6 NUMBER,
           15     num7 NUMBER,
           16     num8 NUMBER,
           17     num9 NUMBER
           18  );
          
          Table created
          
          SQL> CREATE PUBLIC SYNONYM ora_debug_table FOR system.ora_debug_table;
          
          Synonym created
          
          SQL> GRANT SELECT, INSERT,DELETE ON  system.ora_debug_table TO public;
          
          Grant succeeded

          — and the same workaround found by Chinar Aliyev. A reason why SQL Plan Baseline is not used

          ORA-28000: the account is locked on ADG/PHYSICAL STANDBY OPEN READ ONLY WITH APPLY

          C:>sqlplus TESTUSER/TESTUSER_PWD@PRIMARY_DB
          
          Last Successful login time: Thu Dec 26 2019 12:47:59 +03:00
          
          Connected to:
          Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
          
          C:>sqlplus TESTUSER/TESTUSER_PWD@STANDTBY_READ_ONLY
          
          ERROR:
          ORA-28000: the account is locked
          
          C:>sqlplus /@STANDTBY_READ_ONLY as sysdba
          
          Connected to:
          Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
          
          SQL> alter user TESTUSER account unlock;
          
          User altered.
          
          C:>sqlplus TESTUSER/TESTUSER_PWD@STANDTBY_READ_ONLY
          
          Last Successful login time: Thu Dec 26 2019 12:55:20 +03:00
          
          Connected to:
          Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
          

          Account locking in an Active Data Guard environment

          ORA-22992: cannot use LOB locators selected from remote tables

          SQL> insert into tmp_wr_contact_photo
            2    (contact_id, "CONTENT")
            3    select o.n_id as contact_id, p.fife as "CONTENT"
            4      from dw.tmp_contact_photo@vdc1w_dw_al_cl_if p
            5      join dw.tmp_office_contacts@vdc1w_dw_al_cl_if o
            6        on o.n_id_photo = p.n_id;
          insert into tmp_wr_contact_photo
          *
          ERROR at line 1:
          ORA-22992: cannot use LOB locators selected from remote tables
          
          SQL> insert into tmp_wr_contact_photo
            2    (contact_id, "CONTENT")
            3    select o.n_id as contact_id, p.fife as "CONTENT"
            4      from dw.tmp_contact_photo@vdc1w_dw_al_cl_if   p
            5          ,dw.tmp_office_contacts@vdc1w_dw_al_cl_if o
            6     where o.n_id_photo = p.n_id;
          
          1 row created.

          ORA-4031

          ORA-04031: unable to allocate 11056 bytes of shared memory («shared pool»,»unknown object»,»parameter handle»,»dbgdCopyEvent: eventSpec«)
          при попытке вызова PL/SQL over dblink to PHYSICAL STANDBY MOUNTED db (dbgd = DataBaseGuarD), не отражается в alert.log

          ORA-04031 On Dataguard Environment With High Allocation In ‘KRSDICLE’ (Doc ID 2233468.1)

          «The ‘KRSDICLE’ memory chunk is Data Guard specific and redo transport related . This issue was investigated in Bug 23722678 .., closed as not a bug.
          The cause for this behavior is that log_archive_dest_n are configured incorrectly . In this particular case, log_archive_dest_2 on the primary database had the same service defined as log_archive_dest_2 from the standby instance.»

          + all cascade redo transport/DG configuration

          Bug 32465193 — ORA-4031 Due to high SQL Monitoring allocations in Shared Pool (Doc ID 32465193.8)
           REDISCOVERY INFORMATION:
           Top 10 10 memory uses for SGA heap will show keomg allocations as a top user
           e.g.
           ----------------------------------------------
           "keomg: entry list            0001"   552 MB 16%
          ==============================================
          TOP 10 MEMORY USES FOR SGA HEAP SUB POOL 4
          ----------------------------------------------
          "free memory                    "  1503 MB 24%
          "keomg: entry list          0001"   948 MB 15% -- *
          "SQLA                       0003"   909 MB 15%
          "KGLH0                      0003"   470 MB  8%
          "gcs resources              0001"   365 MB  6%
          "init_heap_kfsg             0001"   312 MB  5%
          "gcs dynamic resources for  0001"   260 MB  4%
          "gcs shadows                0001"   199 MB  3%
          "SQLA                       0001"   120 MB  2%
          "KGLHD                      0003"   106 MB  2%
               -----------------------------------------
          free memory                        1503 MB
          memory alloc.                      4641 MB
          Sub total                          6144 MB
          ==============================================
          TOP 10 MAXIMUM MEMORY USES FOR SGA HEAP SUB POOL 4
          ----------------------------------------------
          "free memory                    "  3526 MB
          "SQLA                       0003"  1328 MB
          "keomg: entry list          0001"   948 MB     -- *
          ...
          ==============================================
          TOP 20 MEMORY USES ACROSS SGA HEAP 1 - 7
          ----------------------------------------------
          "free memory                    "  8603 MB 24%
          "SQLA                       0003"  8460 MB 24%
          "KGLH0                      0003"  3664 MB 10%
          "gcs resources              0001"  2552 MB  7%
          "gcs dynamic resources for  0001"  1576 MB  4%
          "gcs shadows                0001"  1392 MB  4%
          "KGLHD                      0003"   962 MB  3%
          "keomg: entry list          0001"   948 MB  3% -- *

          ORA-14552: cannot perform a DDL, commit or rollback inside a query or DML

          SQL> @inst
          
          INST_ID VERSION_FULL  PLATFORM_NAME        DATABASE_STATUS DATABASE_ROLE    STATUS   OPEN_MODE
          ------- ------------- -------------------- --------------- ---------------- -------- ----------
          1       19.10.0.0.0   Linux x86 64-bit     ACTIVE          PHYSICAL STANDBY OPEN     READ ONLY 
                                                                                               WITH APPLY
          
          2*      19.10.0.0.0   Linux x86 64-bit     ACTIVE          PHYSICAL STANDBY OPEN     READ ONLY 
                                                                                               WITH APPLY
          
          SQL> select /*+ monitor */ dummy from dual;
          
          D
          -
          X
          
          SQL> @sql
          
          SQL_ID             CHILD SQL_TEXT
          ------------- ---------- ------------------------------------------------------------
          fduq1uac6fhxy          0 select /*+ monitor */ dummy from dual
          
          SQL> select DBMS_SQLTUNE.REPORT_SQL_MONITOR(sql_id =>'fduq1uac6fhxy', report_level=>'all', type=>'text') SQL_Report from dual;
          ERROR:
          ORA-14552: cannot perform a DDL, commit or rollback inside a query or DML
          ORA-06512: at "SYS.DBMS_SQLTUNE_UTIL1", line 1117
          ORA-06512: at "SYS.DBMS_SQLTUNE", line 13808
          ORA-06512: at "SYS.DBMS_SQLTUNE", line 19020
          ORA-06512: at "SYS.DBMS_SQLTUNE", line 19351
          ORA-06512: at line 1
          
          SQL> alter session set "_parallel_syspls_obey_force" = FALSE;
          
          Session altered.
          
          SQL> select DBMS_SQLTUNE.REPORT_SQL_MONITOR(sql_id =>'fduq1uac6fhxy', report_level=>'all', type=>'text') SQL_Report from dual;
          
          SQL_REPORT
          --------------------------------------------------------------------------------
          SQL Monitoring Report
          
          SQL Text
          ------------------------------
          select /*+ monitor */ dummy from dual
          ...

          ORA-31186: Документ содержит чрезмерное число узлов

          Xml Operations Give ORA-31186: Document Contains Too Many Nodes (Doc ID 2344551.1)
          CAUSE
          This is expected behavior as the limit for XOB has been reached.
          There cannot be more than 64K nodes underneath a given node. 
          
          SOLUTION
          Please enable event="31153 trace name context forever, level 4096" in init.ora.
          
          This event will boost the XSLT engine's node stack sizing
          Since XSLT engine instances are cached in memory, this needs to be as a database-wide INIT.ORA setting, e.g.
          event="31153 trace name context forever, level 1000"
          
          Note that the parameter level value (1000 in the above example) is *not a hexadecimal bit flag*. It is a numeric size. Sizing for the node stack is in units of 1024 nodes, so the above example is a stack of approximately 1 million nodes. The upper limit is 4096 units, or a total of approximately 4 million nodes.
          

          TBD

          Понравилась статья? Поделить с друзьями:

          Читайте также:

        • Ошибка p0011 ниссан патрол y62
        • Ошибка oracle 12560
        • Ошибка p0011 ниссан ноут
        • Ошибка p0011 ниссан мурано z51
        • Ошибка p0011 мазда

        • 0 0 голоса
          Рейтинг статьи
          Подписаться
          Уведомить о
          guest

          0 комментариев
          Старые
          Новые Популярные
          Межтекстовые Отзывы
          Посмотреть все комментарии