oracle_errors
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| oracle_errors [2018/12/06 21:05] – created 91.177.234.129 | oracle_errors [2024/06/28 13:36] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Oracle_errors ====== | + | ==== ORA-00060: Deadlock detected. See Note 60.1 at My Oracle Support for Troubleshooting ORA-60 Errors |
| + | * Reference: [[htps:// | ||
| + | Using this document shows the most common causes of deadlock and how to identify them. | ||
| - | =====ORA-00600===== | + | ==== ORA-00600 ==== |
| - | [[https:// | + | |
| - | =====ORA-19051: | + | * [[https:// |
| + | |||
| + | ==== ORA-07445: exception encountered: | ||
| + | An ORA-0600 error is a ' | ||
| + | |||
| + | When a 7445 error occurs, there will always be a core dump. Check the alertlog for the trace files. | ||
| + | < | ||
| + | 2021-05-01T14: | ||
| + | Exception [type: SIGSEGV, Address not mapped to object] [ADDR: | ||
| + | Errors in file / | ||
| + | ORA-07445: exception encountered: | ||
| + | Incident details in: / | ||
| + | </ | ||
| + | Use adrci to package up the problem. | ||
| + | |||
| + | Also use stackx to grab a stack trace from the core dump file and send that to Oracle as well. [[https:// | ||
| + | |||
| + | ===== Solution ===== | ||
| + | Dumps did not provide a clear answer but Oracle suggest disabling the SQL Tuning Advisor | ||
| + | < | ||
| + | select client_name, | ||
| + | |||
| + | | ||
| + | ------------------------------- | ||
| + | auto optimizer stats collection | ||
| + | auto space advisor | ||
| + | sql tuning advisor | ||
| + | </ | ||
| + | < | ||
| + | begin | ||
| + | dbms_auto_task_admin.disable ( client_name => 'sql stats advisor' | ||
| + | , operation | ||
| + | , window_name => null | ||
| + | ); | ||
| + | end; | ||
| + | / | ||
| + | </ | ||
| + | or this should work also | ||
| + | < | ||
| + | exec dbms_stats.set_global_prefs(' | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | select client_name, | ||
| + | |||
| + | | ||
| + | ------------------------------- | ||
| + | auto optimizer stats collection | ||
| + | auto space advisor | ||
| + | sql tuning advisor | ||
| + | </ | ||
| + | |||
| + | ==== ORA-01422: exact fetch returns more than requested number of rows in EM Cloud control GUI ==== | ||
| + | Updating Monitoring Configuration to changing database monitoring credentials via GUI fails with ORA-1422 | ||
| + | * Cause | ||
| + | Target was in not promoted | ||
| + | < | ||
| + | SET echo on | ||
| + | SELECT chld.target_name, | ||
| + | FROM em_targets prnt, | ||
| + | mgmt_assoc_instances inst, | ||
| + | mgmt_assoc_type_extends ext, | ||
| + | mgmt_targets agt, | ||
| + | mgmt_targets chld | ||
| + | WHERE prnt.target_guid = inst.source_me_guid | ||
| + | AND inst.dest_me_guid = chld.target_guid | ||
| + | AND inst.assoc_type = ext.assoc_type | ||
| + | AND ext.extended_assoc_type = ' | ||
| + | AND agt.emd_url = prnt.emd_url | ||
| + | AND agt.target_type = ' | ||
| + | GROUP BY chld.target_name, | ||
| + | order by chld.target_name; | ||
| + | </ | ||
| + | * Solution | ||
| + | Remove the duplicate target which was not promoted. | ||
| + | |||
| + | Go to Setup -> Add Target -> Auto discover results -> Targets on Hosts () tab -> Look for the target and delete or ignore it. | ||
| + | ==== ORA-29280: invalid directory object ==== | ||
| + | A dba directory has been setup and read,write permissions granted on it to a user, the oracle user has the correct permissions at Unix level and still there are errors. | ||
| + | < | ||
| + | set serveroutput on | ||
| + | declare | ||
| + | l_file utl_file.file_type; | ||
| + | begin | ||
| + | l_file := utl_file.fopen (' | ||
| + | utl_file.put_line (l_file, ' | ||
| + | utl_file.fclose (l_file); | ||
| + | end; | ||
| + | </ | ||
| + | < | ||
| + | declare | ||
| + | * | ||
| + | ERROR at line 1: | ||
| + | ORA-29283: invalid file operation: cannot open file [29435] | ||
| + | ORA-06512: at " | ||
| + | ORA-06512: at " | ||
| + | ORA-06512: at line 4 | ||
| + | </ | ||
| + | If users will be accessing the directory over tns, the listener needs to be restarted (reloading is not good enough) to pick up the new directory and its grants! | ||
| + | |||
| + | There is an asktom thread about it here [[https:// | ||
| + | |||
| + | ==== exec(): 0509-036 Cannot load program sqlplus because of the following errors: ==== | ||
| + | < | ||
| + | exec(): 0509-036 Cannot load program sqlplus because of the following errors: | ||
| + | rtld: 0712-001 Symbol CreateIoCompletionPort was referenced | ||
| + | from module / | ||
| + | of the symbol was not found. | ||
| + | rtld: 0712-001 Symbol GetMultipleCompletionStatus was referenced | ||
| + | from module / | ||
| + | of the symbol was not found. | ||
| + | rtld: 0712-002 fatal error: exiting. | ||
| + | </ | ||
| + | === Cause === | ||
| + | This is caused by the I/O Completion Ports being set to " | ||
| + | |||
| + | === Solution === | ||
| + | * https:// | ||
| + | To check if the IOCP module is enabled, run the lsdev command: | ||
| + | < | ||
| + | $ lsdev | grep iocp | ||
| + | </ | ||
| + | |||
| + | The following sample output shows the IOCP status is set to Defined and hence not enabled: | ||
| + | < | ||
| + | |||
| + | iocp0 Defined I/O Completion Ports | ||
| + | </ | ||
| + | |||
| + | By default, IOCP is set to Defined. To enable IOCP, set IOCP to Available using the following procedure: | ||
| + | |||
| + | Log in as root and run the following command: | ||
| + | < | ||
| + | |||
| + | # smitty iocp | ||
| + | </ | ||
| + | |||
| + | Select Change / Show Characteristics of I/O Completion Ports. | ||
| + | Change configured state at system restart from Defined to Available. | ||
| + | Run the lsdev command to confirm the IOCP status is set to Available: | ||
| + | |||
| + | < | ||
| + | $ lsdev | grep iocp | ||
| + | |||
| + | iocp0 Available I/O Completion Ports | ||
| + | </ | ||
| + | |||
| + | Restart the system to make the changes permanent | ||
| + | |||
| + | |||
| + | ==== Autotask not running gather_stats on some databases ==== | ||
| + | ref: [[https:// | ||
| + | === Problem: === | ||
| + | No errors shown anywhere but running a query to see last_analysed date shows nothing being done recently. | ||
| + | < | ||
| + | select count(' | ||
| + | / | ||
| + | </ | ||
| + | < | ||
| + | COUNT(' | ||
| + | ---------- --------------------------- | ||
| + | 146 | ||
| + | 1 08-FEB-21 00:00:00 | ||
| + | 1 31-AUG-20 00:00:00 | ||
| + | 2 28-AUG-20 00:00:00 | ||
| + | 1 26-AUG-20 00:00:00 | ||
| + | 1 25-AUG-20 00:00:00 | ||
| + | 5 04-JUL-20 00:00:00 | ||
| + | 2 03-JUL-20 00:00:00 | ||
| + | 670 14-JUN-20 00:00:00 | ||
| + | 15 12-JUN-20 00:00:00 | ||
| + | 5 10-JUN-20 00:00:00 | ||
| + | 1 08-JUN-20 00:00:00 | ||
| + | </ | ||
| + | So something happened in June to stop the stats from being gathered. | ||
| + | |||
| + | There is a whole host of things to check: | ||
| + | * maintenance window definitions | ||
| + | * maintenance window schedules | ||
| + | * whether the autotask jobs are enabled | ||
| + | * whether the autotask jobs are enabled in the window | ||
| + | Checked all of these and everything was ok. | ||
| + | |||
| + | Turned out to be the job_queue_processes database parameter. It was set too low so there was simply no processes available within the window to allow the 'auto optimizer stats collection' | ||
| + | |||
| + | === Solution: === | ||
| + | Tune the job_queue_processes parameter. It should be set to the lower of these 2 values | ||
| + | < | ||
| + | select c.value*20 based_on_cpu, | ||
| + | / | ||
| + | </ | ||
| + | < | ||
| + | alter system set job_queue_processes = 387 scope=both; | ||
| + | |||
| + | System altered. | ||
| + | |||
| + | </ | ||
| + | |||
| + | ==== EMD upload error: uploadXMLFiles skipped :: OMS version not checked yet ==== | ||
| + | Error when uploading from an agent | ||
| + | < | ||
| + | emctl upload agent | ||
| + | |||
| + | Oracle Enterprise Manager Cloud Control 13c Release 5 | ||
| + | Copyright (c) 1996, 2021 Oracle Corporation. | ||
| + | --------------------------------------------------------------- | ||
| + | EMD upload error: uploadXMLFiles skipped :: OMS version not checked yet. If this issue persists check trace files for ping to OMS related errors. | ||
| + | </ | ||
| + | |||
| + | Solution | ||
| + | < | ||
| + | emctl stop agent | ||
| + | emctl unsecure agent | ||
| + | emctl secure agent | ||
| + | emctl clearstate agent | ||
| + | </ | ||
| + | |||
| + | Try again | ||
| + | < | ||
| + | emctl upload agent | ||
| + | |||
| + | Oracle Enterprise Manager Cloud Control 13c Release 5 | ||
| + | Copyright (c) 1996, 2021 Oracle Corporation. | ||
| + | --------------------------------------------------------------- | ||
| + | EMD upload completed successfully | ||
| + | </ | ||
| + | |||
| + | Good explanation of possible causes in MOS document [[https:// | ||
| + | < | ||
| + | Fatal NI connect error 12537, connecting to: | ||
| + | | ||
| + | |||
| + | VERSION INFORMATION: | ||
| + | TNS for IBM/AIX RISC System/ | ||
| + | TCP/IP NT Protocol Adapter for IBM/AIX RISC System/ | ||
| + | Oracle Bequeath NT Protocol Adapter for IBM/AIX RISC System/ | ||
| + | Time: 21-APR-2021 06:17:44 | ||
| + | Tracing not turned on. | ||
| + | Tns error struct: | ||
| + | ns main err code: 12537 | ||
| + | |||
| + | TNS-12537: TNS: | ||
| + | ns secondary err code: 12560 | ||
| + | nt main err code: 0 | ||
| + | nt secondary err code: 0 | ||
| + | nt OS err code: 0 | ||
| + | Wed Apr 21 06:17:44 2021 | ||
| + | opiodr aborting process unknown ospid (65536354) as a result of ORA-609 | ||
| + | </ | ||
| + | |||
| + | ==== runInstaller fails with " | ||
| + | < | ||
| + | [WARNING] [INS-13001] Oracle Database is not supported on this operating system. Installer will not perform prerequisite checks on the system. | ||
| + | CAUSE: This operating system may not have been in the certified list at the time of the release of this software. | ||
| + | ACTION: Refer to My Oracle Support portal for the latest certification information for this operating system. Proceed with the installation if the operating system has been certified after the release of this software. | ||
| + | [WARNING] [INS-32056] The specified Oracle Base contains the existing Central Inventory location: / | ||
| + | ACTION: Oracle recommends that the Central Inventory location is outside the Oracle Base directory. Specify a different location for the Oracle Base. | ||
| + | [FATAL] [INS-30060] Check for group existence failed. | ||
| + | CAUSE: Unexpected error occurred while trying to check for group existence. | ||
| + | ACTION: Refer to the logs or contact Oracle Support Services. Note for advanced users: Launch the installer by passing the following flag ' | ||
| + | </ | ||
| + | According to Doc ID 2464358.1, this can be ignored (in this case) as we know 19.16 is certified on RedHat 6.1. | ||
| + | |||
| + | === Solution === | ||
| + | Add option ' | ||
| + | |||
| + | |||
| + | ==== dbca - [FATAL] [DBT-50000] Unable to check for available memory. ==== | ||
| + | dbca fails with this odd error before attempting to create the databae.\\ | ||
| + | < | ||
| + | ./dbca -silent -createDatabase | ||
| + | > -gdbname olmdb -sid olmdb -responseFile NO_VALUE | ||
| + | > | ||
| + | > -characterSet AL32UTF8 | ||
| + | > -sysPassword Welcome1 | ||
| + | > -systemPassword Welcome1 | ||
| + | > -createAsContainerDatabase true \ | ||
| + | > -pdbAdminPassword Welcome1 | ||
| + | > -databaseType MULTIPURPOSE | ||
| + | > -datafileDestination "/ | ||
| + | > -memoryMgmtType auto_sga | ||
| + | > -totalMemory 2000 \ | ||
| + | > -storageType FS \ | ||
| + | > -datafileDestination "/ | ||
| + | > -redoLogFileSize 50 \ | ||
| + | > -emConfiguration NONE \ | ||
| + | > -ignorePreReqs | ||
| + | [FATAL] [DBT-50000] Unable to check for available memory. | ||
| + | [FATAL] [DBT-50001] Unable to check the value of kernel parameter {0} | ||
| + | </ | ||
| + | === Solution === | ||
| + | Enable x11-forwarding and to mount /tmp in exec mode, this normally in noexec (otherwise you will get an error in dbca when reading the memory of the server) | ||
| + | or export TMP to a directory that has exec privilege. | ||
| + | |||
| + | ==== trace directory contains very large .trc files containing SQL*Loader (sqlldr) AWR data ==== | ||
| + | Trace file contains a file of almost 7Gb | ||
| + | < | ||
| + | -rw-rw---- | ||
| + | -rw-rw---- | ||
| + | -rw-rw---- | ||
| + | -rw-r----- | ||
| + | -rw-rw---- | ||
| + | -rw-rw---- | ||
| + | -rw-r----- | ||
| + | -rw-r----- | ||
| + | drwxr-xr-x | ||
| + | -rw-r----- | ||
| + | -rw-r----- | ||
| + | -rw-rw-r-- | ||
| + | </ | ||
| + | The AWR collection background process mmnl created this trace file. | ||
| + | |||
| + | Checking on the filesystem we can see the process is not running for this database | ||
| + | < | ||
| + | ps -ef|grep " | ||
| + | </ | ||
| + | Check when the last AWR snapshots were created (default is every hour) | ||
| + | < | ||
| + | col instance_number | ||
| + | col startup_time | ||
| + | col begin_interval_time format a15 heading 'Begin snap' | ||
| + | col end_interval_time | ||
| + | col flush_elapsed | ||
| + | col error_count | ||
| + | |||
| + | select * | ||
| + | from | ||
| + | ( | ||
| + | select instance_number | ||
| + | , startup_time | ||
| + | , begin_interval_time | ||
| + | , end_interval_time | ||
| + | , flush_elapsed | ||
| + | , error_count | ||
| + | from | ||
| + | order by begin_interval_time desc | ||
| + | ) | ||
| + | where rownum < 5 | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | According to "MMNL Background Process Creates Large Trace Files Containing ASH Information (Doc ID 1952274.1)" | ||
| + | |||
| + | Leading to "AWR Snapshots Are Not Being Created Because MMON Is Not Being Respawned (Doc ID 2023652.1)", | ||
| + | < | ||
| + | alter system enable restricted session; | ||
| + | alter system disable restricted session; | ||
| + | </ | ||
| + | If this fails to restart the process, then an instance restart should do it. | ||
| + | |||
| + | ==== ORA-19051: Cannot use fast path insert for this XMLType table ==== | ||
| Think LD_LIBRARY_PATH on Linux or LIBPATH on AIX. | Think LD_LIBRARY_PATH on Linux or LIBPATH on AIX. | ||
| - | < | + | < |
| - | ====Problem==== | + | Export: Release 11.2.0.4.0 - Production on Thu Jun 1 06:41:55 2017 |
| + | |||
| + | Copyright (c) 1982, 2011, Oracle and/or its affiliates. | ||
| + | |||
| + | Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production | ||
| + | With the Partitioning, | ||
| + | Starting " | ||
| + | Estimate in progress using BLOCKS method... | ||
| + | Processing object type TABLE_EXPORT/ | ||
| + | Total estimation using BLOCKS method: 64.08 GB | ||
| + | ORA-39126: Worker unexpected fatal error in KUPW$WORKER.FETCH_XML_OBJECTS [[]] | ||
| + | ORA-19051: Cannot use fast path insert for this XMLType table | ||
| + | |||
| + | ORA-06512: at " | ||
| + | ORA-06512: at " | ||
| + | </ | ||
| + | === Problem === | ||
| When the 11g DB was started, LD_LIBRARY_PATH and LIBPATH were still pointing to paths in the 10g Home. | When the 11g DB was started, LD_LIBRARY_PATH and LIBPATH were still pointing to paths in the 10g Home. | ||
| - | ====Solution==== | + | === Solution === |
| There may have been some odd values setup in LD_LIBRARY_PATH before the call to oraenv (if oraenv was indeed called!) | There may have been some odd values setup in LD_LIBRARY_PATH before the call to oraenv (if oraenv was indeed called!) | ||
| - | < | + | < |
| + | unset LD_LIBRARY_PATH LIBPATH | ||
| + | export ORACLE_SID=< | ||
| + | . oraenv | ||
| + | echo $LD_LIBRARY_PATH | ||
| + | echo $LIBPATH | ||
| + | </ | ||
| They should now be correct. | They should now be correct. | ||
| - | =====ORA-27092: | + | ==== ORA-39346: data loss in character set conversion for object TABLE_STATISTICS: |
| + | When importing data from a .dmp file using Data Pump, get these errors | ||
| + | < | ||
| + | ORA-39346: data loss in character set conversion for object TABLE_STATISTICS:"< | ||
| + | |||
| + | . . imported " | ||
| + | . . imported " | ||
| + | Processing object type SCHEMA_EXPORT/ | ||
| + | Processing object type SCHEMA_EXPORT/ | ||
| + | Processing object type SCHEMA_EXPORT/ | ||
| + | Processing object type SCHEMA_EXPORT/ | ||
| + | Processing object type SCHEMA_EXPORT/ | ||
| + | Processing object type SCHEMA_EXPORT/ | ||
| + | ORA-39346: data loss in character set conversion for object TABLE_STATISTICS:" | ||
| + | |||
| + | ORA-39346: data loss in character set conversion for object TABLE_STATISTICS:" | ||
| + | |||
| + | ORA-39346: data loss in character set conversion for object TABLE_STATISTICS:" | ||
| + | |||
| + | ORA-39346: data loss in character set conversion for object TABLE_STATISTICS:" | ||
| + | |||
| + | ORA-39346: data loss in character set conversion for object TABLE_STATISTICS:" | ||
| + | |||
| + | </ | ||
| + | === Solution === | ||
| + | < | ||
| + | exec dbms_stats.gather_table_stats ('< | ||
| + | |||
| + | exec dbms_stats.gather_table_stats(' | ||
| + | exec dbms_stats.gather_table_stats(' | ||
| + | exec dbms_stats.gather_table_stats(' | ||
| + | exec dbms_stats.gather_table_stats(' | ||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | ==== ORA-20247: EMD_URL is invalid: | ||
| + | When on the oms and attempting to add_target with an argfile, this cryptic error shows up | ||
| + | < | ||
| + | emcli argfile / | ||
| + | Error: Cannot save the target to the agent | ||
| + | ORA-20247: EMD_URL is invalid: | ||
| + | Error: Cannot save the target to the agent | ||
| + | ORA-20247: EMD_URL is invalid: | ||
| + | Error: Cannot save the target to the agent | ||
| + | ORA-20247: EMD_URL is invalid: | ||
| + | Error: Cannot save the target to the agent | ||
| + | ORA-20247: EMD_URL is invalid: | ||
| + | </ | ||
| + | Two things to check | ||
| + | * hostname is incorrect in the argfile. Does it have the domain on it? Is it a cluster name instead of a node name? | ||
| + | * was it a recent agent install or an upgrade? Check the host was added. From the host: | ||
| + | < | ||
| + | emctl secure agent | ||
| + | emctl status agent | ||
| + | </ | ||
| + | How many targets are monitored? Let's see what they are | ||
| + | < | ||
| + | emctl config agent listtargets | ||
| + | </ | ||
| + | If only the oracle_emd is mentioned and not the host, add it | ||
| + | < | ||
| + | emctl config agent addInternaltargets | ||
| + | emctl upload agent | ||
| + | emctl status agent | ||
| + | </ | ||
| + | Now go back to the oms server and add the targets again. Should work now. See also [[https:// | ||
| + | ==== ORA-27092: size of file exceeds file size limit of the process ==== | ||
| Think ulimit... | Think ulimit... | ||
| - | < | + | < |
| - | < | + | Cause: an attempt was made to open a file that exceeds the process' |
| - | Check the fs_size limit for this user in / | + | Action: increase the processes file size limit (ulimit) and retry |
| + | </ | ||
| + | < | ||
| + | truncate table pibadm.test_ph | ||
| + | * | ||
| + | Error at line 1 : | ||
| + | ORA-00604: error ocurred at recursive SQL level 1 | ||
| + | ORA-01116: error in opening database file 2 | ||
| + | ORA-01110: datafile 2 : '/ | ||
| + | ORA-27092: size of file exceeds file size limit of the process | ||
| + | Additional information: | ||
| + | Additional information: | ||
| + | </ | ||
| + | Check the fs_size limit for this user in / | ||
| Compare this with another user, say oracle. Probably -1 (unlimited) | Compare this with another user, say oracle. Probably -1 (unlimited) | ||
| - | =====SP2-1503: | + | ==== ORA-01157: cannot identify/ |
| + | After restore or duplicate database, TEMP tablespace gives errors | ||
| + | < | ||
| + | SQL> select * from dba_temp_files; | ||
| + | select * from dba_temp_files | ||
| + | * | ||
| + | ERROR at line 1: | ||
| + | ORA-01157: cannot identify/ | ||
| + | ORA-01110: data file 201: '/ | ||
| + | </ | ||
| + | But we can still select from v$tempfile | ||
| + | < | ||
| + | SQL> select file#,name from v$tempfile; | ||
| + | |||
| + | FILE# NAME | ||
| + | ---------- -------------------------------------------------------------------------------- | ||
| + | 1 / | ||
| + | |||
| + | </ | ||
| + | This entry can be removed from the controlfile as the file does not actually exist on disk | ||
| + | < | ||
| + | SQL> alter database tempfile '/ | ||
| + | |||
| + | Database altered. | ||
| + | |||
| + | SQL> select file#,name from v$tempfile; | ||
| + | |||
| + | no rows selected | ||
| + | </ | ||
| + | TEMP tablespace exists but has no tempfiles in it, add one | ||
| + | < | ||
| + | SQL> alter tablespace temp add tempfile '/ | ||
| + | |||
| + | Tablespace altered. | ||
| + | |||
| + | </ | ||
| + | |||
| + | ==== SP2-1503: Unable to initialize Oracle call interface ==== | ||
| When trying to login to the database via SQL*Plus, these messages a displayed | When trying to login to the database via SQL*Plus, these messages a displayed | ||
| - | < | + | < |
| - | Seems to be a problem unique to AIX (in this case).<br /> | + | hn5118 / |
| + | SP2-1503: Unable to initialize Oracle call interface | ||
| + | SP2-0152: ORACLE may not be functioning properly | ||
| + | </ | ||
| + | Seems to be a problem unique to AIX (in this case).\\ | ||
| Check to see what the LIBPATH variable is. It may still contain a path to an old ORACLE_HOME... | Check to see what the LIBPATH variable is. It may still contain a path to an old ORACLE_HOME... | ||
| - | < | + | < |
| + | hn5118 / | ||
| + | LIBPATH=/ | ||
| + | </ | ||
| Disco! Unset it and rerun. | Disco! Unset it and rerun. | ||
| - | < | + | < |
| + | hn5118 | ||
| - | =====UDE-31623: | + | hn5118 / |
| + | |||
| + | SQL*Plus: Release 12.1.0.2.0 Production on Wed Jul 12 17:17:54 2017 | ||
| + | |||
| + | Copyright (c) 1982, 2014, Oracle. | ||
| + | |||
| + | |||
| + | Connected to: | ||
| + | Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production | ||
| + | With the Partitioning, | ||
| + | |||
| + | SQL> | ||
| + | |||
| + | </ | ||
| + | |||
| + | ==== UDE-31623: operation generated ORACLE error 31623 ==== | ||
| When using Data pump, get following errors almost immediately: | When using Data pump, get following errors almost immediately: | ||
| - | < | + | < |
| - | **Solution 1:**<br /> | + | UDE-31623: operation generated ORACLE error 31623 |
| - | In one case, I simplified the parameter file that was used. Maybe related to Streams Pool size, who knows?!<br /> | + | ORA-31623: a job is not attached to this session via the specified handle |
| + | ORA-06512: at " | ||
| + | ORA-06512: at " | ||
| + | ORA-06512: at line 1 | ||
| + | </ | ||
| + | **Solution 1:**\\ | ||
| + | In one case, I simplified the parameter file that was used. Maybe related to Streams Pool size, who knows?!\\ | ||
| I removed these 2 lines and the export started working: | I removed these 2 lines and the export started working: | ||
| - | < | + | < |
| - | **Solution 2:**<br /> | + | compression_algorithm=medium |
| + | logtime=all | ||
| + | </ | ||
| + | **Solution 2:**\\ | ||
| There is a note about this on Metalink, 1080775.1 which suggests that Streams Pool Size needs setting. | There is a note about this on Metalink, 1080775.1 which suggests that Streams Pool Size needs setting. | ||
| - | < | + | < |
| + | For this DataPump error, you will need to configure the database with some Streams Pool. | ||
| + | |||
| + | Perform the following query to find out how much STREAMS_POOL_SIZE has been allocated | ||
| + | |||
| + | | ||
| + | ... | ||
| + | | ||
| + | |||
| + | Data Pump now uses Advanced Queuing (AQ) internally, so it can handle job stops/ | ||
| + | |||
| + | Manually set the STREAMS_POOL_SIZE (using ALTER SYSTEM or by changing the value in the the PFILE/ | ||
| + | |||
| + | Alternately, | ||
| + | </ | ||
| From Oracle Documentation | From Oracle Documentation | ||
| - | < | + | < |
| + | Setting the Size Of the Buffer Cache In a Streams Environment | ||
| + | |||
| + | Oracle Data Pump uses Streams functionality to communicate between processes. | ||
| + | If the SGA_TARGET initialization parameter is set, then the STREAMS_POOL_SIZE initialization parameter is automatically set to a reasonable value. | ||
| + | If the SGA_TARGET initialization parameter is not set and the STREAMS_POOL_SIZE initialization parameter is not defined, | ||
| + | then the size of the streams pool automatically defaults to 10% of the size of the shared pool. | ||
| + | |||
| + | When the streams pool is created, the required SGA memory is taken from memory allocated to the buffer cache, | ||
| + | reducing the size of the cache to less than what was specified by the DB_CACHE_SIZE initialization parameter. | ||
| + | This means that if the buffer cache was configured with only the minimal required SGA, then Data Pump operations may not work properly. | ||
| + | A minimum size of 10M is recommended for STREAMS_POOL_SIZE in order to ensure successful Data Pump operations. | ||
| + | </ | ||
| - | =====ORA-00020: | + | ==== ORA-00020: maximum number of processes (150) exceeded ==== |
| Check the current resource limits with: | Check the current resource limits with: | ||
| - | < | + | < |
| - | Unfortunately this limit cannot be increased without a restart.<br /> | + | set lines 300 |
| + | select * from v$resource_limit; | ||
| + | </ | ||
| + | Unfortunately this limit cannot be increased without a restart.\\ | ||
| It may be a necessary to increase the limit with | It may be a necessary to increase the limit with | ||
| - | < | + | < |
| - | followed by a shutdown/ | + | alter system set processes=500 scope=spfile; |
| - | Or it may be some user is running away with the limit.<br /> | + | </ |
| + | followed by a shutdown/ | ||
| + | Or it may be some user is running away with the limit.\\ | ||
| Check to see who is running what with: | Check to see who is running what with: | ||
| - | [[http:// | + | [[http:// |
| - | =====ORA-01555: | + | ==== ORA-01555: snapshot too old: rollback segment number nn with name " |
| - | * [[http:// | + | * [[http:// |
| - | <br /> | + | === Problem === |
| - | ====Problem==== | + | |
| A long running transaction has run out of space to store its read-consistent image | A long running transaction has run out of space to store its read-consistent image | ||
| - | ====Solution 1==== | + | === Solution 1 === |
| If it's a one-off, maybe leave it alone. It may have been a user leaving a session open overnight without committing or rolling back. | If it's a one-off, maybe leave it alone. It may have been a user leaving a session open overnight without committing or rolling back. | ||
| - | ====Solution 2==== | + | === Solution 2 === |
| Make sure there' | Make sure there' | ||
| - | ====Things to check==== | + | === Things to check === |
| How much undo did the biggest transaction take? | How much undo did the biggest transaction take? | ||
| What is the undo retention parameter set to? | What is the undo retention parameter set to? | ||
| - | < | + | < |
| + | set lines 200 | ||
| + | col name for a30 | ||
| + | col description for a50 | ||
| + | col value for a20 | ||
| + | col maxquerylen for 999999 | ||
| + | select p.name | ||
| + | , p.description | ||
| + | , p.value | ||
| + | , max(u.maxquerylen) maxquerylen | ||
| + | from | ||
| + | , v$undostat | ||
| + | where 1=1 | ||
| + | and p.name = ' | ||
| + | group by p.name | ||
| + | , p.description | ||
| + | , p.value; | ||
| + | </ | ||
| Set the retention to about 20% bigger than the maxquerylen. | Set the retention to about 20% bigger than the maxquerylen. | ||
| - | < | + | < |
| + | select 'alter system set undo_retention=' | ||
| + | </ | ||
| and set the undo retention guarantee (being aware of the consequences) | and set the undo retention guarantee (being aware of the consequences) | ||
| - | < | + | < |
| - | < | + | select tablespace_name |
| + | , retention | ||
| + | from | ||
| + | </ | ||
| + | < | ||
| + | alter tablespace & | ||
| + | </ | ||
| - | =====Optimise Oracle UNDO Parameters===== | + | ==== Optimise Oracle UNDO Parameters ==== |
| - | The ideal undo_retention would be enough to hold rollback for the longest transaction that happened so far (can't see into the future)<br /> | + | |
| - | So current undo_retention = current value of undo / (db_block_size * undo blocks per sec)<br /> | + | The ideal undo_retention would be enough to hold rollback for the longest transaction that happened so far (can't see into the future)\\ |
| - | * Undo Blocks per Second | + | So current undo_retention = current value of undo / (db_block_size * undo blocks per sec)\\ |
| - | < | + | * Undo Blocks per Second |
| + | < | ||
| + | SELECT MAX(undoblks/ | ||
| + | FROM | ||
| + | </ | ||
| Optimal Undo Retention | Optimal Undo Retention | ||
| - | < | + | < |
| - | * Calculate Needed UNDO Size for given Database Activity | + | col actual for 9999999999.99 heading " |
| - | < | + | col retent for 9999999999 |
| - | It might be that the Export still fails with ORA-01555 even though retention seems long enough.<br /> | + | col needed for 9999999999.99 heading " |
| - | Are you running an export with the flashback_time parameter? If so, the undo_retention should be longer than the total export running time!<br /> | + | |
| - | =====Check LOB undo retention===== | + | SELECT d.undo_size/ |
| - | The retention settings for LOBS is different for the rest of the database.<br /> | + | |
| - | When you change the UNDO_RETENTION parameter, the LOB segment’s retention value is NOT modified.<br /> | + | |
| - | If you query the RETENTION column of the DBA_LOBS view, you will notice the old UNDO_RETENTION value still remains after you have modified the UNDO_RETENTION parameter.<br /> | + | |
| - | < | + | FROM ( |
| - | < | + | |
| - | < | + | FROM v$datafile a, |
| + | | ||
| + | | ||
| + | WHERE c.contents = ' | ||
| + | AND c.status = ' | ||
| + | AND b.name = c.tablespace_name | ||
| + | AND a.ts# = b.ts# | ||
| + | ) d, | ||
| + | | ||
| + | | ||
| + | ( | ||
| + | | ||
| + | undo_block_per_sec | ||
| + | FROM v$undostat | ||
| + | ) g | ||
| + | WHERE e.name = ' | ||
| + | AND f.name = ' | ||
| + | / | ||
| + | </ | ||
| + | * Calculate Needed UNDO Size for given Database Activity | ||
| + | < | ||
| + | col actual for 9999999999.99 heading " | ||
| + | col retent for 9999999999 | ||
| + | col needed for 9999999999.99 heading " | ||
| + | |||
| + | SELECT d.undo_size/ | ||
| + | , to_number(SUBSTR(e.value, | ||
| + | , (TO_NUMBER(e.value) * TO_NUMBER(f.value) * | ||
| + | | ||
| + | FROM ( | ||
| + | | ||
| + | FROM v$datafile a, | ||
| + | v$tablespace b, | ||
| + | dba_tablespaces c | ||
| + | WHERE c.contents = ' | ||
| + | AND c.status = ' | ||
| + | AND b.name = c.tablespace_name | ||
| + | AND a.ts# = b.ts# | ||
| + | ) d, | ||
| + | v$parameter e, | ||
| + | | ||
| + | ( | ||
| + | | ||
| + | | ||
| + | FROM v$undostat | ||
| + | ) g | ||
| + | WHERE e.name = ' | ||
| + | AND f.name = ' | ||
| + | / | ||
| + | </ | ||
| + | It might be that the Export still fails with ORA-01555 even though retention seems long enough.\\ | ||
| + | Are you running an export with the flashback_time parameter? If so, the undo_retention should be longer than the total export running time!\\ | ||
| + | ==== Check LOB undo retention ==== | ||
| + | The retention settings for LOBS is different for the rest of the database.\\ | ||
| + | When you change the UNDO_RETENTION parameter, the LOB segment’s retention value is NOT modified.\\ | ||
| + | If you query the RETENTION column of the DBA_LOBS view, you will notice the old UNDO_RETENTION value still remains after you have modified the UNDO_RETENTION parameter.\\ | ||
| + | < | ||
| + | SQL> show parameter undo_ | ||
| + | |||
| + | NAME | ||
| + | ------------------------------------ ----------- ------------------------------ | ||
| + | undo_management | ||
| + | undo_retention | ||
| + | undo_tablespace | ||
| + | </ | ||
| + | < | ||
| + | SQL> desc SITEADMIN.AUDIT_LOG_MESSAGE | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | </ | ||
| + | < | ||
| + | set lines 300 | ||
| + | col column_name for a32 | ||
| + | select table_name, | ||
| + | |||
| + | TABLE_NAME | ||
| + | ------------------------- ------------------------------ ---------- ---------- | ||
| + | EMAIL_STORE | ||
| + | EMAIL_STORE_ATTACHEMENT | ||
| + | TRACKING | ||
| + | TRACKING | ||
| + | TRACKING | ||
| + | WISE_WMS_LOG | ||
| + | ATTACHMENT | ||
| + | PLAN_TABLE | ||
| + | AUDIT_LOG_MESSAGE | ||
| + | EXCEPTIONS | ||
| + | </ | ||
| To change the LOB segment’s RETENTION value to match the new UNDO_RETENTION value, do the following: | To change the LOB segment’s RETENTION value to match the new UNDO_RETENTION value, do the following: | ||
| - | < | + | < |
| - | By momentarily changing the LOB to use PCTVERSION and then back to RETENTION, the new value of UNDO_RETENTION will be used.<br /> | + | ALTER TABLE my_table MODIFY LOB (lob_column) (PCTVERSION 20); |
| + | ALTER TABLE my_table MODIFY LOB (lob_column) (RETENTION); | ||
| + | </ | ||
| + | By momentarily changing the LOB to use PCTVERSION and then back to RETENTION, the new value of UNDO_RETENTION will be used.\\ | ||
| You need to do this for all LOB segments that you intend to modify. | You need to do this for all LOB segments that you intend to modify. | ||
| - | < | + | < |
| + | select 'ALTER TABLE ' | ||
| + | |||
| + | select 'ALTER TABLE ' | ||
| + | </ | ||
| There is a table DBA_LOBS that displays information about all the LOB columns in the database, but it doesn' | There is a table DBA_LOBS that displays information about all the LOB columns in the database, but it doesn' | ||
| For example if you identify a segment named SYS_LOBidentifier$$ that is consuming space, you can find out what column of what table that LOB column maps to using the DBA_LOBS table: | For example if you identify a segment named SYS_LOBidentifier$$ that is consuming space, you can find out what column of what table that LOB column maps to using the DBA_LOBS table: | ||
| - | < | + | < |
| + | set lines 1000 | ||
| + | col owner for a20 | ||
| + | col table_name | ||
| + | col column_name for a32 | ||
| + | select owner | ||
| + | , table_name | ||
| + | , column_name | ||
| + | from | ||
| + | where 1=1 | ||
| + | and segment_name = ' | ||
| + | </ | ||
| - | ====The Undo Advisor PL/SQL Interface==== | + | === The Undo Advisor PL/SQL Interface === |
| - | You can activate the Undo Advisor by creating an undo advisor task through the advisor framework.<br /> | + | You can activate the Undo Advisor by creating an undo advisor task through the advisor framework.\\ |
| - | The following example creates an undo advisor task to evaluate the undo tablespace. The name of the advisor is 'Undo Advisor' | + | The following example creates an undo advisor task to evaluate the undo tablespace. The name of the advisor is 'Undo Advisor' |
| - | The analysis is based on Automatic Workload Repository snapshots, which you must specify by setting parameters START_SNAPSHOT and END_SNAPSHOT.<br /> | + | The analysis is based on Automatic Workload Repository snapshots, which you must specify by setting parameters START_SNAPSHOT and END_SNAPSHOT.\\ |
| In the following example, the START_SNAPSHOT is " | In the following example, the START_SNAPSHOT is " | ||
| - | < | + | < |
| - | After you have created the advisor task, you can view the output and recommendations in the Automatic Database Diagnostic Monitor in Enterprise Manager.<br /> | + | DECLARE |
| + | | ||
| + | | ||
| + | | ||
| + | BEGIN | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | END; | ||
| + | / | ||
| + | </ | ||
| + | After you have created the advisor task, you can view the output and recommendations in the Automatic Database Diagnostic Monitor in Enterprise Manager.\\ | ||
| This information is also available in the DBA_ADVISOR_* data dictionary views (DBA_ADVISOR_TASKS, | This information is also available in the DBA_ADVISOR_* data dictionary views (DBA_ADVISOR_TASKS, | ||
| - | ====References==== | + | === References === |
| - | * [[http:// | + | * [[http:// |
| - | * [[http:// | + | * [[http:// |
| - | * [[http:// | + | * [[http:// |
| - | =====Error 6 initializing SQL*Plus===== | + | ==== Error 6 initializing SQL*Plus ==== |
| - | Using sqlplus or rman under Cygwin, ORACLE_HOME still needs to be windows format!<br /> | + | Using sqlplus or rman under Cygwin, ORACLE_HOME still needs to be windows format!\\ |
| - | <code>27@@</ | + | <code> |
| + | Message file sp1<lang>.msb not found | ||
| + | SP2-0750 :You may need to set ORACLE_HOME to your Oracle software directory | ||
| + | </ | ||
| so... | so... | ||
| - | < | + | < |
| - | =====ORA-2002: | + | export ORACLE_SID=KITRYD |
| + | ORAENV_ASK=NO | ||
| + | . oraenv | ||
| + | [[ " | ||
| + | </ | ||
| + | ==== ORA-2002: error while writing to audit trail ==== | ||
| Check the space left in the audit tablespace with: | Check the space left in the audit tablespace with: | ||
| - | < | + | < |
| - | If plenty of space, it can be due to Oracle clearing out the recyclebin at the same time.<br /> | + | select sum(bytes)/ |
| + | </ | ||
| + | If plenty of space, it can be due to Oracle clearing out the recyclebin at the same time.\\ | ||
| If not, extend the datafile... | If not, extend the datafile... | ||
| - | < | + | < |
| + | select * from dba_data_files where tablespace_name =' | ||
| + | alter database datafile 6 resize 30G; | ||
| + | </ | ||
| If that is not possible, clean out some audit data or add a datafile. | If that is not possible, clean out some audit data or add a datafile. | ||
| - | =====ORA-00449: | + | ==== ORA-00449: background process ' |
| - | < | + | < |
| + | SQL> startup nomount pfile="/ | ||
| + | ORA-00449: background process ' | ||
| + | ORA-07446: sdnfy: bad value // for parameter . | ||
| + | SQL> exit | ||
| + | </ | ||
| **Solution** | **Solution** | ||
| - | < | + | < |
| + | SQL> mkdir / | ||
| + | </ | ||
| - | =====ORA-00845: | + | ==== ORA-00845: MEMORY_TARGET not supported on this system ==== |
| - | * Reference: [[http:// | + | * Reference: [[http:// |
| **Problem Description** | **Problem Description** | ||
| - | < | + | < |
| + | SQL> STARTUP | ||
| + | ORA-00845: MEMORY_TARGET not supported on this system | ||
| + | </ | ||
| **Cause** | **Cause** | ||
| - | * Starting from Oracle 11g the automatic memory management feature is now defined with parameter MEMORY_TARGET and MEMMORY_MAX_TARGET. | + | * Starting from Oracle 11g the automatic memory management feature is now defined with parameter MEMORY_TARGET and MEMMORY_MAX_TARGET. |
| - | * On linux file system the shared memory need to be mounted on /dev/shm directory on the operating system. | + | * On linux file system the shared memory need to be mounted on /dev/shm directory on the operating system. |
| - | * And the size of /dev/shm needs to be greater than MEMORY_TARGET or MEMMORY_MAX_TARGET. | + | * And the size of /dev/shm needs to be greater than MEMORY_TARGET or MEMMORY_MAX_TARGET. |
| - | * The AMM (Automatic Memory Management) now in 11g manages both SGA and PGA together by MMAN process. | + | * The AMM (Automatic Memory Management) now in 11g manages both SGA and PGA together by MMAN process. |
| - | * The MEMORY_TARGET parameter in 11g comes for (SGA_TARGET+PGA_AGGREGATE_TARGET) which was in 10g. | + | * The MEMORY_TARGET parameter in 11g comes for (SGA_TARGET+PGA_AGGREGATE_TARGET) which was in 10g. |
| - | * And MEMORY_MAX_TARGET parameter in 11g comes instead of SGA_MAX_TARGET parameter which was in 10g. | + | * And MEMORY_MAX_TARGET parameter in 11g comes instead of SGA_MAX_TARGET parameter which was in 10g. |
| - | * The ORA-00845: | + | * The ORA-00845: |
| 1)If the shared memory which is mapped to /dev/shm directory is less than the size of MEMORY_TARGET or MEMORY_MAX_TARGET or | 1)If the shared memory which is mapped to /dev/shm directory is less than the size of MEMORY_TARGET or MEMORY_MAX_TARGET or | ||
| 2)If the shared memory is not mapped to /dev/shm directory. | 2)If the shared memory is not mapped to /dev/shm directory. | ||
| **Solution** | **Solution** | ||
| - | < | + | < |
| + | Make sure /dev/shm is properly mounted. You can see it by, | ||
| + | - df -h or #df -k command. | ||
| + | The output should be similar to: | ||
| - | =====ORA-24247: | + | $ df -k |
| - | < | + | Filesystem |
| + | ... | ||
| + | shmfs | ||
| + | |||
| + | |||
| + | We see here for /dev/shm we have assigned 1G memory. Now if you set MEMORY_TARGET more than 1G then above ORA-845 will arise. For example if you have MEMORY_TARGET or MEMORY_MAX_TARGET set to 12G then you can mount shared memory to 13g like below. | ||
| + | As a root user, | ||
| + | - mount -t tmpfs shmfs -o size=13g /dev/shm | ||
| + | In order to make the settings persistence so that it will affect after restarting machine add an entry in /etc/fstab similar to the following: | ||
| + | |||
| + | shmfs /dev/shm tmpfs size=13g 0 | ||
| + | </ | ||
| + | |||
| + | ==== ORA-23515: materialized views and/or their indices exist in the tablespace ==== | ||
| + | While trying to drop a tablespace, this error is shown.\\ | ||
| + | Problem: | ||
| + | As the message suggests, you cannot drop a tablespace while it contains materialised views or their dependent objects.\\ | ||
| + | Solution: | ||
| + | Find view dependencies, | ||
| + | < | ||
| + | set pages 100 lines 1000 | ||
| + | col owner format a15; | ||
| + | col table_name format a45; | ||
| + | select t.owner | ||
| + | , t.table_name | ||
| + | from | ||
| + | , dba_indexes i | ||
| + | where i.index_type | ||
| + | and t.owner | ||
| + | and t.table_name | ||
| + | and t.tablespace_name = upper('& | ||
| + | / | ||
| + | </ | ||
| + | Materialised view indexes | ||
| + | < | ||
| + | select o.owner | ||
| + | , o.object_name index_name | ||
| + | , o.object_type object_type | ||
| + | , sq.mv_owner | ||
| + | , sq.mv_name | ||
| + | , sq.tablespace mv_tablespace | ||
| + | from | ||
| + | , ( | ||
| + | | ||
| + | , | ||
| + | , | ||
| + | , | ||
| + | | ||
| + | , | ||
| + | , | ||
| + | , | ||
| + | , | ||
| + | , | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | ) sq | ||
| + | where sq.obj# = o.object_id | ||
| + | order by 1,2,3 | ||
| + | / | ||
| + | </ | ||
| + | Materialised views | ||
| + | < | ||
| + | set pages 100 lines 1000 | ||
| + | col mv_owner | ||
| + | col mv_name | ||
| + | col tablespace | ||
| + | select s.sowner mv_owner | ||
| + | , s.tname | ||
| + | , p.name | ||
| + | from | ||
| + | , sys.tab$ t | ||
| + | , sys.user$ u | ||
| + | , sys.snap$ s | ||
| + | , sys.ts$ p | ||
| + | where t.ts# = p.ts# | ||
| + | and p.name | ||
| + | and t.obj# | ||
| + | and o.owner# = u.user# | ||
| + | and u.name | ||
| + | and o.name | ||
| + | order by 1,2 | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | ==== ORA-02429: cannot drop index used for enforcement of unique/ | ||
| + | Atempting to drop a tablespace but got this error message. It means that some tables have constraints used to enforce uniqueness. These have to be found and dropped/ | ||
| + | Of course the owning schema could also just be dropped with cascade option if this is part of the users request. | ||
| + | < | ||
| + | select 'ALTER TABLE ' | ||
| + | from | ||
| + | where (index_owner, | ||
| + | | ||
| + | | ||
| + | | ||
| + | ) | ||
| + | </ | ||
| + | < | ||
| + | ' | ||
| + | --------------------------------------------------------------------------------- | ||
| + | ALTER TABLE OWBSYS.CMPFCOSTORAGE DISABLE CONSTRAINT IDX_FCOELEMENTID_VER; | ||
| + | ALTER TABLE OWBSYS.CMPSCOCFGSTORAGE DISABLE CONSTRAINT IDX_SCOCFGELEMENTID_VER; | ||
| + | ALTER TABLE OWBSYS.CMPSCOSTORAGE DISABLE CONSTRAINT IDX_SCOELEMENTID_VER; | ||
| + | ALTER TABLE OWBSYS.CMPSCOMAPSTORAGE DISABLE CONSTRAINT IDX_SCOMAPELEMENTID_VER; | ||
| + | ALTER TABLE OWBSYS.CMPSCOPRPSTORAGE DISABLE CONSTRAINT IDX_SCOPRPELEMENTID_VER; | ||
| + | ALTER TABLE OWBSYS.CMPSYSSTORAGE DISABLE CONSTRAINT IDX_SYSELEMENTID_VER; | ||
| + | |||
| + | 6 rows selected. | ||
| + | |||
| + | </ | ||
| + | |||
| + | ==== ORA-24247: network access denied by access control list (ACL) ==== | ||
| + | < | ||
| + | Cause: No access control list (ACL) has been assigned to the target host or the privilege necessary to access the target host has not been granted to the user in the access control list. | ||
| + | |||
| + | Action: Ensure that an access control list (ACL) has been assigned to the target host and the privilege necessary to access the target host has been granted to the user. | ||
| + | </ | ||
| Your application will encounter an ORA-24247 error if it relies on one of the network packages and no proper ACL has been created. For the use of the following packages it is mandatory to have an ACL for the application user in place in 11g: | Your application will encounter an ORA-24247 error if it relies on one of the network packages and no proper ACL has been created. For the use of the following packages it is mandatory to have an ACL for the application user in place in 11g: | ||
| - | *UTL_TCP | + | |
| - | *UTL_SMTP | + | * UTL_SMTP |
| - | *UTL_MAIL | + | * UTL_MAIL |
| - | *UTL_HTTP | + | * UTL_HTTP |
| - | *UTL_INADDR | + | * UTL_INADDR |
| - | Here is a very good explanation of how to setup the necessary ACLs: [[http:// | + | Here is a very good explanation of how to setup the necessary ACLs: [[http:// |
| + | |||
| + | ==== ORA-00600: internal error code, arguments: [17114] ==== | ||
| + | < | ||
| + | ORA-00603: ORACLE server session terminated by fatal error | ||
| + | ORA-24557: error 600 encountered while handling error 600; exiting server process | ||
| + | ORA-00600 | ||
| + | |||
| + | ... | ||
| + | ********** Internal heap ERROR 17114 addr=1109c20f0 ********* | ||
| + | ... | ||
| + | |||
| + | |||
| + | |||
| + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| + | Error/ | ||
| + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| + | |||
| + | Error: ORA-00600 [17114] [0x1109C20F0] | ||
| + | |||
| + | Error Stack: ORA-600[17114]/ | ||
| + | Main Stack: | ||
| + | kgherror <- kghrcdepth <- kghrcdepth <- kghrcappl <- ksmdpg <- opidcl <- opidrv <- sou2o | ||
| + | <- opimai_real <- ssthrdmain <- main | ||
| + | </ | ||
| + | Opened SR 3-24837203691 at Oracle. It seems to be bug 18909196 related to the xml version of the alertlog (X$DBGALERTEXT). | ||
| + | |||
| + | Either apply patch 18909196 or " | ||
| + | ==== ORA-00600: internal error code, arguments: [kewrsp_split_partition_2], | ||
| + | Reference [https:// | ||
| - | =====ORA-00600: | + | ==== ORA-00600: internal error code, arguments: [[qmx: no ref]] ==== |
| Search " | Search " | ||
| - | ====Problem:==== | + | === Problem: === |
| - | Sometimes one or more of the following errors can be encountered when installing or upgrading XDB, configuring APEX, running an Export, or selecting from xdb.xdb$resource or sys.dba_network_acls: | + | Sometimes one or more of the following errors can be encountered when installing or upgrading XDB, configuring APEX, running an Export, or selecting from xdb.xdb$resource or sys.dba_network_acls: |
| - | * ORA-31159: XML DB is in an invalid state | + | * ORA-31159: XML DB is in an invalid state |
| - | * ORA-00600: internal error code, arguments: [[unable|to load XDB library]] | + | * ORA-00600: internal error code, arguments: [[unable to load XDB library]] |
| - | * ORA-00600: internal error code, arguments: [[qmx:|no ref]] | + | * ORA-00600: internal error code, arguments: [[qmx: no ref]] |
| - | * ORA-00600: internal error code, arguments: [[qmtGetColumnInfo1]] | + | * ORA-00600: internal error code, arguments: [[qmtGetColumnInfo1]] |
| - | * ORA-00600: internal error code, arguments: [[qmtb_init_len]] | + | * ORA-00600: internal error code, arguments: [[qmtb_init_len]] |
| - | * ORA-00600: internal error code, arguments: [[qmtGetBaseType]] | + | * ORA-00600: internal error code, arguments: [[qmtGetBaseType]] |
| - | * ORA-00600: internal error code, arguments: [[psdnop-1]], | + | * ORA-00600: internal error code, arguments: [[psdnop-1]], |
| - | * ORA-00600: internal error code, arguments: [[qmtInit1]] | + | * ORA-00600: internal error code, arguments: [[qmtInit1]] |
| - | * ORA-07445: exception encountered: | + | * ORA-07445: exception encountered: |
| - | * ORA-19051 Cannot Use Fast Path Insert For This XMLType Table | + | * ORA-19051 Cannot Use Fast Path Insert For This XMLType Table |
| - | * ORA-31011: XML parsing failed | + | * ORA-31011: XML parsing failed |
| - | Errors of this sort generally occur when the init routines for the internal XDB functions are run in an invalid environment causing memory corruption.<br /> | + | Errors of this sort generally occur when the init routines for the internal XDB functions are run in an invalid environment causing memory corruption.\\ |
| - | <br /> | + | |
| - | This can happen if the database was ever started with the LD_LIBRARY_PATH (LIBPATH for AIX or SHLIB_PATH for HP) pointing to the wrong $ORACLE_HOME/ | + | This can happen if the database was ever started with the LD_LIBRARY_PATH (LIBPATH for AIX or SHLIB_PATH for HP) pointing to the wrong $ORACLE_HOME/ |
| The LD_LIBRARY_PATH/ | The LD_LIBRARY_PATH/ | ||
| - | ====Solution: | + | === Solution: === |
| - | * Stop Listener | + | * Stop Listener |
| - | * Stop database | + | * Stop database |
| - | * Ensure $ORACLE_HOME/ | + | * Ensure $ORACLE_HOME/ |
| - | * If AIX, run / | + | * If AIX, run / |
| - | * Start database | + | * Start database |
| - | * Start listener | + | * Start listener |
| - | =====ORA-00201: | + | ==== ORA-00201: control file version nn.nn.nn.nn incompatible with ORACLE version ==== |
| - | Trying to restore a database after complete failure<br /> | + | Trying to restore a database after complete failure\\ |
| - | first step is to startup the database in nomount mode and restore the controlfile - succeeded.<br /> | + | first step is to startup the database in nomount mode and restore the controlfile - succeeded.\\ |
| second step, startup the database in mount mode ready for database restore... | second step, startup the database in mount mode ready for database restore... | ||
| - | < | + | < |
| - | The problem was there was no compatible parameter in the simple init file I used to start up the instance.<br /> | + | SQL*Plus: Release 10.2.0.3.0 - Production on Wed Aug 19 18:16:47 2015 |
| + | |||
| + | Copyright (c) 1982, 2006, Oracle. | ||
| + | |||
| + | |||
| + | Connected to: | ||
| + | Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production | ||
| + | With the Partitioning, | ||
| + | |||
| + | SYS@CODWHP1> startup mount | ||
| + | ORACLE instance started. | ||
| + | |||
| + | Total System Global Area 260046848 bytes | ||
| + | Fixed Size 2029296 bytes | ||
| + | Variable Size | ||
| + | Database Buffers | ||
| + | Redo Buffers | ||
| + | ORA-00201: control file version 10.2.0.0.0 incompatible with ORACLE version 10.2.0.3.0 | ||
| + | ORA-00202: control file: '/ | ||
| + | </ | ||
| + | The problem was there was no compatible parameter in the simple init file I used to start up the instance.\\ | ||
| Adding compatible parameter to init file to be same version (10.2.0.3) allowed the db to mount. | Adding compatible parameter to init file to be same version (10.2.0.3) allowed the db to mount. | ||
| - | =====TNS-00525: | + | |
| - | < | + | ==== ORA-12012: error on auto execute of job " |
| - | This would suggest the user attempting to start the listener has no access to either the Oracle binaries or the TNS listener/ | + | Following found in trace file from a autotask job run |
| - | But... checkout the / | + | < |
| - | That hidden gem shows who started the listener last time. Delete the relevant entry and try again!<br /> | + | ORA-12012: error on auto execute of job " |
| + | <error barrier> at 0xfffffffffff3758 placed jslv.c@1659 | ||
| + | ORA-20001: Statistics Advisor: Invalid task name for the current user | ||
| + | ORA-06512: at " | ||
| + | ORA-06512: at " | ||
| + | ORA-06512: at " | ||
| + | ORA-06512: at " | ||
| + | ORA-06512: at " | ||
| + | |||
| + | </ | ||
| + | See [[https:// | ||
| + | |||
| + | < | ||
| + | set lines 1000 | ||
| + | col name for a40 | ||
| + | col owner_name for a10 | ||
| + | select name | ||
| + | , ctime | ||
| + | , how_created | ||
| + | , owner_name | ||
| + | from | ||
| + | where name in (' | ||
| + | / | ||
| + | </ | ||
| + | If records are retrieved but not owned by SYS or not created by CMD then drop them first... | ||
| + | < | ||
| + | DECLARE | ||
| + | v_tname VARCHAR2(32767); | ||
| + | BEGIN | ||
| + | v_tname := ' | ||
| + | DBMS_STATS.DROP_ADVISOR_TASK(v_tname); | ||
| + | END; | ||
| + | / | ||
| + | |||
| + | DECLARE | ||
| + | v_tname VARCHAR2(32767); | ||
| + | BEGIN | ||
| + | v_tname := ' | ||
| + | DBMS_STATS.DROP_ADVISOR_TASK(v_tname); | ||
| + | END; | ||
| + | / | ||
| + | </ | ||
| + | If no rows retrieved or they have just been dropped, now recreate them | ||
| + | < | ||
| + | exec dbms_stats.init_package(); | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | ==== TNS-00525: Insufficient privilege for operation ==== | ||
| + | < | ||
| + | lsnrctl start LISTENER_UCLID55V | ||
| + | |||
| + | LSNRCTL for IBM/AIX RISC System/ | ||
| + | |||
| + | Copyright (c) 1991, 2011, Oracle. | ||
| + | |||
| + | Starting / | ||
| + | |||
| + | TNSLSNR for IBM/AIX RISC System/ | ||
| + | System parameter file is / | ||
| + | Log messages written to / | ||
| + | Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=150.251.114.238)(PORT=1525))) | ||
| + | Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1525))) | ||
| + | TNS-12555: TNS: | ||
| + | | ||
| + | TNS-00525: Insufficient privilege for operation | ||
| + | | ||
| + | |||
| + | Listener failed to start. See the error message(s) above... | ||
| + | </ | ||
| + | This would suggest the user attempting to start the listener has no access to either the Oracle binaries or the TNS listener/ | ||
| + | But... checkout the / | ||
| + | That hidden gem shows who started the listener last time. Delete the relevant entry and try again!\\ | ||
| To start from a clean sheet, stop all listeners, delete this directory and restart the listeners. | To start from a clean sheet, stop all listeners, delete this directory and restart the listeners. | ||
| - | =====ORA-12003: | + | ==== ORA-12537: TNS: |
| - | Here's one you shouldn' | + | < |
| + | 04-NOV-2019 10:37:53 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=devopse)(CID=(PROGRAM=sqlplus@hn5118)(HOST=hn5118)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.8.90.27)(PORT=35278)) * establish * devopse * 12518 | ||
| + | TNS-12518: TNS: | ||
| + | | ||
| + | TNS-12560: TNS: | ||
| + | | ||
| + | IBM/AIX RISC System/6000 Error: 32: Broken pipe | ||
| + | </ | ||
| + | Not the usual problems... listener log full, oracle executable without setuid bit set.\\ | ||
| + | This turned out to be not very relevant to the error message but...\\ | ||
| + | tnsnames.ora looked like this | ||
| + | < | ||
| + | DEVOPSE, | ||
| + | (DESCRIPTION = | ||
| + | (ADDRESS = (PROTOCOL = TCP)(HOST = hn511)(PORT = 3531)) | ||
| + | (CONNECT_DATA = | ||
| + | (SERVER = DEDICATED) | ||
| + | (SERVICE_NAME = devopse) | ||
| + | ) | ||
| + | ) | ||
| + | </ | ||
| + | and database parameters looked like this | ||
| + | < | ||
| + | SQL> show parameter service | ||
| + | |||
| + | NAME | ||
| + | ------------------------------------ ----------- ------------------------------ | ||
| + | service_names | ||
| + | |||
| + | SQL> show parameter domain | ||
| + | |||
| + | NAME | ||
| + | ------------------------------------ ----------- ------------------------------ | ||
| + | db_domain | ||
| + | </ | ||
| + | The database registers dynamically so there is nothing in the listener.ora other than the listener definition itself.\\ | ||
| + | This should work! I have no idea why it doesn' | ||
| + | < | ||
| + | SQL> alter system set db_domain=' | ||
| + | |||
| + | System altered. | ||
| + | SQL> | ||
| + | </ | ||
| + | Restart the database. | ||
| + | |||
| + | Now look at what the parameters look like | ||
| + | < | ||
| + | SQL> show parameter service | ||
| + | |||
| + | NAME | ||
| + | ------------------------------------ ----------- ------------------------------ | ||
| + | service_names | ||
| + | |||
| + | SQL> show parameter domain | ||
| + | |||
| + | NAME | ||
| + | ------------------------------------ ----------- ------------------------------ | ||
| + | db_domain | ||
| + | </ | ||
| + | Note the service name changed to have the domain tagged on to it so we have to modify the tnsnames.ora service name otherwise we'll get ORA-12514. | ||
| + | |||
| + | so now the tnsnames.ora looks like this | ||
| + | < | ||
| + | DEVOPSE, | ||
| + | (DESCRIPTION = | ||
| + | (ADDRESS = (PROTOCOL = TCP)(HOST = hn511)(PORT = 3531)) | ||
| + | (CONNECT_DATA = | ||
| + | (SERVER = DEDICATED) | ||
| + | (SERVICE_NAME = devopse.world) | ||
| + | ) | ||
| + | ) | ||
| + | </ | ||
| + | |||
| + | Strangely, it now all works (either connecting to sqlplus user/ | ||
| + | |||
| + | ==== minact-scn: got error during useg scan e:12751 usn:5 ==== | ||
| + | and | ||
| + | < | ||
| + | minact-scn: useg scan erroring out with error e:12751 | ||
| + | Sat Aug 26 13:40:55 2023 | ||
| + | Incremental checkpoint up to RBA [0x4c28.f4b86.0], | ||
| + | Sat Aug 26 13:48:53 2023 | ||
| + | Non critical error ORA-48913 caught while writing to trace file "/ | ||
| + | Error message: ORA-48913: Writing into trace file failed, file size limit [10485760] reached | ||
| + | Writing to the above trace file is disabled for now on... | ||
| + | Sat Aug 26 13:49:29 2023 | ||
| + | minact-scn: got error during useg scan e:12751 usn:5 | ||
| + | minact-scn: useg scan erroring out with error e:12751 | ||
| + | Sat Aug 26 13:54:36 2023 | ||
| + | Suspending MMON action 'undo usage' for 82800 seconds | ||
| + | Sat Aug 26 13:59:36 2023 | ||
| + | minact-scn: got error during useg scan e:12751 usn:5 | ||
| + | minact-scn: useg scan erroring out with error e:12751 | ||
| + | Suspending MMON action 'Block Cleanout Optim, Undo Segment Scan' for 82800 seconds | ||
| + | </ | ||
| + | in alertlog. | ||
| + | |||
| + | The archiving has stopped. Jobs are backing up in Commvault. Now the database has stopped responding. | ||
| + | |||
| + | Strangely, if you do a | ||
| + | < | ||
| + | sho parameter log_archive_dest_state_1 | ||
| + | </ | ||
| + | you see | ||
| + | < | ||
| + | NAME | ||
| + | ------------------------------------ ----------- ------------------------------ | ||
| + | log_archive_dest_1 | ||
| + | | ||
| + | atory max_failure=1 alternate= | ||
| + | | ||
| + | |||
| + | log_archive_dest_state_1 | ||
| + | </ | ||
| + | but querying v$archive_dest shows | ||
| + | < | ||
| + | set head off | ||
| + | select*from v$archive_dest where dest_name=' | ||
| + | 1 | ||
| + | LOG_ARCHIVE_DEST_1 | ||
| + | DEFERRED | ||
| + | / | ||
| + | | ||
| + | 23-JUL-23 23: | ||
| + | ORA-19502: write error on file "", | ||
| + | </ | ||
| + | Resetting log_archive_dest_1 to itself does not help. But setting the state to defer and back to enable does the trick. | ||
| + | < | ||
| + | SQL> alter system set log_archive_dest_state_1=' | ||
| + | |||
| + | System altered. | ||
| + | |||
| + | SQL> alter system set log_archive_dest_state_1=' | ||
| + | |||
| + | System altered. | ||
| + | |||
| + | SQL> select*from v$archive_dest where dest_name=' | ||
| + | |||
| + | 1 | ||
| + | LOG_ARCHIVE_DEST_1 | ||
| + | VALID | ||
| + | / | ||
| + | | ||
| + | | ||
| + | </ | ||
| + | If the jobs start running, all is good. Otherwise a db restart fixes the issue. | ||
| + | |||
| + | See [[https:// | ||
| + | |||
| + | ==== ORA-01031: insufficient privileges ==== | ||
| + | Scratching my head over this seemingly simple looking error.\\ | ||
| + | This was the error seen on the screen | ||
| + | < | ||
| + | Connected to: | ||
| + | Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production | ||
| + | Version 18.4.0.0.0 | ||
| + | |||
| + | SQL> alter trigger cre_dba.trg_con_users disable; | ||
| + | alter trigger cre_dba.trg_con_users disable | ||
| + | * | ||
| + | ERROR at line 1: | ||
| + | ORA-01031: insufficient privileges | ||
| + | |||
| + | SQL> | ||
| + | </ | ||
| + | This was in te alertlog | ||
| + | < | ||
| + | 2019-03-21T18: | ||
| + | SERVER COMPONENT id=UTLRP_BGN: | ||
| + | 2019-03-21T18: | ||
| + | Errors in file / | ||
| + | ORA-04045: errors during recompilation/ | ||
| + | ORA-01031: insufficient privileges | ||
| + | </ | ||
| + | The clue was when looking at the content of the trigger type. It was a database logon trigger.\\ | ||
| + | It seems a special privilege is required! | ||
| + | < | ||
| + | SQL> grant administer database trigger to cre_dba; | ||
| + | |||
| + | Grant succeeded. | ||
| + | |||
| + | SQL> | ||
| + | </ | ||
| + | < | ||
| + | Connected to: | ||
| + | Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production | ||
| + | Version 18.4.0.0.0 | ||
| + | |||
| + | SQL> alter trigger cre_dba.trg_con_users disable; | ||
| + | |||
| + | Trigger altered. | ||
| + | |||
| + | SQL> | ||
| + | |||
| + | </ | ||
| + | |||
| + | ==== RMAN-05624: data file name not found in the repository for data file number=80 ==== | ||
| + | Getting these errors using a targetless connection (only auxiliary and repository). And doing this because we don't want the transportable checks to be done! | ||
| + | < | ||
| + | RMAN-03002: failure of Duplicate Db command at 08-MAR-24 | ||
| + | RMAN-05501: aborting duplication of target database | ||
| + | RMAN-05624: data file name not found in the repository for data file number=80 | ||
| + | RMAN-05624: data file name not found in the repository for data file number=801 | ||
| + | RMAN-05624: data file name not found in the repository for data file number=802 | ||
| + | RMAN-05624: data file name not found in the repository for data file number=803 | ||
| + | </ | ||
| + | The reason seems to be a corruption of the database in the repository. | ||
| + | < | ||
| + | unregister database; | ||
| + | register database; | ||
| + | </ | ||
| + | and the problem is fixed. | ||
| + | |||
| + | ==== ORA-27044: unable to write the header block of file ==== | ||
| + | Multiple errors in alertlog related to redo and archiving. | ||
| + | < | ||
| + | 2024-05-09T00: | ||
| + | Errors in file / | ||
| + | ORA-19504: failed to create file "/ | ||
| + | ORA-27044: unable to write the header block of file | ||
| + | IBM AIX RISC System/6000 Error: 89: Invalid file system control data detected | ||
| + | Additional information: | ||
| + | Additional information: | ||
| + | Additional information: | ||
| + | ARC3 (PID: | ||
| + | ARC3 (PID: | ||
| + | ARC3 (PID: | ||
| + | </ | ||
| + | It seems the filesystem (or several of them) is (are) corrupt.\\ | ||
| + | Operating system admins need to be involved to fsck the relevant filesystems. | ||
| + | |||
| + | |||
| + | ==== ORA-19563: Inspect Datafile Copy: SCN number validation unsuccessful header validation failed for file < | ||
| + | Following errors occured after restoring all the datafiles, switching them and then shutting down to rename the database in the controlfile | ||
| + | < | ||
| + | contents of Memory Script: | ||
| + | { | ||
| + | sql clone "alter system set db_name = | ||
| + | '' | ||
| + | '' | ||
| + | sql clone "alter system reset db_unique_name scope=spfile"; | ||
| + | | ||
| + | } | ||
| + | executing Memory Script | ||
| + | |||
| + | sql statement: alter system set db_name = '' | ||
| + | |||
| + | sql statement: alter system reset db_unique_name scope=spfile | ||
| + | |||
| + | Oracle instance shut down | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-03002: failure of Duplicate Db command at 07/21/2023 13:39:07 | ||
| + | RMAN-05501: aborting duplication of target database | ||
| + | RMAN-03015: error occurred in stored script Memory Script | ||
| + | RMAN-06136: Oracle error from auxiliary database: ORA-19563: Inspect Datafile Copy: SCN number validation unsuccessful header validation failed for file / | ||
| + | |||
| + | Recovery Manager complete. | ||
| + | </ | ||
| + | The message is misleading at first but after 'a while' the penny dropped.\\ | ||
| + | There were two files with the same name in different directories on the source system. Unusual, but not an issue in itself. But this duplicate had a db_filename_convert parameter which caused all the files to be collected into one big filesystem.\\ | ||
| + | So the controlfile saw two filenames the same (with different file numbers) but only one file on the destination filesystem (the other being overwritten).\\ | ||
| + | Tried and failed to continue opening the database (to restore the other datafile) so renamed one of the duplicate filenames on the source system and reran the duplicate. | ||
| + | |||
| + | UPDATE: | ||
| + | Happened again but this time there were 19 duplicate datafiles so not worth the energy of finding them and renaming them. The answer is to use %U in the set newname command. It makes a mess of the filenames but at least they are all guaranteed to be unique! | ||
| + | < | ||
| + | set echo on | ||
| + | connect auxiliary /; | ||
| + | connect catalog rman/ | ||
| + | |||
| + | run | ||
| + | { | ||
| + | allocate auxiliary channel t0 type sbt_tape parms ' | ||
| + | allocate auxiliary channel t1 type sbt_tape parms ' | ||
| + | allocate auxiliary channel t2 type sbt_tape parms ' | ||
| + | allocate auxiliary channel t3 type sbt_tape parms ' | ||
| + | set until time ' | ||
| + | set newname for database to '/ | ||
| + | duplicate database clne dbid 3045137910 to creltt2 | ||
| + | nofilenamecheck skip tablespace TS_THALER_IOT_OLD, | ||
| + | ; | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | |||
| + | ==== RMAN-05548: The set of duplicated tablespaces is not self-contained ==== | ||
| + | < | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-03002: failure of Duplicate Db command at 01/16/2024 10:53:48 | ||
| + | RMAN-05501: aborting duplication of target database | ||
| + | RMAN-05548: The set of duplicated tablespaces is not self-contained | ||
| + | </ | ||
| + | This error means that there are probably partitioned tables with partitions in different tablespaces (or other such things). Depending on the version of the database, there may be violation messages posted higher up in the logfile... | ||
| + | < | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | </ | ||
| + | This is entirely legal thing to do in the database so RMAN should handle it, but it doesn' | ||
| + | |||
| + | ==== RMAN-06025: no backup of log thread 1 seq 2668 lowscn 1079975830 found to restore ==== | ||
| + | Duplicate failed during recovery. Seemingly cannot find an archived log. | ||
| + | Looking at the sequence# shows it is a lot older than it should be (very likely already aged out of the controlfile and the catalog). | ||
| + | |||
| + | According to [[https:// | ||
| + | < | ||
| + | set lines 1000 pages 100 | ||
| + | col name for a50 | ||
| + | set numwid 20 lines 1000 | ||
| + | col name for a50 | ||
| + | select name, resetlogs_change#, | ||
| + | from | ||
| + | where && | ||
| + | / | ||
| + | </ | ||
| + | If there is a record where the name is not null, the archived is ' | ||
| + | === Solution === | ||
| + | From the rman catalog database... | ||
| + | Find dbinc_key of the database using | ||
| + | < | ||
| + | select * from rc_database | ||
| + | / | ||
| + | </ | ||
| + | then delete the offending records | ||
| + | < | ||
| + | delete | ||
| + | from | ||
| + | where 1=1 | ||
| + | and archived | ||
| + | and name is not null | ||
| + | and dbinc_key = < | ||
| + | / | ||
| + | </ | ||
| + | and rerun the duplicate. | ||
| + | |||
| + | The chances are that this corrupt record exists in v$archived_log (so, the controlfile) This cannot be fixed without rebuilding the controlfile. | ||
| + | |||
| + | ==== RMAN-06136: Oracle error from auxiliary database: ORA-19715: invalid format b for generated name ==== | ||
| + | When duplicating a database with "set newname for database to ...", cloning fails after restoring the controlfiles with: | ||
| + | |||
| + | Also received | ||
| + | ====ORA-19838: | ||
| + | Led to the same fix | ||
| + | |||
| + | < | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-03002: failure of Duplicate Db command at 07/21/2023 11:21:29 | ||
| + | RMAN-05501: aborting duplication of target database | ||
| + | RMAN-06136: Oracle error from auxiliary database: ORA-19715: invalid format b for generated name | ||
| + | ORA-27302: failure occurred at: slgpn | ||
| + | </ | ||
| + | Doc ID 2771480.1 explains the issue but does not explain how the error occurred.\\ | ||
| + | I suspect something went wrong with the restore of the controlfiles during a previous attempt and the source db_name got an extra entry in the catalog using the destination db_unique_name.\\ | ||
| + | === Solution: === | ||
| + | Go to the source db server, set the environment of the source database and connect to the catalog | ||
| + | < | ||
| + | RMAN> list db_unique_name of database; | ||
| + | |||
| + | |||
| + | List of Databases | ||
| + | DB Key DB Name DB ID Database Role Db_unique_name | ||
| + | ------- ------- ----------------- --------------- | ||
| + | 2012947 CRELTST | ||
| + | 2012947 CRELTST | ||
| + | |||
| + | </ | ||
| + | An extra entry has been inserted (as a standby) | ||
| + | < | ||
| + | |||
| + | RMAN> unregister db_unique_name creltt1; | ||
| + | |||
| + | database db_unique_name is " | ||
| + | |||
| + | Want to unregister the database with target db_unique_name (enter YES or NO)? yes | ||
| + | database with db_unique_name creltt1 unregistered from the recovery catalog | ||
| + | |||
| + | RMAN> list db_unique_name of database; | ||
| + | |||
| + | |||
| + | List of Databases | ||
| + | DB Key DB Name DB ID Database Role Db_unique_name | ||
| + | ------- ------- ----------------- --------------- | ||
| + | 2012947 CRELTST | ||
| + | |||
| + | RMAN> exit | ||
| + | |||
| + | |||
| + | Recovery Manager complete. | ||
| + | </ | ||
| + | Rerun the duplicate and it works | ||
| + | |||
| + | ==== RMAN-06564: must use the TO clause when the instance is started with SPFILE ==== | ||
| + | From the Commvault console, running a restore... | ||
| + | < | ||
| + | Rman Script: | ||
| + | [run { | ||
| + | allocate channel ch1 type ' | ||
| + | PARMS=" | ||
| + | TRACE 0; | ||
| + | send " -jm 131082 -a 2:-1 -cl 18194 -ins 4351 -at 22 -j 73218120 -jt 73218120: | ||
| + | | ||
| + | | ||
| + | } | ||
| + | exit; | ||
| + | ] | ||
| + | Rman Log:[ | ||
| + | Recovery Manager: Release 12.1.0.2.0 - Production on Tue Dec 28 14:58:37 2021 | ||
| + | Copyright (c) 1982, 2014, Oracle and/or its affiliates. | ||
| + | RMAN> | ||
| + | connected to recovery catalog database | ||
| + | recovery catalog schema release 19.13.00.00. is newer than RMAN release | ||
| + | RMAN> | ||
| + | connected to target database: EBST (not mounted) | ||
| + | RMAN> 2> 3> 4> 5> 6> 7> 8> | ||
| + | allocated channel: ch1 | ||
| + | channel ch1: SID=406 device type=SBT_TAPE | ||
| + | channel ch1: CommVault Systems for Oracle: Version 11.0.0(BUILD80) | ||
| + | sent command to channel: ch1 | ||
| + | Starting restore at Dec 28 2021 14:58:39 | ||
| + | released channel: ch1 | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-03002: failure of restore command at 12/28/2021 14:58:39 | ||
| + | RMAN-06564: must use the TO clause when the instance is started with SPFILE | ||
| + | RMAN> | ||
| + | Recovery Manager complete. | ||
| + | ] | ||
| + | </ | ||
| + | Solution: Make sure there is an init< | ||
| + | |||
| + | ==== RMAN-06004: ORACLE error from recovery catalog database: RMAN-20005: target database name is ambiguous ==== | ||
| + | Again from the Commvault console but could have been the RMAN command line, the problem here is that the database was registered twice with different DBIDs | ||
| + | < | ||
| + | Rman Script: | ||
| + | [run { | ||
| + | allocate channel ch1 type ' | ||
| + | PARMS=" | ||
| + | TRACE 0; | ||
| + | send " -jm 131082 -a 2:-1 -cl 18194 -ins 4351 -at 22 -j 73218120 -jt 73218120: | ||
| + | | ||
| + | | ||
| + | } | ||
| + | exit; | ||
| + | ] | ||
| + | Rman Log:[ | ||
| + | Recovery Manager: Release 12.1.0.2.0 - Production on Tue Dec 28 15:07:18 2021 | ||
| + | Copyright (c) 1982, 2014, Oracle and/or its affiliates. | ||
| + | RMAN> | ||
| + | connected to recovery catalog database | ||
| + | recovery catalog schema release 19.13.00.00. is newer than RMAN release | ||
| + | RMAN> | ||
| + | connected to target database: EBST (not mounted) | ||
| + | RMAN> 2> 3> 4> 5> 6> 7> 8> | ||
| + | allocated channel: ch1 | ||
| + | channel ch1: SID=406 device type=SBT_TAPE | ||
| + | channel ch1: CommVault Systems for Oracle: Version 11.0.0(BUILD80) | ||
| + | sent command to channel: ch1 | ||
| + | Starting restore at Dec 28 2021 15:07:20 | ||
| + | released channel: ch1 | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-03002: failure of restore command at 12/28/2021 15:07:20 | ||
| + | RMAN-06004: ORACLE error from recovery catalog database: RMAN-20005: target database name is ambiguous | ||
| + | RMAN> | ||
| + | Recovery Manager complete. | ||
| + | ] | ||
| + | </ | ||
| + | Solution: Find the bad (probably latest?) DBID and unregister it. | ||
| + | < | ||
| + | select * from ( | ||
| + | select rbs.db_key | ||
| + | , rd.name | ||
| + | , rbs.db_id | ||
| + | , rbs.bs_key | ||
| + | , rbs.recid | ||
| + | , rbs.stamp | ||
| + | , rbs.backup_type | ||
| + | , rbs.start_time | ||
| + | , status | ||
| + | from | ||
| + | , rc_database | ||
| + | where rbs.db_key = rd.db_key | ||
| + | and rbs.db_id | ||
| + | and rd.name | ||
| + | order by rbs.start_time desc | ||
| + | ) | ||
| + | where rownum <201 | ||
| + | / | ||
| + | |||
| + | DB_KEY NAME DB_ID | ||
| + | ---------- -------- ---------- ---------- ---------- ---------- - ------------------ - | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | |||
| + | </ | ||
| + | |||
| + | < | ||
| + | RMAN> set dbid 3520647526; | ||
| + | |||
| + | executing command: SET DBID | ||
| + | database name is " | ||
| + | |||
| + | RMAN> unregister database; | ||
| + | |||
| + | database name is " | ||
| + | |||
| + | Do you really want to unregister the database (enter YES or NO)? yes | ||
| + | database unregistered from the recovery catalog | ||
| + | |||
| + | RMAN> exit | ||
| + | |||
| + | Recovery Manager complete. | ||
| + | </ | ||
| + | |||
| + | ==== RMAN-03009: failure of full resync command on default channel at < | ||
| + | After a database duplicate from production to a lower environment, | ||
| + | < | ||
| + | RMAN> resync catalog; | ||
| + | |||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-03002: failure of show command at 09/17/2021 09:28:44 | ||
| + | RMAN-03014: implicit resync of recovery catalog failed | ||
| + | RMAN-03009: failure of full resync command on default channel at 09/17/2021 09:28:44 | ||
| + | ORA-01403: no data found | ||
| + | |||
| + | RMAN> | ||
| + | </ | ||
| + | The issue is unexpected but relatively simple to fix, even if it is a bit drastic. It seems the problem is that the database controlfile has become corrupted. | ||
| + | < | ||
| + | alter database backup controlfile to trace as '/ | ||
| + | </ | ||
| + | < | ||
| + | declare | ||
| + | j number; | ||
| + | k number; | ||
| + | filepath varchar2(4000) := '/ | ||
| + | sqlstr | ||
| + | begin | ||
| + | k := 1; | ||
| + | for logfile in (select member from v$logfile) | ||
| + | loop | ||
| + | j := mod(k, | ||
| + | sqlstr := 'alter database rename file ''' | ||
| + | --dbms_output.put_line(sqlstr); | ||
| + | execute immediate sqlstr; | ||
| + | k := k + 1; | ||
| + | end loop; | ||
| + | if k = 1 then | ||
| + | dbms_output.put_line(' | ||
| + | end if; | ||
| + | end; | ||
| + | / | ||
| + | </ | ||
| + | Now edit the file and remove the unwanted sections, shutdown the database, recreate the controlfile and all will work again. | ||
| + | |||
| + | ==== How to Recover from Loss Of Online Redo Log And ORA-312 And ORA-313 (Doc ID 117481.1) ==== | ||
| + | Complete loss of database following rm of all members of all redolog groups. | ||
| + | | ||
| + | Oracle support requested following queries to be run | ||
| + | < | ||
| + | spool / | ||
| + | set pagesize 20000 | ||
| + | set linesize 180 | ||
| + | set pause off | ||
| + | set serveroutput on | ||
| + | set feedback on | ||
| + | set echo on | ||
| + | set numformat 999999999999999 | ||
| + | alter session set nls_date_format = ' | ||
| + | archive log list; | ||
| + | select name, | ||
| + | select * from v$database_incarnation; | ||
| + | col name for a75 | ||
| + | select * from v$restore_point; | ||
| + | select flashback_on from v$database; | ||
| + | select file#, | ||
| + | select file#, | ||
| + | select TS#, | ||
| + | select * from v$recover_file; | ||
| + | select * from v$backup; | ||
| + | select member from v$logfile; | ||
| + | select * from v$log; | ||
| + | select * from v$logfile; | ||
| + | select file#, | ||
| + | select status, to_char(checkpoint_change# | ||
| + | count(*) from v$datafile_header | ||
| + | group by status, checkpoint_change#, | ||
| + | select count(*), | ||
| + | select count(*), | ||
| + | select count(*), | ||
| + | select count(*), | ||
| + | select min(FHSCN) "LOW FILEHDR SCN" , max(FHSCN) "MAX FILEHDR SCN", max(FHAFS) "Min PITR ABSSCN" | ||
| + | select fhdbn, | ||
| + | spool off | ||
| + | </ | ||
| + | |||
| + | ==== ORA-00392: log 10 of thread 1 is being cleared, operation not allowed ==== | ||
| + | Cannot open the database with resetlogs after a clone process using RMAN duplicate.\\ | ||
| + | In the alertlog we get pointed to a tracefile which hints at the problem | ||
| + | < | ||
| + | ORA-00313: open failed for members of log group 1 of thread 1 | ||
| + | ORA-00312: online log 1 thread 1: '/ | ||
| + | ORA-27037: unable to obtain file status | ||
| + | IBM AIX RISC System/6000 Error: 2: No such file or directory | ||
| + | Additional information: | ||
| + | </ | ||
| + | |||
| + | The issue is that the clone process failed to transform the source path names into destination path names and so obviously the redolog files don't exist where the controlfile thinks they do.\\ | ||
| + | '''' | ||
| + | The answer is to simply rename the files while the database is mounted | ||
| + | < | ||
| + | SQL> select open_mode from v$database; | ||
| + | |||
| + | OPEN_MODE | ||
| + | -------------------- | ||
| + | MOUNTED | ||
| + | |||
| + | SQL> alter database rename file '/ | ||
| + | |||
| + | Database altered. | ||
| + | |||
| + | SQL> alter database rename file '/ | ||
| + | |||
| + | Database altered. | ||
| + | |||
| + | SQL> alter database rename file '/ | ||
| + | |||
| + | Database altered. | ||
| + | |||
| + | </ | ||
| + | As we are going to open the database with resetlogs, it doesn' | ||
| + | < | ||
| + | |||
| + | |||
| + | Attempting to open the database shows another issue | ||
| + | < | ||
| + | SQL> alter database open resetlogs; | ||
| + | alter database open resetlogs | ||
| + | * | ||
| + | ERROR at line 1: | ||
| + | ORA-00392: log 3 of thread 1 is being cleared, operation not allowed | ||
| + | ORA-00312: online log 3 thread 1: '/ | ||
| + | </ | ||
| + | Look at the status of the redologs | ||
| + | < | ||
| + | SQL> select group#, | ||
| + | |||
| + | GROUP# | ||
| + | ---------- ---------- ---------------- | ||
| + | | ||
| + | | ||
| + | | ||
| + | |||
| + | 10 rows selected. | ||
| + | |||
| + | </ | ||
| + | Manually clear out the offending logfile | ||
| + | < | ||
| + | SQL> alter database clear logfile group 3; | ||
| + | |||
| + | Database altered. | ||
| + | |||
| + | SQL> select group#, | ||
| + | |||
| + | GROUP# | ||
| + | ---------- ---------- ---------------- | ||
| + | | ||
| + | | ||
| + | | ||
| + | |||
| + | 3 rows selected. | ||
| + | |||
| + | </ | ||
| + | Try to open the database again | ||
| + | < | ||
| + | SQL> alter database open resetlogs; | ||
| + | |||
| + | Database altered. | ||
| + | |||
| + | </ | ||
| + | Disco! | ||
| + | |||
| + | ==== ORA-12003: materialized view or zonemap " | ||
| + | Here's one you shouldn' | ||
| Trying to drop a tablespace but prevented from doing so because a materialized view has referential contraints on a table in this tablespace. | Trying to drop a tablespace but prevented from doing so because a materialized view has referential contraints on a table in this tablespace. | ||
| - | < | + | < |
| + | SQL> drop tablespace TS_THALER_PART_OLD including contents and datafiles cascade constraints; | ||
| + | drop tablespace TS_THALER_PART_OLD including contents and datafiles cascade constraints | ||
| + | * | ||
| + | ERROR at line 1: | ||
| + | ORA-00604: error occurred at recursive SQL level 1 | ||
| + | ORA-12083: must use DROP MATERIALIZED VIEW to drop " | ||
| + | </ | ||
| Ok, nice of Oracle to tell us what we have to do. Simple enough. Let's drop the materialized view. | Ok, nice of Oracle to tell us what we have to do. Simple enough. Let's drop the materialized view. | ||
| - | < | + | < |
| + | SQL> DROP MATERIALIZED VIEW " | ||
| + | DROP MATERIALIZED VIEW " | ||
| + | * | ||
| + | ERROR at line 1: | ||
| + | ORA-12003: materialized view or zonemap " | ||
| + | </ | ||
| Aah. Not so obvious then. | Aah. Not so obvious then. | ||
| - | < | + | < |
| - | It exists... but as a table.<br /> | + | desc " |
| - | Something has gone wrong in the database somewhere. As it turns out after some deeper investigation, | + | |
| - | After the cloning process, a schema needed renaming. Oracle have a procedure for this but it is very long-winded and time-consuming. It uses export and import with transportable tablespaces to do the remap of the schema.<br /> | + | |
| - | An unsupported workaround to rename schema is to simply update the username in sys.user$ and restart the database.<br /> | + | |
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | </ | ||
| + | It exists... but as a table.\\ | ||
| + | Something has gone wrong in the database somewhere. As it turns out after some deeper investigation, | ||
| + | After the cloning process, a schema needed renaming. Oracle have a procedure for this but it is very long-winded and time-consuming. It uses export and import with transportable tablespaces to do the remap of the schema.\\ | ||
| + | An unsupported workaround to rename schema is to simply update the username in sys.user$ and restart the database.\\ | ||
| This works for the most part but now we see a consequence of that action. | This works for the most part but now we see a consequence of that action. | ||
| - | < | + | < |
| - | Ahaa, there' | + | col owner for a30 |
| - | This means the owner of materialized views has been denormalised for some reason. Reading the (complex) view text of dba_mviews, we see the owner column is based on sys.snap$.sowner<br /> | + | col mview_name for a30 |
| - | < | + | select owner |
| + | , mview_name | ||
| + | from | ||
| + | / | ||
| + | |||
| + | |||
| + | OWNER MVIEW_NAME | ||
| + | ------------------------------ ------------------------------ | ||
| + | EPK EVD01_NEW | ||
| + | |||
| + | </ | ||
| + | Ahaa, there' | ||
| + | This means the owner of materialized views has been denormalised for some reason. Reading the (complex) view text of dba_mviews, we see the owner column is based on sys.snap$.sowner\\ | ||
| + | < | ||
| + | col sowner for a20 | ||
| + | col vname for a20 | ||
| + | col tname for a20 | ||
| + | select sowner | ||
| + | , vname | ||
| + | , tname | ||
| + | from | ||
| + | / | ||
| + | |||
| + | SOWNER | ||
| + | -------------------- -------------------- -------------------- | ||
| + | EPK EVD01_NEW | ||
| + | </ | ||
| For future reference when updating the username in sys.user$, update the snapshot owner in this table as well! | For future reference when updating the username in sys.user$, update the snapshot owner in this table as well! | ||
| - | < | + | < |
| + | update sys.snap$ | ||
| + | set sowner = ' | ||
| + | where sowner = ' | ||
| + | / | ||
| + | </ | ||
| Try again | Try again | ||
| - | < | + | < |
| + | DROP MATERIALIZED VIEW " | ||
| + | |||
| + | Materialized view dropped. | ||
| + | </ | ||
| yep, and the tablespace? | yep, and the tablespace? | ||
| - | < | + | < |
| + | drop tablespace TS_THALER_PART_OLD including contents and datafiles cascade constraints; | ||
| + | |||
| + | Tablespace dropped. | ||
| + | </ | ||
| - | =====ORA-12162: | + | ==== ORA-12162: TNS:net service name is incorrectly specified ==== |
| Probably nothing to do with TNS. Check your ORACLE_SID is set correctly! | Probably nothing to do with TNS. Check your ORACLE_SID is set correctly! | ||
| - | =====ORA-00054: | + | ==== ORA-00054: resource busy and acquire with NOWAIT specified ==== |
| - | < | + | < |
| - | < | + | SELECT O.OBJECT_NAME, |
| + | S.MACHINE, | ||
| + | FROM V$LOCKED_OBJECT L, DBA_OBJECTS O, V$SESSION S, | ||
| + | V$PROCESS P, V$SQL SQ | ||
| + | WHERE L.OBJECT_ID = O.OBJECT_ID | ||
| + | AND L.SESSION_ID = S.SID AND S.PADDR = P.ADDR | ||
| + | AND S.SQL_ADDRESS = SQ.ADDRESS; | ||
| + | </ | ||
| + | < | ||
| + | select object_name, | ||
| + | from v$locked_object l, dba_objects o, v$session s, v$process p | ||
| + | where l.object_id = o.object_id and l.session_id = s.sid and s.paddr = p.addr; | ||
| + | </ | ||
| then | then | ||
| - | < | + | < |
| + | alter system kill session ' | ||
| + | </ | ||
| + | |||
| + | ==== ORA-12516: TNS: | ||
| + | Database was running low on (and eventually out of) processes.\\ | ||
| + | Waited until the db would allow sysdba logons and increased the processes parameter.\\ | ||
| + | * Increased processes from 300 to 600\\ | ||
| + | sessions is automatically adjusted to (1.5 * processes) + 22 if not set\\ | ||
| + | transactions is automatically adjusted to (1.1 * processes) if not set\\ | ||
| + | |||
| + | Also statically registered the database with the listener in listener.ora | ||
| + | |||
| + | ==== Unable to uninstall old version of oracle.ahf ==== | ||
| + | < | ||
| + | echo " | ||
| + | |||
| + | AHF Uninstallation Log : / | ||
| + | AHF Home Directory not found. Exiting uninstall .. | ||
| + | |||
| + | </ | ||
| + | The problem was that this is a PowerHA cluster and when AHF was installed, it was on the other node. Now, after a failover, the original data subdirectories no longer match the current hostname. | ||
| + | |||
| + | The solution is to either failback :-) or to rebuild what is missing by: | ||
| + | < | ||
| + | ${ORACLE_BASE}/ | ||
| + | </ | ||
| - | =====ORA-12518: | + | ==== ORA-12518: TNS: |
| The database you are trying to connect to is probably on its knees. Check server memory is not exhausted. | The database you are trying to connect to is probably on its knees. Check server memory is not exhausted. | ||
| - | =====ORA-12520: | + | ==== ORA-12519: TNS:no appropriate service handler found" in listener log file ==== |
| + | and its associated TNS-12519: TNS:no appropriate service handler found" in listener log file in the listener log file.\\ | ||
| + | Oh, this one took me days to find!\\ | ||
| + | 99% of the solutions point to increasing the processes on the instance but this was definitely not the case here. Average number of processes 120 with a max. of 900.\\ | ||
| + | Even with the related story of pmon not updating the listener with terminated process count is not a good enough excuse to increase processes here.\\ | ||
| + | The clue was that connections using service_name were succeeding but connections using sid were not.\\ | ||
| + | The situation here is that we have a cluster of 2 nodes. The parent is called hn481 and the children are called hn5114 and hn5214.\\ | ||
| + | All the entries in tnsnames.ora are setup with the parent node, hn481.\\ | ||
| + | Checked the listener.ora file and looking at the listener definition it is showing a host connection to hn5114. This is actually the node where all the databsaes are running - but it does not resolve to the same address as the parent (virtual) node!\\ | ||
| + | Change this entry to match the tns entries, hn481, restart the listener and all is working again!\\ | ||
| + | |||
| + | ==== ORA-12520: TNS: | ||
| Strangely this could be related to number of processes being exhausted. | Strangely this could be related to number of processes being exhausted. | ||
| - | < | + | < |
| + | show parameter processes | ||
| + | alter system set processes=350 scope=spfile; | ||
| + | shutdown immediate | ||
| + | startup | ||
| + | </ | ||
| - | =====ORA-12541: | + | ==== ORA-12541: TNS: no listener ==== |
| - | Either very basic - start the listener!<br /> | + | Either very basic - start the listener!\\ |
| - | or, as in our case - not so obvious.<br /> | + | or, as in our case - not so obvious.\\ |
| - | We use virtual IP addresses so that the IP address stays the same after failover to standby.<br /> | + | We use virtual IP addresses so that the IP address stays the same after failover to standby.\\ |
| - | Due to some confused configuration, | + | Due to some confused configuration, |
| Stop the IP address on the bad server (assign another one) and all is fine again. | Stop the IP address on the bad server (assign another one) and all is fine again. | ||
| - | =====ORA-12514: | + | ==== ORA-12514: TNS: |
| - | < | + | < |
| + | lsnrctl status < | ||
| + | </ | ||
| Been altering tnsnames.ora or listener.ora? | Been altering tnsnames.ora or listener.ora? | ||
| - | * Check the local_listener parameter | + | * Check the local_listener parameter |
| - | Try resetting it to itself. Strange but if you are not using port 1521, this can work wonders!<br /> | + | Try resetting it to itself. Strange but if you are not using port 1521, this can work wonders!\\ |
| Assuming listener is called LISTENER_WM9T: | Assuming listener is called LISTENER_WM9T: | ||
| - | < | + | < |
| - | * Try and connect with the service name or directly with | + | alter system set local_listener=LISTENER_WM9T scope=both; |
| - | < | + | </ |
| - | Excellent description of how Oracle TNS listeners work and a checklist on how to fix this error<br /> | + | * Try and connect with the service name or directly with |
| - | * [[http:// | + | < |
| + | sqlplus ' | ||
| + | </ | ||
| + | Excellent description of how Oracle TNS listeners work and a checklist on how to fix this error\\ | ||
| + | * [[http:// | ||
| + | |||
| + | ==== ORA-12547: TNS lost contact ==== | ||
| - | =====ORA-12547: | ||
| If | If | ||
| - | < | + | < |
| + | sqlplus < | ||
| + | </ | ||
| fails with above error, try | fails with above error, try | ||
| - | < | + | < |
| - | If this works, it is most probably a permissions error.<br /> | + | sqlplus < |
| + | </ | ||
| + | If this works, it is most probably a permissions error.\\ | ||
| Re-run the | Re-run the | ||
| - | < | + | < |
| + | $ORACLE_HOME/ | ||
| + | </ | ||
| script that was run as part of the original installation. This will reset the permissions on some important files. | script that was run as part of the original installation. This will reset the permissions on some important files. | ||
| - | =====ORA-02374: | + | ==== ORA-02374: conversion error loading table " |
| This is typical of importing data with Datapump when the tables in the source database were created with " | This is typical of importing data with Datapump when the tables in the source database were created with " | ||
| - | < | + | < |
| - | ====Problem==== | + | ORA-02374: conversion error loading table " |
| + | ORA-12899: value too large for column NOMCTA (actual: 257, maximum: 256) | ||
| + | |||
| + | ORA-02372: data for row: NOMCTA : 0X' | ||
| + | </ | ||
| + | === Problem === | ||
| The root cause is the nls_length_semantics of the table columns being BYTE where one character is assigned one byte. But after conversion in a multi-byte database, one character is larger than one byte (could be 2, 3 or 4) and no longer fits. | The root cause is the nls_length_semantics of the table columns being BYTE where one character is assigned one byte. But after conversion in a multi-byte database, one character is larger than one byte (could be 2, 3 or 4) and no longer fits. | ||
| - | ====Solution==== | + | === Solution === |
| - | * import the metadata | + | * import the metadata |
| Run the impdp command with content=metadata_only. This will create all the tables (still in their original form) but not the data. | Run the impdp command with content=metadata_only. This will create all the tables (still in their original form) but not the data. | ||
| - | * alter the BYTE columns in the affected tables to CHAR semantics | + | * alter the BYTE columns in the affected tables to CHAR semantics |
| - | < | + | < |
| - | * Import the data | + | select column_name |
| + | , char_used | ||
| + | , data_length | ||
| + | , data_type | ||
| + | from | ||
| + | where table_name = ' | ||
| + | and char_used = ' | ||
| + | COLUMN_NAME | ||
| + | ------------ - ----------- --------- | ||
| + | X B 1 VARCHAR2 | ||
| + | SQL> alter table t modify x varchar2(1 char); | ||
| + | Table altered. | ||
| + | </ | ||
| + | * Import the data | ||
| Rerun the impdp ensuring table_exists_action is not REPLACE (use truncate or append). This now imports the data into the modified tables. | Rerun the impdp ensuring table_exists_action is not REPLACE (use truncate or append). This now imports the data into the modified tables. | ||
| - | ====This script does the donkey work of altering table column semantics from byte to char==== | + | === This script does the donkey work of altering table column semantics from byte to char === |
| The author of this script is unknown but he/she deserves a medal. It saves countless hours of work and is so well written. | The author of this script is unknown but he/she deserves a medal. It saves countless hours of work and is so well written. | ||
| - | < | + | < |
| + | /* | ||
| + | The script converts all the VARCHAR2 columns in the user's schema | ||
| + | to CHAR length semantics. Known to work on 10.2.0.4 and later. | ||
| - | =====ORA-14097: | + | Script must be executed against the database without any other client |
| - | Also can be < | + | and/or application connections to the affected schema. |
| - | Nothing especially to do with partitions - just any ddl operation that affects the table.<br /> | + | |
| + | Oracle does not support CHAR semantics for the built-in schemas, | ||
| + | like SYS, SYSTEM or SYSMAN, so the script will throw an error, | ||
| + | if attempt to run it against any one of them. | ||
| + | |||
| + | Upon completion database objects that have dependencies on tables | ||
| + | being modified will be invalidated. Oracle usually re-compiles invalidated | ||
| + | objects on the first access. Alternatively, | ||
| + | to recompile all invalid objects in the entire database. | ||
| + | |||
| + | Upon completion, please make sure that NLS_LENGTH_SEMANTICS instance parameter | ||
| + | is set to CHAR to ensure further upgradability of the schema. | ||
| + | * / | ||
| + | set serveroutput on size unlimited format wrap | ||
| + | declare | ||
| + | type sql_list_t is table of varchar2(32767) index by pls_integer; | ||
| + | type idx_list_t is table of user_indexes.index_name%type index by pls_integer; | ||
| + | type col_list_t is table of user_tab_columns%rowtype index by pls_integer; | ||
| + | -- | ||
| + | lv_col_cnt | ||
| + | lv_idx_cnt | ||
| + | lv_char_set | ||
| + | lv_user | ||
| + | lv_sql_stmt | ||
| + | lv_byte_cols col_list_t; | ||
| + | lv_idx_names idx_list_t; | ||
| + | lv_idx_ddls | ||
| + | -- | ||
| + | procedure run_sql_stmt | ||
| + | ( | ||
| + | | ||
| + | ) | ||
| + | as | ||
| + | begin | ||
| + | execute immediate p_sql_stmt; | ||
| + | exception | ||
| + | when others | ||
| + | then | ||
| + | raise_application_error(-20202, | ||
| + | end; | ||
| + | begin | ||
| + | -- | ||
| + | lv_user := user(); | ||
| + | if lv_user in (' | ||
| + | then | ||
| + | raise_application_error(-20202, | ||
| + | end if; | ||
| + | -- | ||
| + | select | ||
| + | * | ||
| + | bulk collect into lv_byte_cols | ||
| + | from | ||
| + | | ||
| + | where | ||
| + | | ||
| + | and | ||
| + | | ||
| + | and | ||
| + | not exists | ||
| + | ( | ||
| + | select 1 | ||
| + | from | ||
| + | where uv.view_name = uc.table_name | ||
| + | ) | ||
| + | ; | ||
| + | -- | ||
| + | lv_col_cnt := lv_byte_cols.count(); | ||
| + | -- | ||
| + | dbms_output.enable(); | ||
| + | -- | ||
| + | if lv_col_cnt > 0 | ||
| + | then | ||
| + | for idx_rw in | ||
| + | ( | ||
| + | | ||
| + | | ||
| + | | ||
| + | ) | ||
| + | loop | ||
| + | lv_idx_cnt := lv_idx_cnt + 1; | ||
| + | lv_idx_names(lv_idx_cnt) := idx_rw.index_name; | ||
| + | lv_idx_ddls(lv_idx_cnt) := replace | ||
| + | ( | ||
| + | dbms_metadata.get_ddl | ||
| + | ( | ||
| + | | ||
| + | | ||
| + | ) | ||
| + | , | ||
| + | ';' | ||
| + | ); | ||
| + | lv_sql_stmt := 'drop index ' || idx_rw.index_name; | ||
| + | run_sql_stmt(lv_sql_stmt); | ||
| + | dbms_output.put_line(' | ||
| + | dbms_output.put_line(' | ||
| + | dbms_output.put_line(lv_idx_ddls(lv_idx_cnt) || ';' | ||
| + | end loop; | ||
| + | -- | ||
| + | for i in 1..lv_col_cnt | ||
| + | loop | ||
| + | lv_sql_stmt := 'alter table ' || lv_byte_cols(i).table_name || ' modify (' || | ||
| + | lv_byte_cols(i).column_name || ' ' || lv_byte_cols(i).data_type || | ||
| + | ' | ||
| + | run_sql_stmt(lv_sql_stmt); | ||
| + | end loop; | ||
| + | -- | ||
| + | dbms_output.new_line(); | ||
| + | for i in 1..lv_idx_cnt | ||
| + | loop | ||
| + | run_sql_stmt(lv_idx_ddls(i)); | ||
| + | dbms_output.put_line(' | ||
| + | end loop; | ||
| + | -- | ||
| + | dbms_output.new_line(); | ||
| + | dbms_output.put_line | ||
| + | ( | ||
| + | ' | ||
| + | case when lv_col_cnt > 1 | ||
| + | then ' | ||
| + | end || | ||
| + | ' | ||
| + | ); | ||
| + | else | ||
| + | dbms_output.put_line(' | ||
| + | end if; | ||
| + | -- | ||
| + | select count(*) into lv_char_set | ||
| + | from | ||
| + | where parameter = ' | ||
| + | and | ||
| + | value = ' | ||
| + | ; | ||
| + | -- | ||
| + | if lv_char_set = 0 | ||
| + | then | ||
| + | dbms_output.put_line(' | ||
| + | end if; | ||
| + | end; | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | ==== ORA-14097: column type or size mismatch in ALTER TABLE EXCHANGE PARTITION ==== | ||
| + | Also can be < | ||
| + | Nothing especially to do with partitions - just any ddl operation that affects the table.\\ | ||
| Hidden columns do not normally show up in a desc unless colinvisible is on | Hidden columns do not normally show up in a desc unless colinvisible is on | ||
| - | < | + | < |
| + | set colinvisible on | ||
| + | </ | ||
| But these sneaky system-generated ones don't show up even with that setting on! You need to show them with this: | But these sneaky system-generated ones don't show up even with that setting on! You need to show them with this: | ||
| - | < | + | < |
| - | That last row means extended statistics have been generated for 2 columns in this table.<br /> | + | set pages 50 lines 1000 |
| - | You can see this because the name begins with SYS_STS. If it begins with SYS_< | + | col column_name for a40 |
| + | col data_default for a40 | ||
| + | select column_id | ||
| + | , column_name | ||
| + | , data_default | ||
| + | , user_generated | ||
| + | , hidden_column | ||
| + | , virtual_column | ||
| + | , identity_column | ||
| + | from | ||
| + | where owner = upper('& | ||
| + | and table_name = upper('& | ||
| + | / | ||
| + | |||
| + | INTERNAL_COLUMN_ID COLUMN_NAME | ||
| + | ------------------ -------------------------------------------------- -------------------------------------------------- ------------ ------------ | ||
| + | 35 MONLOT_REC_CDR | ||
| + | 34 MONLOT_REC_DBT | ||
| + | 33 MONLOT_CAL_CDR | ||
| + | 32 MONLOT_CAL_DBT | ||
| + | 31 MONMVT_CPT | ||
| + | 30 SENNOT | ||
| + | 29 NUMSEQ | ||
| + | 28 NOMFIC | ||
| + | 27 TOTCPT_REC | ||
| + | 26 TOTCPT_CAL | ||
| + | 25 MONLOT_REC | ||
| + | 24 MONLOT_CAL | ||
| + | 23 NBRELE_REC | ||
| + | 22 NBRELE_CAL | ||
| + | 21 NUMCPT_GLO | ||
| + | 20 DEVLOT | ||
| + | 19 CODERR | ||
| + | 18 CANLOT | ||
| + | 17 REFTEX | ||
| + | 16 REFEXN | ||
| + | 15 ETTLOT | ||
| + | 14 TYPLOT | ||
| + | 13 DATEXC | ||
| + | 12 STALOT | ||
| + | 11 REFLOT | ||
| + | 10 USRAUT | ||
| + | 9 HEUAUT | ||
| + | 8 DATAUT | ||
| + | 7 PGMMAJ | ||
| + | 6 USRMAJ | ||
| + | 5 HEUMAJ | ||
| + | 4 DATMAJ | ||
| + | 3 DATCRT | ||
| + | 2 REFMAJ | ||
| + | 1 NUMVER | ||
| + | 36 SYS_STS# | ||
| + | |||
| + | 36 rows selected. | ||
| + | </ | ||
| + | That last row means extended statistics have been generated for 2 columns in this table.\\ | ||
| + | You can see this because the name begins with SYS_STS. If it begins with SYS_< | ||
| It may be an unused column. Original [[https:// | It may be an unused column. Original [[https:// | ||
| - | < | + | < |
| + | create table t1 as select * from dba_roles; | ||
| - | ====Solution==== | + | Table created. |
| + | |||
| + | desc t1 | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | |||
| + | alter table t1 set unused (AUTHENTICATION_TYPE); | ||
| + | |||
| + | Table altered. | ||
| + | |||
| + | desc t1 | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | |||
| + | select column_name from dba_tab_cols where owner = '& | ||
| + | |||
| + | COLUMN_NAME | ||
| + | ------------------------------ | ||
| + | SYS_C00003_18012517: | ||
| + | PASSWORD_REQUIRED | ||
| + | ROLE | ||
| + | |||
| + | SQL> alter table t1 drop unused columns; | ||
| + | |||
| + | Table altered. | ||
| + | |||
| + | select column_name from dba_tab_cols where owner = '& | ||
| + | |||
| + | COLUMN_NAME | ||
| + | ------------------------------ | ||
| + | PASSWORD_REQUIRED | ||
| + | ROLE | ||
| + | </ | ||
| + | |||
| + | === Solution | ||
| Drop the extended stats, do what you need to do and recreate the extended stats. | Drop the extended stats, do what you need to do and recreate the extended stats. | ||
| - | < | + | < |
| + | PROCEDURE DROP_EXTENDED_STATS | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | |||
| + | exec dbms_stats.drop_extended_stats ( ' | ||
| + | |||
| + | create table kpk.xnd40_new as select * from kpk.xnd40 where 1=2; | ||
| + | |||
| + | Table created. | ||
| + | |||
| + | select dbms_stats.create_extended_stats ( ' | ||
| + | </ | ||
| The stats columns can also be seen in their own table | The stats columns can also be seen in their own table | ||
| - | < | + | < |
| + | set lines 1000 pages 100 | ||
| + | col owner for a6 | ||
| + | col table_name for a20 | ||
| + | col extension_name | ||
| + | col extension | ||
| + | select owner, table_name, extension_name, | ||
| - | =====ORA-14404: | + | OWNER TABLE_NAME |
| + | ----- -------------------- ---------------------------------------- -------------------------------------------------- ------------------------ ------------ | ||
| + | KPK | ||
| + | KPK | ||
| + | KPK | ||
| + | KPK | ||
| + | KPK | ||
| + | KPK | ||
| + | KPK | ||
| + | |||
| + | </ | ||
| + | |||
| + | ==== ORA-00942: table or view does not exist ==== | ||
| + | When performing DST upgrade, following errors occur. It's very confusing and misleading because the simple fact is that the temporary tablespace has probably not been created (properly). | ||
| + | |||
| + | Most often seen after a database duplication and so probably not checked the temp tablespace yet! | ||
| + | < | ||
| + | starting check | ||
| + | |||
| + | Session altered. | ||
| + | |||
| + | INFO: Starting with RDBMS DST update preparation. | ||
| + | INFO: NO actual RDBMS DST update will be done by this script. | ||
| + | INFO: If an ERROR occurs the script will EXIT sqlplus. | ||
| + | INFO: Doing checks for known issues ... | ||
| + | INFO: Database version is 19.0.0.0 . | ||
| + | INFO: Database RDBMS DST version is DSTv41 . | ||
| + | INFO: No known issues detected. | ||
| + | INFO: Now detecting new RDBMS DST version. | ||
| + | A prepare window has been successfully started. | ||
| + | INFO: Newest RDBMS DST version detected is DSTv42 . | ||
| + | INFO: Next step is checking all TSTZ data. | ||
| + | INFO: It might take a while before any further output is seen ... | ||
| + | ERROR: Something went wrong during DBMS_DST.FIND_AFFECTED_TABLES. | ||
| + | A prepare window has been successfully ended. | ||
| + | Error code -604: ORA-00604: error occurred at recursive SQL level 1 | ||
| + | DECLARE | ||
| + | * | ||
| + | ERROR at line 1: | ||
| + | ORA-20091: Stopping script - see previous message ... | ||
| + | ORA-06512: at line 36 | ||
| + | |||
| + | |||
| + | DECLARE | ||
| + | * | ||
| + | ERROR at line 1: | ||
| + | ORA-00942: table or view does not exist | ||
| + | ORA-06512: at line 4 | ||
| + | |||
| + | |||
| + | |||
| + | Session altered. | ||
| + | |||
| + | </ | ||
| + | |||
| + | ==== ORA-14404: partitioned table contains partitions in a different tablespace ==== | ||
| As part of an RMAN duplicate with a skip tablespace, this error is produced | As part of an RMAN duplicate with a skip tablespace, this error is produced | ||
| - | < | + | < |
| + | Reenabling controlfile options for auxiliary database | ||
| + | Executing: alter database enable block change tracking using file '/ | ||
| + | |||
| + | contents of Memory Script: | ||
| + | { | ||
| + | Alter clone database open resetlogs; | ||
| + | } | ||
| + | executing Memory Script | ||
| + | |||
| + | database opened | ||
| + | Dropping offline and skipped tablespaces | ||
| + | Executing: drop tablespace " | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-03002: failure of Duplicate Db command at 10/16/2017 23:46:12 | ||
| + | RMAN-05501: aborting duplication of target database | ||
| + | RMAN-06136: ORACLE error from auxiliary database: ORA-14404: partitioned table contains partitions in a different tablespace | ||
| + | |||
| + | Recovery Manager complete. | ||
| + | </ | ||
| and when attempting to backup the database, we get errors | and when attempting to backup the database, we get errors | ||
| - | < | + | < |
| - | ====Problem==== | + | RMAN-06169: could not read file header for datafile 188 error reason 1 |
| - | Tables in the tablespace have partitions in another tablespace so this one cannot be dropped.<br /> | + | RMAN-06169: could not read file header for datafile 189 error reason 1 |
| + | RMAN-06169: could not read file header for datafile 190 error reason 1 | ||
| + | RMAN-06169: could not read file header for datafile 191 error reason 1 | ||
| + | RMAN-06169: could not read file header for datafile 14 error reason 1 | ||
| + | released channel: t1 | ||
| + | released channel: t2 | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-03002: failure of backup plus archivelog command at 10/17/2017 15:08:40 | ||
| + | RMAN-06056: could not access datafile 14 | ||
| + | |||
| + | Recovery Manager complete. | ||
| + | </ | ||
| + | === Problem === | ||
| + | Tables in the tablespace have partitions in another tablespace so this one cannot be dropped.\\ | ||
| Check which table partitions are in which tablespaces | Check which table partitions are in which tablespaces | ||
| - | < | + | < |
| - | < | + | set lines 200 |
| + | set pagesize 200 | ||
| + | col table_name for a14 | ||
| + | col table_owner for a14 | ||
| + | col partition_name for a14 | ||
| + | select table_owner | ||
| + | , table_name | ||
| + | , partition_name | ||
| + | , tablespace_name | ||
| + | from | ||
| + | where (table_owner, | ||
| + | ( | ||
| + | | ||
| + | , | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | , | ||
| + | ) | ||
| + | ) | ||
| + | order by 1, | ||
| + | / | ||
| + | undef TABLESPACE_TO_DROP | ||
| + | </ | ||
| + | < | ||
| + | TABLE_OWNER | ||
| + | -------------- -------------- -------------- ------------------------------ | ||
| + | KPK XND20 P0910 TS_THALER_PART_OLD | ||
| + | KPK XND20 P1112 TS_THALER_PART_OLD | ||
| + | KPK XND20 P13 TS_THALER_PART_OLD | ||
| + | KPK XND20 P14 TS_THALER_PART_OLD | ||
| + | KPK XND20 P15 TS_THALER_PART_OLD | ||
| + | KPK XND20 P16 TS_THALER_DATA | ||
| + | KPK XND20 P17 TS_THALER_DATA | ||
| + | KPK XND20 P18 TS_THALER_DATA | ||
| + | KPK XND20 PMAX | ||
| + | </ | ||
| - | ====Solution==== | + | === Solution === |
| If the intention is to keep all the tables then run this query to generate statements to move the relevant tables out of this tablespace | If the intention is to keep all the tables then run this query to generate statements to move the relevant tables out of this tablespace | ||
| - | < | + | < |
| - | If however, the intention is to drop the tablespace anyway, the tables need to be dropped before the tablespace can be dropped.<br /> | + | select 'alter table ' |
| - | But ...tables with partitions in different tablespaces cannot be dropped. The partitions need to be dropped first!<br /> | + | from ( |
| + | | ||
| + | , | ||
| + | | ||
| + | | ||
| + | | ||
| + | , dba_tab_partitions b | ||
| + | where a.table_name | ||
| + | and b.tablespace_name != '& | ||
| + | / | ||
| + | undef TABLESPACE_NAME | ||
| + | </ | ||
| + | If however, the intention is to drop the tablespace anyway, the tables need to be dropped before the tablespace can be dropped.\\ | ||
| + | But ...tables with partitions in different tablespaces cannot be dropped. The partitions need to be dropped first!\\ | ||
| Run the following query to generate statements to drop all the ' | Run the following query to generate statements to drop all the ' | ||
| - | * drop table partitions | + | * |
| - | < | + | < |
| - | * drop tables | + | SELECT exec_statement |
| - | < | + | FROM |
| - | * drop tablespace | + | || table_owner |
| - | < | + | || '''' |
| - | ====Find all table partitions in tablespaces with missing datafiles==== | + | || ',''' |
| - | < | + | || table_name |
| - | ====Use exchange partition to alter metadata of the tablespaces without moving the actual data==== | + | || ''',''' |
| - | * [[https:// | + | || partition_name |
| + | || ''', | ||
| + | AS exec_statement | ||
| + | FROM | ||
| + | WHERE table_owner || table_name IN | ||
| + | ( | ||
| + | | ||
| + | | ||
| + | | ||
| + | ) | ||
| + | ORDER BY table_name, partition_name DESC) | ||
| + | UNION ALL | ||
| + | SELECT DISTINCT 'drop table ' || table_owner || ' | ||
| + | FROM | ||
| + | WHERE table_owner = ' | ||
| + | / | ||
| + | </ | ||
| + | or individually... | ||
| + | * | ||
| + | < | ||
| + | spool / | ||
| + | sqlplus / as sysdba<< | ||
| + | set headi off newpa none feedb off trims on echo off | ||
| + | select 'alter table ' | ||
| + | from | ||
| + | where tablespace_name = ' | ||
| + | / | ||
| + | spool off | ||
| + | EOSQL | ||
| + | echo "@/ | ||
| + | </ | ||
| + | * drop tables | ||
| + | < | ||
| + | sqlplus / as sysdba<< | ||
| + | select 'drop table ' | ||
| + | from | ||
| + | where tablespace_name = ' | ||
| + | spool / | ||
| + | / | ||
| + | spool off | ||
| + | EOSQL | ||
| + | echo "@/ | ||
| + | </ | ||
| + | * drop tablespace | ||
| + | < | ||
| + | drop tablespace ads_archive including contents and datafiles | ||
| + | / | ||
| + | </ | ||
| + | === Find all table partitions in tablespaces with missing datafiles === | ||
| + | < | ||
| + | set lines 1000 pages 100 | ||
| + | col owner for a10 | ||
| + | col segment_name for a40 | ||
| + | col segment_type for a25 | ||
| + | col partition_name for a20 | ||
| + | col tablespace_name for a25 | ||
| + | select owner | ||
| + | , segment_name | ||
| + | , segment_type | ||
| + | , partition_name | ||
| + | , tablespace_name | ||
| + | from | ||
| + | where segment_type in (' | ||
| + | and tablespace_name in ( | ||
| + | select tablespace_name | ||
| + | from | ||
| + | where file_name like ' | ||
| + | ) | ||
| + | order by 1, 2, decode (segment_type, | ||
| + | </ | ||
| + | === Use exchange partition to alter metadata of the tablespaces without moving the actual data === | ||
| + | * [[https:// | ||
| This is a way of doing the exchange with a neat PL/SQL procedure. It might not do what you want though so understand it before running it! | This is a way of doing the exchange with a neat PL/SQL procedure. It might not do what you want though so understand it before running it! | ||
| - | < | + | < |
| + | set serveroutput on size unlimited | ||
| + | DECLARE | ||
| + | dummy_table | ||
| + | cmd | ||
| + | currowner | ||
| + | currtable | ||
| + | l_subpartitioning_type | ||
| + | l_def_subpartition_count | ||
| + | l_subpartitioning_key_count | ||
| + | l_curr_qual_table | ||
| - | ====Workaround==== | + | PROCEDURE execsql (p_sql IN VARCHAR2) |
| + | IS | ||
| + | BEGIN | ||
| + | DBMS_OUTPUT.put_line (p_sql); | ||
| + | EXECUTE IMMEDIATE p_sql; | ||
| + | END; | ||
| + | |||
| + | PROCEDURE force_drop_table (p_table_name IN VARCHAR2) | ||
| + | IS | ||
| + | BEGIN | ||
| + | execsql ('drop table ' || p_table_name || ' purge' | ||
| + | EXCEPTION | ||
| + | WHEN OTHERS | ||
| + | THEN | ||
| + | NULL; | ||
| + | END; | ||
| + | |||
| + | PROCEDURE exchange_partition (p_from_table | ||
| + | p_from_partition | ||
| + | p_to_table | ||
| + | IS | ||
| + | BEGIN | ||
| + | execsql ( | ||
| + | ' | ||
| + | || p_from_table | ||
| + | || ' exchange partition ' | ||
| + | || p_from_partition | ||
| + | || ' with table ' | ||
| + | || p_to_table | ||
| + | || ' excluding indexes' | ||
| + | END; | ||
| + | |||
| + | PROCEDURE drop_partition (p_table IN VARCHAR2, p_partition IN VARCHAR2) | ||
| + | IS | ||
| + | BEGIN | ||
| + | execsql (' | ||
| + | END; | ||
| + | BEGIN | ||
| + | currowner := ' | ||
| + | currtable := ' | ||
| + | |||
| + | FOR asegment | ||
| + | IN ( SELECT owner, | ||
| + | | ||
| + | | ||
| + | | ||
| + | FROM dba_segments | ||
| + | | ||
| + | AND tablespace_name IN (SELECT tablespace_name | ||
| + | FROM dba_data_files | ||
| + | WHERE file_name LIKE ' | ||
| + | ORDER BY 1, | ||
| + | 2, | ||
| + | | ||
| + | 4) | ||
| + | LOOP | ||
| + | BEGIN | ||
| + | IF currowner <> asegment.owner OR currtable <> asegment.segment_name | ||
| + | THEN | ||
| + | currowner := asegment.owner; | ||
| + | currtable := asegment.segment_name; | ||
| + | l_curr_qual_table := asegment.owner || ' | ||
| + | dummy_table := asegment.owner || ' | ||
| + | |||
| + | force_drop_table (dummy_table); | ||
| + | |||
| + | IF asegment.segment_type = 'TABLE SUBPARTITION' | ||
| + | THEN | ||
| + | cmd := ' | ||
| + | |||
| + | SELECT subpartitioning_type, | ||
| + | | ||
| + | | ||
| + | INTO l_subpartitioning_type, | ||
| + | | ||
| + | | ||
| + | FROM dba_part_tables | ||
| + | | ||
| + | AND table_name = asegment.segment_name; | ||
| + | |||
| + | cmd := cmd || l_subpartitioning_type || ' | ||
| + | |||
| + | FOR asubpartkey | ||
| + | IN ( SELECT column_position, | ||
| + | FROM dba_subpart_key_columns | ||
| + | | ||
| + | AND name = asegment.segment_name | ||
| + | AND object_type = ' | ||
| + | ORDER BY column_position) | ||
| + | LOOP | ||
| + | IF asubpartkey.column_position > 1 | ||
| + | THEN | ||
| + | cmd := cmd || ','; | ||
| + | END IF; | ||
| + | |||
| + | cmd := cmd || asubpartkey.column_name; | ||
| + | END LOOP; | ||
| + | |||
| + | cmd := cmd || ') partitions ('; | ||
| + | |||
| + | FOR partnr IN 1 .. l_def_subpartition_count | ||
| + | LOOP | ||
| + | IF partnr > 1 | ||
| + | THEN | ||
| + | cmd := cmd || ','; | ||
| + | END IF; | ||
| + | |||
| + | cmd := cmd || ' | ||
| + | END LOOP; | ||
| + | |||
| + | cmd : ====== | ||
| + | cmd || ') as select * from ' || l_curr_qual_table || ' where 1=0'; | ||
| + | execsql (cmd); | ||
| + | ELSE | ||
| + | execsql ( | ||
| + | ' | ||
| + | || dummy_table | ||
| + | || ' as select * from ' | ||
| + | || l_curr_qual_table | ||
| + | || ' where 1=0' | ||
| + | END IF; | ||
| + | END IF; | ||
| + | |||
| + | exchange_partition (l_curr_qual_table, | ||
| + | asegment.partition_name, | ||
| + | dummy_table); | ||
| + | |||
| + | drop_partition (l_curr_qual_table, | ||
| + | EXCEPTION | ||
| + | WHEN OTHERS | ||
| + | THEN | ||
| + | DBMS_OUTPUT.put_line ( | ||
| + | asegment.owner || ' | ||
| + | END; | ||
| + | END LOOP; | ||
| + | |||
| + | IF dummy_table IS NOT NULL | ||
| + | THEN | ||
| + | force_drop_table (dummy_table); | ||
| + | END IF; | ||
| + | |||
| + | FOR atablespace IN ( SELECT DISTINCT tablespace_name | ||
| + | FROM dba_data_files | ||
| + | WHERE file_name LIKE ' | ||
| + | ORDER BY 1) | ||
| + | LOOP | ||
| + | execsql ( | ||
| + | ' | ||
| + | || atablespace.tablespace_name | ||
| + | || ' including contents and datafiles' | ||
| + | END LOOP; | ||
| + | END; | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | === Workaround | ||
| While working on the solution, a backup can be made using the "skip inaccessible" | While working on the solution, a backup can be made using the "skip inaccessible" | ||
| - | < | + | < |
| + | connect catalog rmanusr/ | ||
| + | connect target sys/syspwd@adsa1 | ||
| + | run { | ||
| + | allocate channel t1 type ' | ||
| + | allocate channel t2 type ' | ||
| + | configure retention policy to recovery window of 28 days; | ||
| + | configure controlfile autobackup on; | ||
| + | crosscheck archivelog all; | ||
| + | SQL 'ALTER SYSTEM SWITCH LOGFILE'; | ||
| + | SQL ' | ||
| + | backup filesperset 1 format ' | ||
| + | backup current controlfile; | ||
| + | release channel t1; | ||
| + | release channel t2; | ||
| + | } | ||
| + | exit | ||
| + | </ | ||
| - | ====Another way of deleting the offending objects==== | + | === Another way of deleting the offending objects === |
| - | Taken from [[http:// | + | Taken from [[http:// |
| Need to check it before running it blindly! | Need to check it before running it blindly! | ||
| - | <code> | + | < |
| - | =====ORA-28112: | + | set echo off feed off termo off trims on pages 0 newpa none lines 2000 headi off long 32000 |
| + | col val for a1000 | ||
| + | spool destroy_offending_objects.sql | ||
| + | |||
| + | select to_clob (' | ||
| + | from user_constraints where constraint_type in (' | ||
| + | union all | ||
| + | select to_clob ('drop index ' | ||
| + | union all | ||
| + | select to_clob (' | ||
| + | where tablespace_name in (select tablespace_name from dba_data_files where file_name like ' | ||
| + | union all | ||
| + | Select case | ||
| + | when instr (VAl, ' | ||
| + | substr (Val, | ||
| + | else | ||
| + | substr (Val, | ||
| + | End val | ||
| + | from | ||
| + | (select dbms_metadata.get_ddl (' | ||
| + | union all | ||
| + | Select Val | ||
| + | from | ||
| + | (select dbms_metadata.get_dependent_ddl (' | ||
| + | from user_tables where table_name in (select distinct table_name from user_tab_partitions join user_constraints using ( table_name) | ||
| + | where constraint_type=' | ||
| + | union all | ||
| + | select Val | ||
| + | from | ||
| + | (select dbms_metadata.get_ddl (' | ||
| + | from user_constraints | ||
| + | where constraint_type=' | ||
| + | ) | ||
| + | union all | ||
| + | select to_clob (val) | ||
| + | from (select distinct 'drop tablespace ' | ||
| + | from dba_tab_partitions | ||
| + | where tablespace_name in (select tablespace_name from dba_data_files where file_name like ' | ||
| + | ); | ||
| + | |||
| + | spoo off | ||
| + | |||
| + | @destroy_offending_objects | ||
| + | |||
| + | </ | ||
| + | |||
| + | ==== ORA-28112: failed to execute policy function ==== | ||
| when exporting or importing using [[Data Pump]]< /br> | when exporting or importing using [[Data Pump]]< /br> | ||
| During expdp is accompanied by " | During expdp is accompanied by " | ||
| - | =====Reason===== | + | ==== Reason ==== |
| This happens due to audit policies being defined on the table but the policy function is defined in another schema. | This happens due to audit policies being defined on the table but the policy function is defined in another schema. | ||
| - | =====Solution===== | + | ==== Solution ==== |
| Either drop the policy after importing the table with: | Either drop the policy after importing the table with: | ||
| - | < | + | < |
| + | begin | ||
| + | for rec in (select * from dba_audit_policies where object_schema = ' | ||
| + | dbms_fga.drop_policy(object_schema => rec.object_schema, | ||
| + | | ||
| + | | ||
| + | end loop; | ||
| + | end; | ||
| + | / | ||
| + | </ | ||
| or exclude the policies during export by adding this to the .par file: | or exclude the policies during export by adding this to the .par file: | ||
| - | < | + | < |
| + | exclude=FGA_POLICY | ||
| + | </ | ||
| or even better, give the necessary grants to the exporting user... | or even better, give the necessary grants to the exporting user... | ||
| - | < | + | < |
| + | grant exempt access policy to impexpusr; | ||
| + | </ | ||
| The sysdba role has this automatically. | The sysdba role has this automatically. | ||
| - | =====ORA-17629: | + | ==== ORA-17629: Cannot connect to the remote database server ==== |
| - | Active duplication fails to connect even though dns connection exists in tnsnames.ora<br /> | + | Active duplication fails to connect even though dns connection exists in tnsnames.ora\\ |
| - | <br /> | + | |
| Problem: | Problem: | ||
| - | <code> | + | < |
| - | < | + | DUPLICATE TARGET DATABASE FROM ACTIVE DATABASE DORECOVER NOFILENAMECHECK; |
| - | Solution:< | + | |
| - | <br /> | + | RMAN-03002: failure of Duplicate Db command at 05/27/2015 12:52:24 |
| + | RMAN-05501: aborting duplication of target database | ||
| + | RMAN-03015: error occurred in stored script Memory Script | ||
| + | RMAN-03009: failure of backup command on ORA_DISK_1 channel at 05/27/2015 12:52:23 | ||
| + | ORA-17629: Cannot connect to the remote database server | ||
| + | ORA-17627: ORA-12154: TNS:could not resolve the connect identifier specified | ||
| + | |||
| + | ORA-17629: Cannot connect to the remote database server | ||
| + | </code> | ||
| + | |||
| + | Solution: | ||
| Update the tnsnames.ora of both destination **and** source ORACLE_HOMEs! | Update the tnsnames.ora of both destination **and** source ORACLE_HOMEs! | ||
| - | =====ORA-01950: | + | ==== ORA-01950: no privileges on tablespace ' |
| - | < | + | < |
| - | **Cause:**<br /> | + | 26-JUN-15 03: |
| - | In this case, it seems SYSMAN has no rights to create objects in the SYSAUX tablespace<br /> | + | BEGIN " |
| - | **Solution: | + | ORA-01950: no privileges on tablespace ' |
| - | < | + | </ |
| + | **Cause:**\\ | ||
| + | In this case, it seems SYSMAN has no rights to create objects in the SYSAUX tablespace\\ | ||
| + | **Solution: | ||
| + | < | ||
| + | alter user SYSMAN quota unlimited on sysaux; | ||
| + | </ | ||
| More information [[https:// | More information [[https:// | ||
| - | =====ORA-39080: | + | ==== ORA-39080: failed to create queues " |
| - | < | + | < |
| - | ====Cause:==== | + | expdp / |
| + | |||
| + | Export: Release 11.2.0.4.0 - Production on Tue Jun 16 16:50:36 2015 | ||
| + | |||
| + | Copyright (c) 1982, 2011, Oracle and/or its affiliates. | ||
| + | |||
| + | Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production | ||
| + | With the Partitioning, | ||
| + | ORA-31626: job does not exist | ||
| + | ORA-31637: cannot create job SYS_EXPORT_SCHEMA_01 for user OPS$ORAIBM | ||
| + | ORA-06512: at " | ||
| + | ORA-06512: at " | ||
| + | [[ORA-39080: | ||
| + | ORA-06512: at " | ||
| + | ORA-06512: at " | ||
| + | ORA-24002: QUEUE_TABLE SYS.AQ$KUPC$DATAPUMP_QUETAB_1 does not exist | ||
| + | </ | ||
| + | === Cause: === | ||
| Possibly some or all of OLAP module has got itself deinstalled. | Possibly some or all of OLAP module has got itself deinstalled. | ||
| - | ====Solution: | + | === Solution: === |
| Try: | Try: | ||
| - | * Recompiling invalid objects. @?/ | + | * Recompiling invalid objects. @?/ |
| - | * Reinstalling DBMS_CUBE packages by (re)running catproc.sql. @?/ | + | * Reinstalling DBMS_CUBE packages by (re)running catproc.sql. @?/ |
| - | * Reinstalling OLAP. @?/ | + | * Reinstalling OLAP. @?/ |
| - | * Check metalink for bugs. See ID 345198.1 and possibly ID 453796.1 | + | * Check metalink for bugs. See ID 345198.1 and possibly ID 453796.1 |
| - | =====ORA-14063: | + | ==== ORA-14063: Unusable index exists on unique/ |
| - | **ORA-39083: | + | **ORA-39083: |
| - | During an import datapump (impdp), import failed because indexes were in error before the tables were exported. This causes the import of rows to be skipped.<br /> | + | During an import datapump (impdp), import failed because indexes were in error before the tables were exported. This causes the import of rows to be skipped.\\ |
| If the export cannot be done again (having compiled the indexes), then the metadata can be imported and the indexes compiled before importing the data. | If the export cannot be done again (having compiled the indexes), then the metadata can be imported and the indexes compiled before importing the data. | ||
| - | * Import the metadata | + | * Import the metadata |
| - | <code> | + | < |
| - | * Find the bad indexes and recompile them | + | cat<<EOCAT >impdp_adst_ads_archive_metadata.par |
| - | <code> | + | userid='/ |
| - | * Import the data | + | dumpfile=adst_ads_archive.dmp |
| - | < | + | logfile=impdp_adst_ads_archive_metadata.log |
| + | content=metadata_only | ||
| + | EOCAT | ||
| - | =====ORA-09925: | + | impdp parfile=impdp_adst_ads_archive_metadata.par |
| - | < | + | </ |
| + | * Find the bad indexes and recompile them | ||
| + | < | ||
| + | select 'alter index '|| owner||' | ||
| + | from | ||
| + | where status = ' | ||
| + | / | ||
| + | </ | ||
| + | * Import the data | ||
| + | < | ||
| + | cat<< | ||
| + | userid='/ | ||
| + | dumpfile=adst_ads_archive.dmp | ||
| + | logfile=impdp_adst_ads_archive_data.log | ||
| + | table_exists_action=append | ||
| + | content=data_only | ||
| + | EOCAT | ||
| + | |||
| + | impdp parfile=impdp_adst_ads_archive_data.par | ||
| + | </ | ||
| + | |||
| + | ==== ORA-09925: Unable to create audit trail file ==== | ||
| + | < | ||
| + | SQL> startup nomount pfile="/ | ||
| + | ORA-09925: Unable to create audit trail file | ||
| + | SVR4 Error: 2: No such file or directory | ||
| + | Additional information: | ||
| + | </ | ||
| or | or | ||
| - | < | + | < |
| - | ====Problem==== | + | connected to auxiliary database (not started) |
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-03002: failure of Duplicate Db command at 08/29/2017 15:53:09 | ||
| + | RMAN-05501: aborting duplication of target database | ||
| + | RMAN-03015: error occurred in stored script Memory Script | ||
| + | RMAN-04014: startup failed: ORA-09925: Unable to create audit trail file | ||
| + | IBM AIX RISC System/6000 Error: 2: No such file or directory | ||
| + | Additional information: | ||
| + | |||
| + | Recovery Manager complete. | ||
| + | </ | ||
| + | === Problem === | ||
| This will be almost certainly one of two issues. Either the directory is not writable by the id that started the instance or the directory just does not exist. | This will be almost certainly one of two issues. Either the directory is not writable by the id that started the instance or the directory just does not exist. | ||
| - | ====Solution==== | + | === Solution === |
| Note there can be a difference between what you see when you type: | Note there can be a difference between what you see when you type: | ||
| - | < | + | < |
| + | show parameter audit | ||
| + | </ | ||
| and when you type: | and when you type: | ||
| - | < | + | < |
| + | strings -a $ORACLE_HOME/ | ||
| + | </ | ||
| due to someone doing an "alter system" | due to someone doing an "alter system" | ||
| - | < | + | < |
| - | =====ORA-09925: | + | SQL> host ls -al / |
| + | SQL> host mkdir / | ||
| + | </ | ||
| + | ==== ORA-03113: end-of-file on communication channel ==== | ||
| + | **Problem**\\ | ||
| + | After a shutdown abort and a startup, got nasty looking errors. Shutdown and restart, same error, different codes! | ||
| + | < | ||
| + | SQL*Plus: Release 12.2.0.1.0 Production on Thu Jun 20 19:26:32 2019 | ||
| + | |||
| + | Copyright (c) 1982, 2016, Oracle. | ||
| + | |||
| + | Connected to an idle instance. | ||
| + | |||
| + | SQL> startup | ||
| + | ORACLE instance started. | ||
| + | |||
| + | Total System Global Area 2097152000 bytes | ||
| + | Fixed Size 8622624 bytes | ||
| + | Variable Size | ||
| + | Database Buffers | ||
| + | Redo Buffers | ||
| + | Database mounted. | ||
| + | ORA-03113: end-of-file on communication channel | ||
| + | Process ID: 3250 | ||
| + | Session ID: 9 Serial number: 63490 | ||
| + | |||
| + | </ | ||
| + | **Solution**\\ | ||
| + | Clear any unarchived redo and try again | ||
| + | < | ||
| + | alter database clear unarchived logfile group 1; | ||
| + | alter database clear unarchived logfile group 2; | ||
| + | alter database clear unarchived logfile group 3; | ||
| + | |||
| + | shu immediate | ||
| + | startup | ||
| + | ORACLE instance started. | ||
| + | |||
| + | Total System Global Area 2097152000 bytes | ||
| + | Fixed Size 8622624 bytes | ||
| + | Variable Size | ||
| + | Database Buffers | ||
| + | Redo Buffers | ||
| + | Database mounted. | ||
| + | Database Opened. | ||
| + | SQL> | ||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | ==== ORA-09925: Unable to create audit trail file ==== | ||
| When starting SQL*Plus with no db processes running (expecting to see " | When starting SQL*Plus with no db processes running (expecting to see " | ||
| - | < | + | < |
| - | * Filesystem permissions are fine | + | ERROR: |
| - | * ' | + | ORA-09925: Unable to create audit trail file |
| - | * Running on AIX | + | IBM AIX RISC System/6000 Error: 2: No such file or directory |
| + | Additional information: | ||
| + | ORA-01075: you are currently logged on | ||
| + | </ | ||
| + | * Filesystem permissions are fine | ||
| + | * ' | ||
| + | * Running on AIX | ||
| AIX is the clue here... need to check for semaphores and locked shared memory objects | AIX is the clue here... need to check for semaphores and locked shared memory objects | ||
| - | < | + | < |
| + | (0) UCLID55D oraibm@solax082:/ | ||
| - | =====RMAN-06023: | + | IPC Resources for ORACLE_SID " |
| - | < | + | Shared Memory: |
| - | Seems pretty straightforward? | + | ID KEY |
| - | < | + | 8388640 |
| - | SCN was only 12 hours ago with a retention of 28 days! The backup piece dated 2018-05-15 01:06:22 is clearly available and on the device type set_tape.<br /> | + | 579862561 |
| + | 384827426 | ||
| + | |||
| + | Semaphores: | ||
| + | ID KEY | ||
| + | 167772287 | ||
| + | Oracle Instance alive for sid " | ||
| + | |||
| + | (0) UCLID55D oraibm@solax082:/ | ||
| + | (0) UCLID55D oraibm@solax082:/ | ||
| + | (0) UCLID55D oraibm@solax082:/ | ||
| + | |||
| + | (0) UCLID55D oraibm@solax082:/ | ||
| + | |||
| + | (0) UCLID55D oraibm@solax082:/ | ||
| + | |||
| + | IPC Resources for ORACLE_SID " | ||
| + | Shared Memory | ||
| + | ID KEY | ||
| + | No shared memory segments used | ||
| + | Semaphores: | ||
| + | ID KEY | ||
| + | No semaphore resources used | ||
| + | Oracle Instance not alive for sid " | ||
| + | |||
| + | (0) UCLID55D oraibm@solax082:/ | ||
| + | oraibm 3326 23776 0 14:12:05 pts/1 0:00 grep UCLID55D | ||
| + | </ | ||
| + | |||
| + | ==== RMAN-06457: UNTIL SCN (325670056508) is ahead of last SCN in archived logs (325670045001) ==== | ||
| + | During RMAN duplicate this error meant that the clone could not go ahead. | ||
| + | Even though all the logs had been archived and backed up with Commvault, the error still showed up.\\ | ||
| + | It turns out Commvault was not setup to sync the catalog (in advanced options tab).\\ | ||
| + | I found it when I went to RMAN via the command line and did a 'list archivelog all'. Before starting to list everything, it did a resync which took an age. This was the clue. | ||
| + | ==== RMAN-06023: no backup or copy of datafile 1 found to restore ==== | ||
| + | < | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-03002: failure of Duplicate Db command at 05/16/2018 16:08:13 | ||
| + | RMAN-05501: aborting duplication of target database | ||
| + | RMAN-05556: not all datafiles have backups that can be recovered to SCN 278250901080 | ||
| + | RMAN-03015: error occurred in stored script Memory Script | ||
| + | RMAN-06026: some targets not found - aborting restore | ||
| + | RMAN-06023: no backup or copy of datafile 7 found to restore | ||
| + | RMAN-06023: no backup or copy of datafile 6 found to restore | ||
| + | RMAN-06023: no backup or copy of datafile 5 found to restore | ||
| + | RMAN-06023: no backup or copy of datafile 4 found to restore | ||
| + | RMAN-06023: no backup or copy of datafile 3 found to restore | ||
| + | RMAN-06023: no backup or copy of datafile 2 found to restore | ||
| + | RMAN-06023: no backup or copy of datafile 1 found to restore | ||
| + | </ | ||
| + | Seems pretty straightforward? | ||
| + | < | ||
| + | RMAN> list backup of datafile 1; | ||
| + | |||
| + | |||
| + | List of Backup Sets | ||
| + | =================== | ||
| + | |||
| + | |||
| + | BS Key Type LV Size | ||
| + | ------- ---- -- ---------- ----------- ------------ ------------------- | ||
| + | 110170340 Incr 0 132.90G | ||
| + | BP Key: 110170345 | ||
| + | Handle: 24639762_REPORTA_07t2r3uk_1_1 | ||
| + | List of Datafiles in backup set 110170340 | ||
| + | File LV Type Ckp SCN Ckp Time Name | ||
| + | ---- -- ---- ---------- ------------------- ---- | ||
| + | 1 0 Incr 277998128991 2018-05-14 01:01:08 / | ||
| + | |||
| + | BS Key Type LV Size | ||
| + | ------- ---- -- ---------- ----------- ------------ ------------------- | ||
| + | 110355808 Incr 1 204.00M | ||
| + | BP Key: 110355813 | ||
| + | Handle: 24661053_REPORTA_3ft2toal_1_1 | ||
| + | List of Datafiles in backup set 110355808 | ||
| + | File LV Type Ckp SCN Ckp Time Name | ||
| + | ---- -- ---- ---------- ------------------- ---- | ||
| + | 1 1 Incr 278044267395 2018-05-15 01:01:09 / | ||
| + | |||
| + | BS Key Type LV Size | ||
| + | ------- ---- -- ---------- ----------- ------------ ------------------- | ||
| + | 110543802 Incr 1 237.00M | ||
| + | BP Key: 110543807 | ||
| + | Handle: 24681602_REPORTA_6nt30cnt_1_1 | ||
| + | List of Datafiles in backup set 110543802 | ||
| + | File LV Type Ckp SCN Ckp Time Name | ||
| + | ---- -- ---- ---------- ------------------- ---- | ||
| + | 1 1 Incr 278286445856 2018-05-16 01:01:50 / | ||
| + | |||
| + | </ | ||
| + | SCN was only 12 hours ago with a retention of 28 days! The backup piece dated 2018-05-15 01:06:22 is clearly available and on the device type set_tape.\\ | ||
| The trick here was to look back through the logs and look more closely at what the file restore message was saying... | The trick here was to look back through the logs and look more closely at what the file restore message was saying... | ||
| - | < | + | < |
| + | channel t0: starting datafile backup set restore | ||
| + | channel t0: specifying datafile(s) to restore from backup set | ||
| + | channel t0: restoring datafile 00001 to / | ||
| + | channel t0: reading from backup piece dbfull_REPORTA_738887052_967580186_116_1 | ||
| + | channel t2: ORA-19870: error while restoring backup piece dbfull_REPORTA_738887052_967579750_113_1 | ||
| + | ORA-19507: failed to retrieve sequential file, handle=" | ||
| + | ORA-27029: skgfrtrv: sbtrestore returned error | ||
| + | ORA-19511: non RMAN, but media manager or vendor specific failure, error text: | ||
| + | | ||
| + | ORA-0651 | ||
| + | </ | ||
| It was not the fact that it could not find the data on tape, it was that it could not save the file to the location indicated!! | It was not the fact that it could not find the data on tape, it was that it could not save the file to the location indicated!! | ||
| - | In the RMAN DUPLICATE script, I had all the file paths redirected (a mixture of convert parameters and spfile set) to a /restore filesystem.<br /> | + | In the RMAN DUPLICATE script, I had all the file paths redirected (a mixture of convert parameters and spfile set) to a /restore filesystem.\\ |
| - | But I forgot one!<br /> | + | But I forgot one!\\ |
| A handy thing to do is to search out the file paths with this to see if something is still wrong: | A handy thing to do is to search out the file paths with this to see if something is still wrong: | ||
| - | < | + | < |
| + | cd $ORACLE_HOME/ | ||
| + | strings -a spfile${ORACLE_SID}.ora | grep dest | ||
| + | </ | ||
| This should show any paths still not getting caught by the DUPLICATE script. | This should show any paths still not getting caught by the DUPLICATE script. | ||
| - | =====RMAN-06136: | + | ==== RMAN-06136: ORACLE error from auxiliary database: ORA-06502: PL/SQL: numeric or value error ==== |
| When cloning a database, the duplicate fails with this error. | When cloning a database, the duplicate fails with this error. | ||
| - | ====Problem==== | + | === Problem === |
| This duplicate had no target connection but did have a catalog and auxiliary connection. | This duplicate had no target connection but did have a catalog and auxiliary connection. | ||
| In the catalog (which was the catalog where the target was registerd), there was also an entry in that catalog with the same name as the auxiliary - left over from the days when these 2 instances were Primary and Standby in a Dataguard configuration. | In the catalog (which was the catalog where the target was registerd), there was also an entry in that catalog with the same name as the auxiliary - left over from the days when these 2 instances were Primary and Standby in a Dataguard configuration. | ||
| - | < | + | < |
| - | ====Solution==== | + | ... |
| + | Datafile 414 skipped by request | ||
| + | Datafile 415 skipped by request | ||
| + | Datafile 419 skipped by request | ||
| + | Datafile 420 skipped by request | ||
| + | Datafile 421 skipped by request | ||
| + | |||
| + | DBGSQL: | ||
| + | DBGSQL: | ||
| + | DBGSQL: | ||
| + | DBGSQL: | ||
| + | DBGSQL: | ||
| + | restarting auxiliary database without server parameter file | ||
| + | Oracle instance started | ||
| + | |||
| + | Total System Global Area | ||
| + | |||
| + | Fixed Size | ||
| + | Variable Size 16978545480 bytes | ||
| + | Database Buffers | ||
| + | Redo Buffers | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-03002: failure of Duplicate Db command at 10/04/2017 14:50:29 | ||
| + | RMAN-05501: aborting duplication of target database | ||
| + | RMAN-06136: ORACLE error from auxiliary database: ORA-06502: PL/SQL: numeric or value error | ||
| + | |||
| + | Recovery Manager complete. | ||
| + | </ | ||
| + | === Solution === | ||
| Connect to the catalog and unregister the name of the auxiliary database. It shouldn' | Connect to the catalog and unregister the name of the auxiliary database. It shouldn' | ||
| - | < | + | < |
| + | rman catalog rmanusr/ | ||
| - | =====ORA-39181: | + | Recovery Manager: Release 11.2.0.4.0 - Production on Wed Oct 4 15:00:00 2017 |
| - | =====Reason===== | + | |
| + | Copyright (c) 1982, 2011, Oracle and/or its affiliates. | ||
| + | |||
| + | connected to recovery catalog database | ||
| + | |||
| + | RMAN> set dbid 4260753020; | ||
| + | |||
| + | executing command: SET DBID | ||
| + | database name is " | ||
| + | |||
| + | RMAN> list db_unique_name of database; | ||
| + | |||
| + | |||
| + | List of Databases | ||
| + | DB Key DB Name DB ID Database Role Db_unique_name | ||
| + | ------- ------- ----------------- --------------- | ||
| + | 13301587 LBK 4260753020 | ||
| + | 13301587 LBK 4260753020 | ||
| + | 13301587 LBK 4260753020 | ||
| + | |||
| + | RMAN> unregister db_unique_name ' | ||
| + | |||
| + | database db_unique_name is " | ||
| + | |||
| + | Want to unregister the database with target db_unique_name (enter YES or NO)? YES | ||
| + | database with db_unique_name ACC_PERF unregistered from the recovery catalog | ||
| + | |||
| + | RMAN> exit | ||
| + | </ | ||
| + | |||
| + | ==== ORA-39181: Only partial table data may be exported due to fine grain access control on " | ||
| + | |||
| + | ==== Reason ==== | ||
| This happens when applications are designed with fine-grained access. | This happens when applications are designed with fine-grained access. | ||
| - | =====Solution===== | + | ==== Solution ==== |
| Grant the necessary privileges to the exporting user... | Grant the necessary privileges to the exporting user... | ||
| - | < | + | < |
| + | grant exempt access policy to ops$oraibm; | ||
| + | </ | ||
| - | =====ORA-04030: out of process memory when trying to allocate 2520 bytes===== | + | ==== ORA-40238: invalid linear algebra shared library |
| - | < | + | During installation of Oracle software 18c, errors are received. This is because the 18c installer uses Fortran Runtime libraries not always installed. |
| + | < | ||
| + | ORA-40238: invalid linear algebra shared library | ||
| + | / | ||
| + | </ | ||
| + | Check for the presence of the necessary libraries using | ||
| + | < | ||
| + | lslpp -L all | grep -i " | ||
| + | </ | ||
| - | =====ORA-04031: | + | ==== ORA-04030: out of process memory when trying to allocate 2520 bytes ==== |
| - | * [[https:// | + | < |
| - | * [[https:// | + | expdp problem (ORA-04030: out of process memory when trying to allocate 2520 bytes (pga heap, |
| - | < | + | |
| - | Database had already crashed so nothing to do but:<br /> | + | select value from v$pgastat where name=' |
| - | <code>102@@</ | + | |
| - | but for reference, the causes could well be the applications running on the database are not using bind variables...<br /> | + | SHOW PARAMETER TARGET |
| + | |||
| + | ORA-04030: out of process memory when trying to allocate 2520 bytes (pga heap, | ||
| + | |||
| + | alter system reset pga_aggregate_target scope=spfile; | ||
| + | |||
| + | show sga | ||
| + | |||
| + | select * from v$pgastat; | ||
| + | |||
| + | show parameter process | ||
| + | |||
| + | select sum(value)/ | ||
| + | from | ||
| + | where 1=1 | ||
| + | and n.STATISTIC# | ||
| + | and name = ' | ||
| + | |||
| + | show parameter WORKAREA | ||
| + | |||
| + | select value from v$pgastat where name=' | ||
| + | |||
| + | alter system set memory_max_target=10G scope=spfile; | ||
| + | |||
| + | alter system set memory_target=3G scope=both; | ||
| + | |||
| + | select * from v$memory_target_advice order by memory_size; | ||
| + | </ | ||
| + | |||
| + | ==== ORA-445 Background Process " | ||
| + | * [[https:// | ||
| + | Extended the default timeout on the listener by adding | ||
| + | < | ||
| + | sqlnet.inbound_connection_timeout=180 | ||
| + | </ | ||
| + | to the sqlnet.ora | ||
| + | < | ||
| + | inbound_connection_timeout=120 | ||
| + | </ | ||
| + | and to the listener.ora | ||
| + | |||
| + | ==== opidrv aborting process J002 ospid (1573990) as a result of ORA-1013 ==== | ||
| + | This means that a job has been automatically cancelled because it overran the maintenance window. Check what the values are at the moment. | ||
| + | < | ||
| + | col window_name | ||
| + | col resource_plan | ||
| + | col repeat_interval for a80 | ||
| + | col duration | ||
| + | |||
| + | select window_name, | ||
| + | </ | ||
| + | This gives us something like this... | ||
| + | < | ||
| + | WINDOW_NAME | ||
| + | ------------------------------ ------------------------------ -------------------------------------------------------------------------------- ------------------------------ | ||
| + | MONDAY_WINDOW | ||
| + | TUESDAY_WINDOW | ||
| + | WEDNESDAY_WINDOW | ||
| + | THURSDAY_WINDOW | ||
| + | FRIDAY_WINDOW | ||
| + | SATURDAY_WINDOW | ||
| + | SUNDAY_WINDOW | ||
| + | WEEKNIGHT_WINDOW | ||
| + | WEEKEND_WINDOW | ||
| + | |||
| + | 9 rows selected. | ||
| + | </ | ||
| + | The values are set to the defaults. We can extend the night window from 4 hours to 6. | ||
| + | < | ||
| + | begin | ||
| + | dbms_scheduler.disable(name => ' | ||
| + | dbms_scheduler.disable(name => ' | ||
| + | dbms_scheduler.disable(name => ' | ||
| + | dbms_scheduler.disable(name => ' | ||
| + | dbms_scheduler.disable(name => ' | ||
| + | dbms_scheduler.set_attribute ( name => ' | ||
| + | | ||
| + | | ||
| + | ); | ||
| + | dbms_scheduler.set_attribute ( name => ' | ||
| + | | ||
| + | | ||
| + | ); | ||
| + | dbms_scheduler.set_attribute ( name => ' | ||
| + | | ||
| + | | ||
| + | ); | ||
| + | dbms_scheduler.set_attribute ( name => ' | ||
| + | | ||
| + | | ||
| + | ); | ||
| + | dbms_scheduler.set_attribute ( name => ' | ||
| + | | ||
| + | | ||
| + | ); | ||
| + | dbms_scheduler.enable(name => ' | ||
| + | dbms_scheduler.enable(name => ' | ||
| + | dbms_scheduler.enable(name => ' | ||
| + | dbms_scheduler.enable(name => ' | ||
| + | dbms_scheduler.enable(name => ' | ||
| + | end; | ||
| + | / | ||
| + | </ | ||
| + | And checking the results again shows... | ||
| + | < | ||
| + | WINDOW_NAME | ||
| + | ------------------------- ------------------------------ -------------------------------------------------------------------------------- --------------- | ||
| + | MONDAY_WINDOW | ||
| + | TUESDAY_WINDOW | ||
| + | WEDNESDAY_WINDOW | ||
| + | THURSDAY_WINDOW | ||
| + | FRIDAY_WINDOW | ||
| + | SATURDAY_WINDOW | ||
| + | SUNDAY_WINDOW | ||
| + | WEEKNIGHT_WINDOW | ||
| + | WEEKEND_WINDOW | ||
| + | |||
| + | 9 rows selected. | ||
| + | |||
| + | </ | ||
| + | |||
| + | ==== ORA-04031: Unable To Allocate Bytes Of Shared Memory (“Large Pool”, | ||
| + | This wait event occurs when block change tracking file reached its maximum size and unable to extend it.\\ | ||
| + | There may be other errors reported in the alertlog | ||
| + | |||
| + | ==== ORA-04031: unable to allocate 32 bytes of shared memory (" | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | < | ||
| + | ORA-04031: unable to allocate | ||
| + | ORA-04031: unable to allocate 32 bytes of shared memory (" | ||
| + | Incident details in: / | ||
| + | Wed Jul 31 20:42:50 2013 | ||
| + | Dumping diagnostic data in directory=[[cdmp_20130731204250]], | ||
| + | Wed Jul 31 20:42:51 2013 | ||
| + | Sweep [[inc]][[86754]]: | ||
| + | Sweep [[inc]][[86753]]: | ||
| + | Sweep [[inc2]][[86753]]: | ||
| + | Wed Jul 31 20:42:57 2013 | ||
| + | Use ADRCI or Support Workbench to package the incident. | ||
| + | See Note 411.1 at My Oracle Support for error and packaging details. | ||
| + | Dumping diagnostic data in directory=[[cdmp_20130731204257]], | ||
| + | Wed Jul 31 20:43:35 2013 | ||
| + | Errors in file / | ||
| + | ORA-04031: unable to allocate 32 bytes of shared memory (" | ||
| + | </ | ||
| + | Database had already crashed so nothing to do but:\\ | ||
| + | <code> | ||
| + | (0) MAPE ora@x025:/home/ora> sqlplus / as sysdba | ||
| + | |||
| + | SQL*Plus: Release 11.2.0.3.0 Production on Fri Aug 2 14:26:20 2013 | ||
| + | |||
| + | Copyright (c) 1982, 2011, Oracle. | ||
| + | |||
| + | Connected. | ||
| + | SYS@MAPE> alter system flush shared_pool; | ||
| + | alter system flush shared_pool | ||
| + | * | ||
| + | ERROR at line 1: | ||
| + | ORA-01012: not logged on | ||
| + | Process ID: 0 | ||
| + | Session ID: 0 Serial number: 0 | ||
| + | |||
| + | |||
| + | SYS@MAPE> shutdown abort | ||
| + | ORACLE instance shut down. | ||
| + | SYS@MAPE> startup | ||
| + | ORACLE instance started. | ||
| + | |||
| + | Total System Global Area 734892032 bytes | ||
| + | Fixed Size 2225128 bytes | ||
| + | Variable Size | ||
| + | Database Buffers | ||
| + | Redo Buffers | ||
| + | Database mounted. | ||
| + | Database opened. | ||
| + | |||
| + | SYS@MAPE> | ||
| + | |||
| + | NAME | ||
| + | ------------------------------------ ------------------------------ ------------------------------ | ||
| + | buffer_pool_keep | ||
| + | buffer_pool_recycle | ||
| + | global_context_pool_size | ||
| + | java_pool_size | ||
| + | large_pool_size | ||
| + | olap_page_pool_size | ||
| + | shared_pool_reserved_size | ||
| + | shared_pool_size | ||
| + | streams_pool_size | ||
| + | SYS@MAPE> | ||
| + | |||
| + | Total System Global Area 734892032 bytes | ||
| + | Fixed Size 2225128 bytes | ||
| + | Variable Size | ||
| + | Database Buffers | ||
| + | Redo Buffers | ||
| + | SYS@MAPE> | ||
| + | </ | ||
| + | but for reference, the causes could well be the applications running on the database are not using bind variables...\\ | ||
| From [[http:// | From [[http:// | ||
| - | < | + | < |
| + | ... | ||
| + | Just to give you a tiny idea of how huge of a difference this | ||
| + | can make performance wise, you only need to run a very small | ||
| + | test: | ||
| + | |||
| + | tkyte@TKYTE816> | ||
| + | System altered. | ||
| + | |||
| + | tkyte@TKYTE816> | ||
| + | 2 type rc is ref cursor; | ||
| + | 3 l_rc rc; | ||
| + | 4 l_dummy all_objects.object_name%type; | ||
| + | 5 l_start number default dbms_utility.get_time; | ||
| + | 6 begin | ||
| + | 7 for i in 1 .. 1000 | ||
| + | 8 loop | ||
| + | 9 open l_rc for | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | 14.86 seconds... | ||
| + | |||
| + | PL/SQL procedure successfully completed. | ||
| + | |||
| + | tkyte@TKYTE816> | ||
| + | 2 type rc is ref cursor; | ||
| + | 3 l_rc rc; | ||
| + | 4 l_dummy all_objects.object_name%type; | ||
| + | 5 l_start number default dbms_utility.get_time; | ||
| + | 6 begin | ||
| + | 7 for i in 1 .. 1000 | ||
| + | 8 loop | ||
| + | 9 open l_rc for | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | 1.27 seconds... | ||
| + | |||
| + | PL/SQL procedure successfully completed. | ||
| + | |||
| + | That is pretty dramatic. | ||
| + | execute much faster (we spent more time PARSING our queries then | ||
| + | actually EXECUTING them!) it will let more users use your system | ||
| + | simultaneously. | ||
| + | ... | ||
| + | </ | ||
| and from [[http:// | and from [[http:// | ||
| - | < | + | < |
| - | ====Advice from Oracle concerning a concrete (12c) example of unable to allocate 52824 bytes of shared memory (" | + | ... |
| + | Lbrary cache latch contention is typically caused by NOT using bind variables. | ||
| + | to excessive parsing of statements. | ||
| + | |||
| + | One way to see if this might be the case in your situation is to run a script like: | ||
| + | |||
| + | |||
| + | create table t1 as select sql_text from v$sqlarea; | ||
| + | |||
| + | alter table t1 add sql_text_wo_constants varchar2(1000); | ||
| + | |||
| + | create or replace function | ||
| + | remove_constants( p_query in varchar2 ) return varchar2 | ||
| + | as | ||
| + | l_query long; | ||
| + | l_char | ||
| + | l_in_quotes boolean default FALSE; | ||
| + | begin | ||
| + | for i in 1 .. length( p_query ) | ||
| + | loop | ||
| + | l_char := substr(p_query, | ||
| + | if ( l_char = **' and l_in_quotes ) | ||
| + | then | ||
| + | l_in_quotes := FALSE; | ||
| + | elsif ( l_char = **' and NOT l_in_quotes ) | ||
| + | then | ||
| + | l_in_quotes := TRUE; | ||
| + | l_query := l_query || **#'; | ||
| + | end if; | ||
| + | if ( NOT l_in_quotes ) then | ||
| + | l_query := l_query || l_char; | ||
| + | end if; | ||
| + | end loop; | ||
| + | l_query := translate( l_query, ' | ||
| + | for i in 0 .. 8 loop | ||
| + | l_query := replace( l_query, lpad(' | ||
| + | l_query := replace( l_query, lpad(' ', | ||
| + | end loop; | ||
| + | return upper(l_query); | ||
| + | end; | ||
| + | / | ||
| + | update t1 set sql_text_wo_constants = remove_constants(sql_text); | ||
| + | |||
| + | select sql_text_wo_constants, | ||
| + | from t1 | ||
| + | group by sql_text_wo_constants | ||
| + | having count(*) > 100 | ||
| + | order by 2 | ||
| + | / | ||
| + | |||
| + | |||
| + | The output of that last query will show you statements that are identical in the shared | ||
| + | pool after all numbers and character string constants have been removed. | ||
| + | statements -- and more importantly their counts -- are the potential bottlenecks. | ||
| + | addition to causing the contention, they will be HUGE cpu consumers. | ||
| + | |||
| + | If you discover your applications do not use bind variables -- you must have this | ||
| + | corrected. | ||
| + | shared pool will never be used right and you'll be using excessive CPU (90% of the time | ||
| + | it takes to process " | ||
| + | values ( :x )", and bind the value of 1 -- then the next person that runs that insert | ||
| + | will benefit from your work and run that much faster. | ||
| + | ... | ||
| + | </ | ||
| + | === Advice from Oracle concerning a concrete (12c) example of unable to allocate 52824 bytes of shared memory (" | ||
| This was from a ticket raised for a Data Pump export that consistently failed with: | This was from a ticket raised for a Data Pump export that consistently failed with: | ||
| - | < | + | < |
| - | < | + | Processing object type SCHEMA_EXPORT/ |
| + | Processing object type SCHEMA_EXPORT/ | ||
| + | ORA-39014: One or more workers have prematurely exited. | ||
| + | ORA-39029: worker 1 with process name " | ||
| + | ORA-31671: Worker process DW00 had an unhandled exception. | ||
| + | ORA-04031: unable to allocate 52824 bytes of shared memory (" | ||
| + | ORA-06512: at " | ||
| + | ORA-06512: at line 2 | ||
| + | </ | ||
| + | < | ||
| + | The error ORA-4031 on the shared pool can indicate one of two things: | ||
| + | - insufficient space for the shared pool (so insufficient memory in SGA at that time) | ||
| + | OR | ||
| + | - although there is enough memory, it is fragmented and no contiguous chunk can be allocated to satisfy the latest memory request. | ||
| - | =====ORA-00392: | + | Each SGA has a little fragmentation of course because of the operations taking place, so in your case the fragmentation is represented by the 18M of free memory, which exists in uncontiguous chunks. |
| + | This means that the root cause of the error is insufficient contiguous memory to allocate 12312 bytes of shared memory. | ||
| + | |||
| + | ACTION PLAN | ||
| + | ============== | ||
| + | 1. We see memory_target=2000M. This is too little to support a 12c database, even when it has little activity. | ||
| + | As you may know 1.7G for the SGA was acceptable when speaking of 32bit OSs where it was hardly possible to make use of more than that. | ||
| + | Since you have a 64 bit system, the addressable memory is virtually unlimited. | ||
| + | Furthermore, | ||
| + | So the first recommendation is to increase the value of memory_target to 4G for example. There is no ideal value, but this would be a reasonable starting value for tuning. | ||
| + | |||
| + | You can do further tuning of the memory using the view V$MEMORY_TARGET_ADVICE. | ||
| + | The view V$MEMORY_TARGET_ADVICE provides tuning advice for the MEMORY_TARGET initialization parameter: | ||
| + | SQL> SELECT * FROM v$memory_target_advice ORDER BY memory_size; | ||
| + | |||
| + | The dynamic performance view V$MEMORY_DYNAMIC_COMPONENTS shows the current sizes of all dynamically tuned memory components, including the total sizes of the SGA and instance PGA. | ||
| + | |||
| + | You can also use V$MEMORY_RESIZE_OPS which has a circular history buffer of the last 800 memory resize requests. | ||
| + | |||
| + | 2. Since the AMM (you have memory_target> | ||
| + | | ||
| + | |||
| + | SQL> alter system set " | ||
| + | --restart the instance | ||
| + | |||
| + | FYI: By default, Oracle configures a small Reserved Pool (or Reserved Area) inside the Shared Pool. | ||
| + | This memory can be used for operations such as PL/SQL and trigger compilation or for temporary space while loading Java objects. | ||
| + | After the memory allocated from the Reserved Pool is freed, it returns to the Reserved Pool. | ||
| + | 5% of the Shared Pool is set aside as the Reserved Pool to handle allocations of memory higher than defined by the hidden parameter _shared_pool_reserved_pct. | ||
| + | In some application environments, | ||
| + | |||
| + | 3. Set shared_pool_size=500M or even more. This will represent a minimum amount of memory that will always be available to the shared pool. | ||
| + | If more memory is needed at any moment, if it is available, it will be allocated to the shared pool over the 500M. | ||
| + | |||
| + | Implement the above steps, monitor the database and let us know the result, | ||
| + | |||
| + | </ | ||
| + | ==== ORA-01103: database name ‘LOANE’ in control file is not ‘LOANM’ ==== | ||
| + | This can happen after a cloning or duplicate database operation and then trying to nid the new database. | ||
| + | The db_name in the controlfile does not match the one in the init.ora file. | ||
| + | |||
| + | === Solution === | ||
| + | Change the DB_NAME parameter in spfile and restart the database so that the db_name' | ||
| + | Then use nid to do the rename again. | ||
| + | < | ||
| + | startup nomount; | ||
| + | alter system set db_name=< | ||
| + | shutdown immediate; | ||
| + | startup mount; | ||
| + | alter database open resetlogs; | ||
| + | </ | ||
| + | ==== NID-00135: There are 1 active threads : oracle ==== | ||
| + | < | ||
| + | SQL> select name, | ||
| + | |||
| + | NAME OPEN_MODE | ||
| + | --------- -------------------- | ||
| + | CLNE | ||
| + | |||
| + | $ nid target=/ dbname=clnm | ||
| + | |||
| + | DBNEWID: Release 12.1.0.2.0 - Production on Fri Jul 27 06:01:10 2018 | ||
| + | |||
| + | Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved. | ||
| + | |||
| + | Connected to database CLNE (DBID=34933270) | ||
| + | |||
| + | NID-00135: There are 1 active threads | ||
| + | |||
| + | |||
| + | Change of database name failed during validation - database is intact. | ||
| + | DBNEWID - Completed with validation errors. | ||
| + | </ | ||
| + | |||
| + | === Cause === | ||
| + | There are active redo threads open. The database was probably not shutdown cleanly before running nid. | ||
| + | |||
| + | === Solution === | ||
| + | * Open the database cleanly | ||
| + | < | ||
| + | alter database open; | ||
| + | |||
| + | Database altered. | ||
| + | </ | ||
| + | * Shutdown the database | ||
| + | < | ||
| + | shut immediate; | ||
| + | Database closed. | ||
| + | Database dismounted. | ||
| + | ORACLE instance shut down. | ||
| + | </ | ||
| + | * Mount the database | ||
| + | < | ||
| + | startup mount | ||
| + | ORACLE instance started. | ||
| + | |||
| + | Total System Global Area 1.0737E+10 bytes | ||
| + | Fixed Size 4582144 bytes | ||
| + | Variable Size 5972690176 bytes | ||
| + | Database Buffers 4731174912 bytes | ||
| + | Redo Buffers 28971008 bytes | ||
| + | Database mounted. | ||
| + | </ | ||
| + | * Run nid again | ||
| + | < | ||
| + | nid target=sys/ | ||
| + | |||
| + | DBNEWID: Release 12.1.0.2.0 - Production on Fri Jul 27 06:13:53 2018 | ||
| + | |||
| + | Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved. | ||
| + | |||
| + | Connected to database clne (DBID=34933270) | ||
| + | |||
| + | Connected to server version 12.1.0 | ||
| + | |||
| + | Control Files in database: | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | |||
| + | Change database name of database clne to clnm? (Y/[N]) => y | ||
| + | |||
| + | Proceeding with operation | ||
| + | Changing database name from clne to clnm | ||
| + | Control File / | ||
| + | Control File / | ||
| + | Control File / | ||
| + | Datafile / | ||
| + | Datafile / | ||
| + | . | ||
| + | . | ||
| + | . | ||
| + | Datafile / | ||
| + | Datafile / | ||
| + | Datafile / | ||
| + | Control File / | ||
| + | Control File / | ||
| + | Control File / | ||
| + | Instance shut down | ||
| + | |||
| + | Database name changed to clnm. | ||
| + | Modify parameter file and generate a new password file before restarting. | ||
| + | Succesfully changed database name. | ||
| + | DBNEWID - Completed succesfully. | ||
| + | </ | ||
| + | |||
| + | === Here is a script to do everything === | ||
| + | < | ||
| + | # | ||
| + | # ============================================================================== | ||
| + | # Name : rename_database_after_ORA-01103.ksh | ||
| + | # Description | ||
| + | # | ||
| + | # Parameters | ||
| + | # sid in the init / spfile | ||
| + | # | ||
| + | # Example | ||
| + | # | ||
| + | # Notes : Script to save having to remember which way around to change | ||
| + | # the names | ||
| + | # | ||
| + | # Modification History | ||
| + | # ==================== | ||
| + | # When Who | ||
| + | # ========= ================= ================================================== | ||
| + | # 02-MAY-20 Stuart Barkley | ||
| + | # ============================================================================== | ||
| + | |||
| + | OLDSID=$1 | ||
| + | NEWSID=$2 | ||
| + | ORATAB="/ | ||
| + | |||
| + | if [[ $# -ne 2 ]]; then | ||
| + | echo " | ||
| + | echo "If you get a message like this:" | ||
| + | echo " | ||
| + | echo "then run this: | ||
| + | echo " | ||
| + | exit 1 | ||
| + | fi | ||
| + | |||
| + | grep " | ||
| + | [[ $? -ne 0 ]] && echo " | ||
| + | grep " | ||
| + | [[ $? -ne 0 ]] && echo " | ||
| + | |||
| + | unset ORACLE_HOME | ||
| + | ORAENV_ASK=NO | ||
| + | export ORACLE_SID=" | ||
| + | . oraenv | ||
| + | [[ " | ||
| + | |||
| + | TIMESTAMP=`date +' | ||
| + | |||
| + | cd $ORACLE_HOME/ | ||
| + | cp " | ||
| + | perl -p -i -e 'if (m/ | ||
| + | perl -n -i -e 'print unless m/ | ||
| + | |||
| + | $ORACLE_HOME/ | ||
| + | whenever sqlerror exit failure | ||
| + | |||
| + | prompt startup force nomount pfile=' | ||
| + | startup force nomount pfile=' | ||
| + | |||
| + | prompt create spfile from pfile; | ||
| + | create spfile from pfile; | ||
| + | |||
| + | prompt alter database mount; | ||
| + | alter database mount; | ||
| + | |||
| + | prompt alter database open; | ||
| + | alter database open; | ||
| + | |||
| + | prompt shutdown immediate; | ||
| + | shutdown immediate; | ||
| + | |||
| + | prompt startup mount; | ||
| + | startup mount; | ||
| + | EOSQL | ||
| + | [[ $? -ne 0 ]] && echo " | ||
| + | |||
| + | nid target=/ dbname=${NEWSID} logfile="/ | ||
| + | grep ' | ||
| + | [[ $? -ne 0 ]] && echo " | ||
| + | |||
| + | perl -p -i -e 'if (m/ | ||
| + | [[ $? -ne 0 ]] && echo " | ||
| + | |||
| + | $ORACLE_HOME/ | ||
| + | prompt create spfile from pfile; | ||
| + | create spfile from pfile; | ||
| + | |||
| + | prompt startup mount; | ||
| + | startup mount; | ||
| + | |||
| + | prompt alter database open resetlogs; | ||
| + | alter database open resetlogs; | ||
| + | EOSQL | ||
| + | [[ $? -ne 0 ]] && echo " | ||
| + | echo " | ||
| + | </ | ||
| + | |||
| + | ==== ORA-00392: log 1 of thread 1 is being cleared, operation not allowed ==== | ||
| After performing an active duplication, | After performing an active duplication, | ||
| - | < | + | < |
| - | < | + | SQL> alter database open resetlogs |
| + | alter database open resetlogs | ||
| + | * | ||
| + | ERROR at line 1: | ||
| + | ORA-00392: log 1 of thread 1 is being cleared, operation not allowed | ||
| + | ORA-00312: online log 1 thread 1: '/ | ||
| + | </ | ||
| + | < | ||
| + | SQL> select group#, | ||
| + | |||
| + | GROUP# | ||
| + | ------- | ||
| + | 1 1 | ||
| + | 2 1 | ||
| + | 3 1 | ||
| + | </ | ||
| Check the alert log! Always a good idea to get extra info. In here we find the answer | Check the alert log! Always a good idea to get extra info. In here we find the answer | ||
| - | < | + | < |
| - | So the clue is that the file cannot be created at the operating system level.<br /> | + | ORA-00344: unable to re-create online log |
| - | Doing a < | + | '/ |
| - | In this case, we do not want the redolog directory to be as big as on the source db as there will be almost no movement on the destination.<br /> | + | ORA-27040: file create error, unable to create file |
| - | I should have specified the LOGFILE parameter in the DUPLICATE clause to setup new, smaller redolog files.<br /> | + | Linux-x86_64 Error: 2: No such file or directory |
| - | As this duplicate takes over 12 hours, I didn't want to do it again so I created symbolic links in the redolog directory pointing out to a larger filesystem with more space.<br /> | + | Additional information: |
| + | </ | ||
| + | So the clue is that the file cannot be created at the operating system level.\\ | ||
| + | Doing a < | ||
| + | In this case, we do not want the redolog directory to be as big as on the source db as there will be almost no movement on the destination.\\ | ||
| + | I should have specified the LOGFILE parameter in the DUPLICATE clause to setup new, smaller redolog files.\\ | ||
| + | As this duplicate takes over 12 hours, I didn't want to do it again so I created symbolic links in the redolog directory pointing out to a larger filesystem with more space.\\ | ||
| This allowed the creation of the redolog files. They can then be resized once the database has been opened. | This allowed the creation of the redolog files. They can then be resized once the database has been opened. | ||
| - | < | + | < |
| + | cd /oracle/ | ||
| + | ln -s / | ||
| + | ln -s / | ||
| + | ln -s / | ||
| - | =====RMAN-04004: | + | SQL> alter database open resetlogs |
| - | < | + | Database opened. |
| - | This is normally very straight-forward and self-explanatory.<br /> | + | </ |
| + | |||
| + | ==== RMAN-06136: Oracle error from auxiliary database: ORA-00344: unable to re-create online log '/ | ||
| + | < | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-03002: failure of Duplicate Db command at 11/26/2023 00:11:48 | ||
| + | RMAN-05501: aborting duplication of target database | ||
| + | RMAN-03015: error occurred in stored script Memory Script | ||
| + | RMAN-06136: Oracle error from auxiliary database: ORA-00344: unable to re-create online log '/ | ||
| + | ORA-27040: file create error, unable to create file | ||
| + | IBM AIX RISC System/6000 Error: 2: No such file or directory | ||
| + | Additional information: | ||
| + | </ | ||
| + | After an RMAN duplicate, the open resetlogs fails with above message. Note the path shown is that of the source database.\\ | ||
| + | This means that the db_logfile_convert parameter was setup incorrectly. To fix the issue, we rebuild the logfile groups while the database is still in mount mode. | ||
| + | < | ||
| + | set lines 200 pages 200 | ||
| + | col member for a70 | ||
| + | select vl.group# | ||
| + | , bytes/ | ||
| + | , type | ||
| + | , member | ||
| + | from | ||
| + | , v$logfile vlf | ||
| + | where vl.group# = vlf.group# | ||
| + | order by 1 | ||
| + | / | ||
| + | </ | ||
| + | < | ||
| + | GROUP# | ||
| + | ---------- ---------- ------- ---------------------------------------------------------------------- | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | 10 1000 ONLINE | ||
| + | |||
| + | 10 rows selected. | ||
| + | </ | ||
| + | The idea is to drop all these groups and re-create new ones with members is the correct (better) place. | ||
| + | < | ||
| + | alter database drop logfile group 2; | ||
| + | alter database drop logfile group 3; | ||
| + | alter database drop logfile group 4; | ||
| + | alter database drop logfile group 5; | ||
| + | alter database drop logfile group 6; | ||
| + | alter database drop logfile group 7; | ||
| + | alter database drop logfile group 8; | ||
| + | alter database drop logfile group 9; | ||
| + | alter database drop logfile group 10; | ||
| + | </ | ||
| + | < | ||
| + | Database altered. | ||
| + | |||
| + | SQL> | ||
| + | Database altered. | ||
| + | |||
| + | SQL> | ||
| + | Database altered. | ||
| + | |||
| + | SQL> | ||
| + | Database altered. | ||
| + | |||
| + | SQL> | ||
| + | Database altered. | ||
| + | |||
| + | SQL> | ||
| + | Database altered. | ||
| + | |||
| + | SQL> | ||
| + | Database altered. | ||
| + | |||
| + | SQL> | ||
| + | Database altered. | ||
| + | |||
| + | SQL> alter database drop logfile group 9 | ||
| + | * | ||
| + | ERROR at line 1: | ||
| + | ORA-01567: dropping log 9 would leave less than 2 log files for instance dwhaa2 | ||
| + | (thread 1) | ||
| + | ORA-00312: online log 9 thread 1: | ||
| + | '/ | ||
| + | |||
| + | </ | ||
| + | Ok, so we cannot remve the last 2 just yet. Let's recreate the first 8 | ||
| + | < | ||
| + | alter database add logfile group 2 ('/ | ||
| + | alter database add logfile group 3 ('/ | ||
| + | alter database add logfile group 4 ('/ | ||
| + | alter database add logfile group 5 ('/ | ||
| + | alter database add logfile group 6 ('/ | ||
| + | alter database add logfile group 7 ('/ | ||
| + | alter database add logfile group 8 ('/ | ||
| + | </ | ||
| + | < | ||
| + | Database altered. | ||
| + | |||
| + | SQL> | ||
| + | Database altered. | ||
| + | |||
| + | SQL> | ||
| + | Database altered. | ||
| + | |||
| + | SQL> | ||
| + | Database altered. | ||
| + | |||
| + | SQL> | ||
| + | Database altered. | ||
| + | |||
| + | SQL> | ||
| + | Database altered. | ||
| + | |||
| + | SQL> | ||
| + | Database altered. | ||
| + | |||
| + | SQL> | ||
| + | Database altered. | ||
| + | |||
| + | SQL> | ||
| + | </ | ||
| + | < | ||
| + | SQL> select group#, | ||
| + | |||
| + | GROUP# | ||
| + | ---------- ---------- ---------------- | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | 10 1 CLEARING_CURRENT | ||
| + | |||
| + | 10 rows selected. | ||
| + | </ | ||
| + | As we have now created more groups, we should be able to drop the remaining 2 groups | ||
| + | < | ||
| + | SQL> alter database drop logfile group 9; | ||
| + | alter database drop logfile group 10; | ||
| + | |||
| + | Database altered. | ||
| + | |||
| + | SQL> alter database drop logfile group 10 | ||
| + | * | ||
| + | ERROR at line 1: | ||
| + | ORA-01623: log 10 is current log for instance dwhaa2 (thread 1) - cannot drop | ||
| + | ORA-00312: online log 10 thread 1: | ||
| + | '/ | ||
| + | |||
| + | </ | ||
| + | One gone, but the last one won't go because it is current. And we can't switch logfiles because the database is not open!\\ | ||
| + | What now?\\ | ||
| + | The only way is to rename the logfile in the controlfile to an existing file. So let's duplicate on of the new members at o/s level and assign it. | ||
| + | < | ||
| + | SQL> !cp -p / | ||
| + | |||
| + | SQL> alter database rename file '/ | ||
| + | |||
| + | Database altered. | ||
| + | |||
| + | </ | ||
| + | Ok, good sign! Let's check | ||
| + | < | ||
| + | SQL> select group#, | ||
| + | |||
| + | GROUP# | ||
| + | ---------- ---------- ---------------- | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | 10 1 CLEARING_CURRENT | ||
| + | |||
| + | 9 rows selected. | ||
| + | |||
| + | SQL> alter database clear log group 10; | ||
| + | alter database clear log group 10 | ||
| + | * | ||
| + | ERROR at line 1: | ||
| + | ORA-01900: LOGFILE keyword expected | ||
| + | |||
| + | |||
| + | SQL> alter database clear logfile group 10; | ||
| + | |||
| + | Database altered. | ||
| + | |||
| + | SQL> | ||
| + | |||
| + | GROUP# | ||
| + | ---------- ---------- ---------------- | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | 10 1 CURRENT | ||
| + | |||
| + | 9 rows selected. | ||
| + | < | ||
| + | And finally, let's see if it opens | ||
| + | < | ||
| + | SQL> alter database open resetlogs; | ||
| + | |||
| + | Database altered. | ||
| + | |||
| + | SQL> | ||
| + | </ | ||
| + | To tidy up, we could now re-create the dropped group 9. | ||
| + | |||
| + | ==== ORA-01017: invalid username/ | ||
| + | Trying to connect using "/ as sysdba", | ||
| + | < | ||
| + | (0) upg oracle@hn5114:/ | ||
| + | |||
| + | SQL*Plus: Release 18.0.0.0.0 - Production on Fri Sep 20 10:16:22 2019 | ||
| + | Version 18.4.0.0.0 | ||
| + | |||
| + | Copyright (c) 1982, 2018, Oracle. | ||
| + | |||
| + | ERROR: | ||
| + | ORA-01017: invalid username/ | ||
| + | </ | ||
| + | but trying to connect using "sys as sysdba", | ||
| + | < | ||
| + | (0) upg oracle@hn5114:/ | ||
| + | |||
| + | SQL*Plus: Release 18.0.0.0.0 - Production on Fri Sep 20 10:16:07 2019 | ||
| + | Version 18.4.0.0.0 | ||
| + | |||
| + | Copyright (c) 1982, 2018, Oracle. | ||
| + | |||
| + | Enter password: | ||
| + | Connected to an idle instance. | ||
| + | |||
| + | SQL> | ||
| + | </ | ||
| + | Things to check: | ||
| + | * sqlplus / as sysdba means you use o/s authorisation so the o/s user must be a member of dba group otherwise the connection will fail. | ||
| + | * sqlplus sys/ | ||
| + | * Check the sqlnet.ora file. Operating system authentication will be disabled if you have SQLNET.AUTHENTICATION_SERVICES=NONE in there. | ||
| + | |||
| + | |||
| + | ==== RMAN-04004: error from recovery catalog database: ORA-01017: invalid username/ | ||
| + | < | ||
| + | oracle@host:/ | ||
| + | |||
| + | Recovery Manager: Release 11.2.0.2.0 - Production on Thu Jun 12 16:51:03 2014 | ||
| + | |||
| + | Copyright (c) 1982, 2009, Oracle and/or its affiliates. | ||
| + | |||
| + | connected to target database: XXXXRAP1 (DBID=3557010742) | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-00554: initialization of internal recovery manager package failed | ||
| + | RMAN-04004: error from recovery catalog database: ORA-01017: invalid username/ | ||
| + | </ | ||
| + | This is normally very straight-forward and self-explanatory.\\ | ||
| The puzzle here is that a connection from SQL*Plus works! | The puzzle here is that a connection from SQL*Plus works! | ||
| - | < | + | < |
| + | sqlplus catowner/ | ||
| + | |||
| + | SQL*Plus: Release 11.2.0.2.0 Production on Thu Jun 12 16:53:18 2014 | ||
| + | |||
| + | Copyright (c) 1982, 2010, Oracle. | ||
| + | |||
| + | |||
| + | Connected to: | ||
| + | Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production | ||
| + | With the Partitioning, | ||
| + | SQL> | ||
| + | </ | ||
| Eventually worked out that the rman binary in the databases ORACLE_HOME on the source machine needed relinking! | Eventually worked out that the rman binary in the databases ORACLE_HOME on the source machine needed relinking! | ||
| - | < | + | < |
| + | cd $ORACLE_HOME/ | ||
| + | make -f ins_rdbms.mk irman | ||
| + | </ | ||
| - | =====ORA-00230: | + | ==== ORA-00230: operation disallowed: snapshot control file enqueue unavailable ==== |
| - | < | + | < |
| + | waiting for snapshot control file enqueue | ||
| + | waiting for snapshot control file enqueue | ||
| + | waiting for snapshot control file enqueue | ||
| + | waiting for snapshot control file enqueue | ||
| + | cannot make a snapshot control file | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-03008: error while performing automatic resync of recovery catalog | ||
| + | ORA-00230: operation disallowed: snapshot control file enqueue unavailable | ||
| + | </ | ||
| From the doc... | From the doc... | ||
| - | < | + | < |
| + | When RMAN needs to back up or resynchronize from the control file, it first creates a snapshot or consistent image of the control file. | ||
| + | If one RMAN job is already backing up the control file while another needs to create a new snapshot control file, then you may see the following message: | ||
| + | |||
| + | waiting for snapshot controlfile enqueue | ||
| + | |||
| + | Under normal circumstances, | ||
| + | RMAN makes up to five attempts to get the enqueue and then fails the job. | ||
| + | The conflict is usually caused when two jobs are both backing up the control file, and the job that first starts backing up the control file waits for service from the media manager. | ||
| + | |||
| + | To determine which job is holding the conflicting enqueue: | ||
| + | |||
| + | After you see the first message stating " | ||
| + | |||
| + | % sqlplus ' | ||
| + | |||
| + | Execute the following query to determine which job is causing the wait: | ||
| + | |||
| + | SELECT s.SID, USERNAME AS " | ||
| + | | ||
| + | FROM V$SESSION s, V$ENQUEUE_LOCK l | ||
| + | WHERE l.SID = s.SID | ||
| + | AND l.TYPE = ' | ||
| + | AND l.ID1 = 0 | ||
| + | AND l.ID2 = 2; | ||
| + | |||
| + | You should see output similar to the following (the output in this example has been truncated): | ||
| + | |||
| + | SID User Program | ||
| + | --- ---- -------------------- ------------------------- ---------------- --------- | ||
| + | 9 SYS rman@h13 (TNS V1-V3) backup full datafile: c1 0000210 STARTED | ||
| + | |||
| + | |||
| + | After you have determined which job is creating the enqueue, you can do one of the following: | ||
| + | |||
| + | Wait until the job creating the enqueue completes | ||
| + | Cancel the current job and restart it after the job creating the enqueue completes | ||
| + | Cancel the job creating the enqueue | ||
| + | |||
| + | Commonly, enqueue situations occur when a job is writing to a tape drive, but the tape drive is waiting for a new cassette to be inserted. | ||
| + | If you start a new job in this situation, then you will probably receive the enqueue message because the first job cannot complete until the new tape is loaded. | ||
| + | </ | ||
| or more directly... | or more directly... | ||
| - | < | + | < |
| + | set lines 2000 | ||
| + | col killer | ||
| + | col program | ||
| + | col module | ||
| + | col action | ||
| + | col logon_time for a20 | ||
| + | select 'alter system disconnect session **||s.sid||',' | ||
| + | , username | ||
| + | , program | ||
| + | , module | ||
| + | , action | ||
| + | , logon_time | ||
| + | from | ||
| + | , v$enqueue_lock l | ||
| + | where l.sid = s.sid | ||
| + | and l.type = ' | ||
| + | and l.id1 = 0 | ||
| + | and l.id2 = 2 | ||
| + | / | ||
| + | </ | ||
| - | =====ORA-19511: | + | ==== ORA-19511: non RMAN, but media manager or vendor specific failure, error text: ==== |
| - | < | + | < |
| - | If this happens, check to see if the nsr daemon is running...<br /> | + | RMAN-00571: =========================================================== |
| + | RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-03002: failure of Duplicate Db command at 05/01/2018 14:23:09 | ||
| + | RMAN-05501: aborting duplication of target database | ||
| + | RMAN-03015: error occurred in stored script Memory Script | ||
| + | ORA-27191: sbtinfo2 returned error | ||
| + | Additional information: | ||
| + | ORA-19511: non RMAN, but media manager or vendor specific failure, error text: | ||
| + | | ||
| + | |||
| + | Recovery Manager complete. | ||
| + | </ | ||
| + | If this happens, check to see if the nsr daemon is running...\\ | ||
| Good system: | Good system: | ||
| - | < | + | < |
| + | / | ||
| + | root 5701836 | ||
| + | oracle 18809292 22741502 | ||
| + | </ | ||
| Bad system: | Bad system: | ||
| - | < | + | < |
| + | / | ||
| + | oracle 14745986 15139292 | ||
| + | </ | ||
| - | =====ORA-19554: | + | ==== ORA-19554: error allocating device, device type: SBT_TAPE, device name: ==== |
| If using Cygwin... | If using Cygwin... | ||
| - | < | + | < |
| - | * Check the tdpo.opt file is where you think it is! | + | RMAN-00571: =========================================================== |
| - | * Check the path to the opt file looks like this (needs to be Windows format): | + | RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== |
| - | < | + | RMAN-00571: =========================================================== |
| - | * Check the content of the opt file is Windows format paths! | + | RMAN-03002: failure of backup command at 05/19/2015 12:25:47 |
| + | ORA-19554: error allocating device, device type: SBT_TAPE, device name: | ||
| + | ORA-27000: skgfqsbi: failed to initialize storage subsystem (SBT) layer | ||
| + | OSD-02534: Message 2534 not found; | ||
| + | </ | ||
| + | * Check the tdpo.opt file is where you think it is! | ||
| + | * Check the path to the opt file looks like this (needs to be Windows format): | ||
| + | < | ||
| + | CONFIGURE CHANNEL DEVICE TYPE ' | ||
| + | </ | ||
| + | * Check the content of the opt file is Windows format paths! | ||
| - | =====RMAN-20033: | + | ==== RMAN-20033: control file SEQUENCE# too low ==== |
| - | < | + | < |
| - | From [[https:// | + | RMAN-00571: =========================================================== |
| - | This error generally happens if an archivelog backup happens while the RMAN database backup is running and if controlfile autobackup is configured.<br /> | + | RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== |
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-03008: error while performing automatic resync of recovery catalog | ||
| + | ==== RMAN-20033: control file SEQUENCE# too low ==== | ||
| + | </ | ||
| + | From [[https:// | ||
| + | This error generally happens if an archivelog backup happens while the RMAN database backup is running and if controlfile autobackup is configured.\\ | ||
| The database backup is usually successful and it is just the controlfile backup that fails. | The database backup is usually successful and it is just the controlfile backup that fails. | ||
| - | =====ORA-27302: | + | ==== ORA-27302: failure occurred at: slgpn ==== |
| - | < | + | < |
| - | ====Problem==== | + | RMAN-03009: failure of Control File and SPFILE Autobackup command on c1 channel at 06/28/2011 18:59:38 |
| + | ORA-19715: invalid format %b for generated name | ||
| + | ORA-27302: failure occurred at: slgpn | ||
| + | </ | ||
| + | === Problem === | ||
| When doing a "< | When doing a "< | ||
| - | ====Investigation==== | + | === Investigation === |
| - | I had read [[https:// | + | I had read [[https:// |
| - | No luck. It ended exactly the same way after 145 files. I decided to compare the original list of datafiles with those that had been backed up in order to track down the 2 failures. Maybe I could see something odd with them.<br /> | + | No luck. It ended exactly the same way after 145 files. I decided to compare the original list of datafiles with those that had been backed up in order to track down the 2 failures. Maybe I could see something odd with them.\\ |
| Sure enough, these 2 files were different... there was a space at the **end** of the filenames :-) | Sure enough, these 2 files were different... there was a space at the **end** of the filenames :-) | ||
| - | < | + | < |
| + | select ' | ||
| + | from | ||
| + | where file_name like '% %' | ||
| + | / | ||
| + | </ | ||
| - | ====Solution==== | + | === Solution === |
| Run the backup of the other 2 datafiles with a different format that did not rely on the filename. | Run the backup of the other 2 datafiles with a different format that did not rely on the filename. | ||
| - | < | + | < |
| - | The other 145 datafiles were backed up with a format of '/ | + | run { |
| + | allocate channel c1 device type disk format '/ | ||
| + | backup as copy datafile 170; | ||
| + | backup as copy datafile 171; | ||
| + | backup as copy current controlfile; | ||
| + | release channel c1; | ||
| + | } | ||
| + | </ | ||
| + | The other 145 datafiles were backed up with a format of '/ | ||
| If they are going to be used in a restore scenario, they should be renamed in the controlfile also. | If they are going to be used in a restore scenario, they should be renamed in the controlfile also. | ||
| - | < | + | < |
| + | alter database rename file '/ | ||
| + | </ | ||
| - | =====RMAN errors after crosscheck backup and delete noprompt obsolete and delete noprompt expired backup===== | + | ==== RMAN errors after crosscheck backup and delete noprompt obsolete and delete noprompt expired backup ==== |
| - | < | + | < |
| - | Use the FORCE option with the DELETE command<br /> | + | RMAN-06207: WARNING: 3921 objects could not be deleted for SBT_TAPE channel(s) due |
| + | RMAN-06208: | ||
| + | RMAN-06210: List of Mismatched objects | ||
| + | RMAN-06211: ========================== | ||
| + | RMAN-06212: | ||
| + | RMAN-06213: --------------- --------------------------------------------------- | ||
| + | RMAN-06214: Backup Piece DB_SID_t20140316_s263889_umhp3bpa7_1_1 | ||
| + | ... | ||
| + | </ | ||
| + | Use the FORCE option with the DELETE command\\ | ||
| The FORCE command tells RMAN to clean the information out of the catalog regardless of whether it can find it on the media or not. | The FORCE command tells RMAN to clean the information out of the catalog regardless of whether it can find it on the media or not. | ||
| - | < | + | < |
| - | =====RMAN-06004: | + | delete force noprompt expired backup; |
| - | ====Problem:==== | + | delete force noprompt obsolete; |
| - | < | + | </ |
| - | ====Solution: | + | ==== RMAN-00600: internal error, arguments [8714] [] [] [] [] ==== |
| - | Strangely, this means, in my particular case, that block change tracking is turned on in the target | + | Internal error displayed when trying to restore a database |
| - | It must be done while the auxiliary is in mount mode and restoring the datafiles (before recovery starts)<br /> | + | < |
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-03002: failure of restore command at 01/04/2022 16:16:24 | ||
| + | RMAN-00600: internal error, arguments [8714] [] [] [] [] | ||
| + | |||
| + | </ | ||
| + | As Oracle mentions [[https:// | ||
| + | |||
| + | Due to the fact that an alter database open resetlogs seems to be have done without being connected to the catalog, the said catalog is now confused as to which incarnation to use as current. The solution is either: | ||
| + | * Restore the database without a catalog connection | ||
| + | * Tell the catalog which incarnation to use | ||
| + | < | ||
| + | RMAN> list incarnation of database; | ||
| + | |||
| + | |||
| + | List of Database Incarnations | ||
| + | DB Key Inc Key DB Name DB ID STATUS | ||
| + | ------- ------- -------- ---------------- --- ---------- ---------- | ||
| + | 551048814 551050752 EBST | ||
| + | 551048814 551048815 EBST | ||
| + | 551048814 741634576 EBST | ||
| + | |||
| + | RMAN> reset database to incarnation 551048815; | ||
| + | |||
| + | database reset to incarnation 551048815 | ||
| + | |||
| + | RMAN> list incarnation of database; | ||
| + | |||
| + | |||
| + | List of Database Incarnations | ||
| + | DB Key Inc Key DB Name DB ID STATUS | ||
| + | ------- ------- -------- ---------------- --- ---------- ---------- | ||
| + | 551048814 551050752 EBST | ||
| + | 551048814 551048815 EBST | ||
| + | 551048814 741634576 EBST | ||
| + | |||
| + | RMAN> | ||
| + | </ | ||
| + | |||
| + | ==== RMAN-06004: ORACLE error from recovery catalog database: RMAN-20242: specification does not match any archived log in the repository ==== | ||
| + | After restoring archivelogs from log sequence, this error is shown. | ||
| + | < | ||
| + | RMAN> run { | ||
| + | 2> allocate channel t0 type sbt_tape; | ||
| + | 3> allocate channel t1 type sbt_tape; | ||
| + | 4> allocate channel t2 type sbt_tape; | ||
| + | 5> restore archivelog from logseq 40410 until logseq 45410; | ||
| + | 6> } | ||
| + | |||
| + | released channel: ORA_DISK_1 | ||
| + | allocated channel: t0 | ||
| + | channel t0: SID=406 device type=SBT_TAPE | ||
| + | channel t0: CommVault Systems for Oracle: Version 11.0.0(BUILD80) | ||
| + | |||
| + | allocated channel: t1 | ||
| + | channel t1: SID=421 device type=SBT_TAPE | ||
| + | channel t1: CommVault Systems for Oracle: Version 11.0.0(BUILD80) | ||
| + | |||
| + | allocated channel: t2 | ||
| + | channel t2: SID=436 device type=SBT_TAPE | ||
| + | channel t2: CommVault Systems for Oracle: Version 11.0.0(BUILD80) | ||
| + | |||
| + | Starting restore at 2022-01-04 21:33:17 | ||
| + | released channel: t0 | ||
| + | released channel: t1 | ||
| + | released channel: t2 | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-03002: failure of restore command at 01/04/2022 21:33:17 | ||
| + | RMAN-06004: ORACLE error from recovery catalog database: RMAN-20242: specification does not match any archived log in the repository | ||
| + | </ | ||
| + | |||
| + | Run a crosscheck of the archivelogs | ||
| + | < | ||
| + | RMAN> run { | ||
| + | allocate channel t0 type sbt_tape; | ||
| + | allocate channel t1 type sbt_tape; | ||
| + | allocate channel t2 type sbt_tape; | ||
| + | crosscheck archivelog all; | ||
| + | } | ||
| + | 2> 3> 4> 5> 6> | ||
| + | allocated channel: t0 | ||
| + | channel t0: SID=406 device type=SBT_TAPE | ||
| + | channel t0: CommVault Systems for Oracle: Version 11.0.0(BUILD80) | ||
| + | |||
| + | allocated channel: t1 | ||
| + | channel t1: SID=421 device type=SBT_TAPE | ||
| + | channel t1: CommVault Systems for Oracle: Version 11.0.0(BUILD80) | ||
| + | |||
| + | allocated channel: t2 | ||
| + | channel t2: SID=436 device type=SBT_TAPE | ||
| + | channel t2: CommVault Systems for Oracle: Version 11.0.0(BUILD80) | ||
| + | |||
| + | validation succeeded for archived log | ||
| + | archived log file name=/ | ||
| + | validation succeeded for archived log | ||
| + | archived log file name=/ | ||
| + | validation succeeded for archived log | ||
| + | archived log file name=/ | ||
| + | validation succeeded for archived log | ||
| + | archived log file name=/ | ||
| + | validation succeeded for archived log | ||
| + | archived log file name=/ | ||
| + | validation succeeded for archived log | ||
| + | archived log file name=/ | ||
| + | validation succeeded for archived log | ||
| + | archived log file name=/ | ||
| + | ... | ||
| + | archived log file name=/ | ||
| + | Crosschecked 46 objects | ||
| + | |||
| + | released channel: t0 | ||
| + | released channel: t1 | ||
| + | released channel: t2 | ||
| + | |||
| + | RMAN> exit | ||
| + | |||
| + | Recovery Manager complete. | ||
| + | </ | ||
| + | Then attempt to open the database | ||
| + | < | ||
| + | sqlplus / as sysdba | ||
| + | |||
| + | SQL*Plus: Release 12.1.0.2.0 Production on Tue Jan 4 21:35:31 2022 | ||
| + | |||
| + | Copyright (c) 1982, 2014, Oracle. | ||
| + | |||
| + | |||
| + | Connected to: | ||
| + | Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production | ||
| + | With the Partitioning, | ||
| + | |||
| + | SQL> alter database open resetlogs; | ||
| + | |||
| + | Database altered. | ||
| + | |||
| + | SQL> | ||
| + | </ | ||
| + | |||
| + | ==== RMAN-06004: ORACLE error from recovery catalog database: RMAN-20003: target database incarnation not found in recovery catalog ==== | ||
| + | === Problem: === | ||
| + | < | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-03002: failure of Duplicate Db command at 12/05/2017 11:11:15 | ||
| + | RMAN-05501: aborting duplication of target database | ||
| + | RMAN-03015: error occurred in stored script Memory Script | ||
| + | RMAN-06004: ORACLE error from recovery catalog database: RMAN-20003: target database incarnation not found in recovery catalog | ||
| + | </ | ||
| + | === Solution: === | ||
| + | Strangely, this means, in my particular case, that block change tracking is turned on in the target | ||
| + | It must be done while the auxiliary is in mount mode and restoring the datafiles (before recovery starts)\\ | ||
| It is reported to be a bug fixed in 11.1 but somehow, we're still (sometimes) getting it in 12.1.0.2. | It is reported to be a bug fixed in 11.1 but somehow, we're still (sometimes) getting it in 12.1.0.2. | ||
| - | =====RMAN-06059: | + | ==== RMAN-06059: expected archived log not found, loss of archived log compromises recoverability ==== |
| - | < | + | < |
| - | This error can come from the fact that the database files (more likely archivelogs) are being deleted by the operating system so RMAN has no clue of their whereabouts.<br /> | + | RMAN-06059: expected archived log not found, loss of archived log compromises recoverability |
| - | Possibly result of a database duplication and the catalog has not updated properly?<br /> | + | ORA-19625: error identifying file < |
| - | ====Solution==== | + | </ |
| - | < | + | This error can come from the fact that the database files (more likely archivelogs) are being deleted by the operating system so RMAN has no clue of their whereabouts.\\ |
| + | Possibly result of a database duplication and the catalog has not updated properly?\\ | ||
| + | === Solution === | ||
| + | < | ||
| + | crosscheck archivelog all; | ||
| + | </ | ||
| And then maybe take a backup to be on the safe side. | And then maybe take a backup to be on the safe side. | ||
| - | =====RMAN-05537: | + | ==== RMAN-05537: DUPLICATE without TARGET connection when auxiliary instance is started with spfile cannot use SPFILE clause ==== |
| - | ====Problem:==== | + | === Problem: === |
| - | < | + | < |
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-03002: failure of Duplicate Db command at 12/05/2017 14:17:49 | ||
| + | RMAN-05501: aborting duplication of target database | ||
| + | RMAN-05537: DUPLICATE without TARGET connection when auxiliary instance is started with spfile cannot use SPFILE clause | ||
| + | </ | ||
| Usually happens after restarting a failed RMAN DUPLICATE database. The spfile has been regenerated on the auxiliary to a level where it has too much detail in it. | Usually happens after restarting a failed RMAN DUPLICATE database. The spfile has been regenerated on the auxiliary to a level where it has too much detail in it. | ||
| - | ====Solution: | + | === Solution: === |
| - | < | + | < |
| + | $ cd $ORACLE_HOME/ | ||
| + | $ ls -altr *dwh_perf* | ||
| + | -rw-r----- | ||
| + | -rw-r----- | ||
| + | -rw-r--r-- | ||
| + | -rw-r----- | ||
| + | -rw-rw---- | ||
| + | $ mv hc_dwh_perf.dat hc_dwh_perf.dat.old | ||
| + | $ mv spfiledwh_perf.ora spfiledwh_perf.ora.old | ||
| + | $ cat initdwh_perf.ora | ||
| + | sga_max_size=' | ||
| + | sga_target=' | ||
| + | compatible=' | ||
| + | db_files=' | ||
| + | |||
| + | - Instance name | ||
| + | db_name=dwh_perf | ||
| + | </ | ||
| Re-run the DUPLICATE. It should zoom past the already recovered datafiles. | Re-run the DUPLICATE. It should zoom past the already recovered datafiles. | ||
| - | =====PSDRPC returns significant error 1013===== | + | ==== RMAN-11003: failure during parse/ |
| - | < | + | < |
| - | ====Action==== | + | RMAN-00571: =========================================================== |
| + | RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-03002: failure of Duplicate Db command at 11/07/2019 18:01:02 | ||
| + | RMAN-05501: aborting duplication of target database | ||
| + | RMAN-03015: error occurred in stored script Memory Script | ||
| + | RMAN-11003: failure during parse/ | ||
| + | ORA-00308: cannot open archived log '/ | ||
| + | ORA-27037: unable to obtain file status | ||
| + | IBM AIX RISC System/6000 Error: 2: No such file or directory | ||
| + | Additional information: | ||
| + | |||
| + | Recovery Manager complete. | ||
| + | </ | ||
| + | or | ||
| + | < | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-03002: failure of Duplicate Db command at 12/06/2019 20:56:59 | ||
| + | RMAN-05501: aborting duplication of target database | ||
| + | RMAN-03015: error occurred in stored script Memory Script | ||
| + | RMAN-11003: failure during parse/ | ||
| + | ORA-10877: error signaled in parallel recovery slave | ||
| + | </ | ||
| + | |||
| + | No real clues here but it is the block change tracking file that is active on the source and must be disabled on the destination before recovery starts. So as soon as the controlfile has been restored and the database mounted, login to another session, connect to the database and issue | ||
| + | < | ||
| + | SQL> alter database disable block change tracking; | ||
| + | |||
| + | Database altered. | ||
| + | |||
| + | SQL> exit | ||
| + | </ | ||
| + | The DUPLICATE should then continue to recover correctly. | ||
| + | |||
| + | ==== PSDRPC returns significant error 1013 ==== | ||
| + | < | ||
| + | archived log thread=1 sequence=195008 | ||
| + | channel t2: reading from backup piece arclog_LBK_4260753020_946042770_479194_1 | ||
| + | channel t0: piece handle=arclog_LBK_4260753020_946042770_479192_1 tag=TAG20170607T133757 | ||
| + | channel t0: restored backup piece 1 | ||
| + | channel t0: restore complete, elapsed time: 00:00:35 | ||
| + | archived log file name=/ | ||
| + | PSDRPC returns significant error 1013. | ||
| + | PSDRPC returns significant error 1013. | ||
| + | released channel: t0 | ||
| + | released channel: t1 | ||
| + | released channel: t2 | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-03002: failure of Duplicate Db command at 06/09/2017 15:15:04 | ||
| + | RMAN-05501: aborting duplication of target database | ||
| + | RMAN-03015: error occurred in stored script Memory Script | ||
| + | RMAN-11003: failure during parse/ | ||
| + | ORA-10877: error signaled in parallel recovery slave | ||
| + | |||
| + | Recovery Manager complete. | ||
| + | </ | ||
| + | === Action === | ||
| Check the alert log on the auxiliary instance. | Check the alert log on the auxiliary instance. | ||
| - | < | + | < |
| + | ORA-279 signalled during: alter database recover logfile '/ | ||
| + | alter database recover logfile '/ | ||
| + | Media Recovery Log / | ||
| + | Fri Jun 09 07:30:30 2017 | ||
| + | Errors with log / | ||
| + | Recovery interrupted! | ||
| + | Recovered data files to a consistent state at change 238029030495 | ||
| + | Media Recovery failed with error 19755 | ||
| + | Errors in file / | ||
| + | ORA-00283: recovery session canceled due to errors | ||
| + | ==== > | ||
| + | ==== > | ||
| + | ==== > | ||
| + | ==== >IBM AIX RISC System/6000 Error: 2: No such file or directory | ||
| + | Additional information: | ||
| + | Fri Jun 09 07:30:36 2017 | ||
| + | ORA-10877 signalled during: alter database recover logfile '/ | ||
| + | Fri Jun 09 14:04:57 2017 | ||
| + | alter database recover logfile '/ | ||
| + | Media Recovery Log / | ||
| + | Media Recovery failed with error 1112 | ||
| + | ORA-283 signalled during: alter database recover logfile '/ | ||
| + | Fri Jun 09 14:31:20 2017 | ||
| + | Shutting down instance (immediate) | ||
| + | Shutting down instance: further logons disabled | ||
| + | Stopping background process MMNL | ||
| + | Stopping background process MMON | ||
| + | License high water mark = 49 | ||
| + | ALTER DATABASE CLOSE NORMAL | ||
| + | ORA-1109 signalled during: ALTER DATABASE CLOSE NORMAL... | ||
| + | ALTER DATABASE DISMOUNT | ||
| + | Shutting down archive processes | ||
| + | Archiving is disabled | ||
| + | Completed: ALTER DATABASE DISMOUNT | ||
| + | ARCH: Archival disabled due to shutdown: 1089 | ||
| + | Shutting down archive processes | ||
| + | Archiving is disabled | ||
| + | ARCH: Archival disabled due to shutdown: 1089 | ||
| + | Shutting down archive processes | ||
| + | Archiving is disabled | ||
| + | Fri Jun 09 14:31:24 2017 | ||
| + | </ | ||
| This is a known bug. it is fixed in 11.2.0.3 but... this customer does not apply patches! | This is a known bug. it is fixed in 11.2.0.3 but... this customer does not apply patches! | ||
| - | ====Solution==== | + | === Solution === |
| While the DUPLICATE is running (and in MOUNT mode), log on to the auxiliary instance and disable block change tracking. | While the DUPLICATE is running (and in MOUNT mode), log on to the auxiliary instance and disable block change tracking. | ||
| - | < | + | < |
| - | A documented workaround is to set db_filename_convert parameter in the DUPLICATE clause of the run block but I tried this and it failed again.<br /> | + | alter database disable block change tracking; |
| + | </ | ||
| + | A documented workaround is to set db_filename_convert parameter in the DUPLICATE clause of the run block but I tried this and it failed again.\\ | ||
| The obvious solution is to patch the database but... | The obvious solution is to patch the database but... | ||
| - | =====Database trigger to capture ORA errors===== | + | ==== Database trigger to capture ORA errors ==== |
| From [[http:// | From [[http:// | ||
| - | < | + | < |
| + | CREATE TABLE stats$error_log ( | ||
| + | err_dt | ||
| + | db_user | ||
| + | msg_stack | ||
| + | sqltxt | ||
| + | tablespace users; | ||
| + | </ | ||
| Now, create a trigger on the database server. | Now, create a trigger on the database server. | ||
| - | < | + | < |
| + | CREATE OR REPLACE TRIGGER log_server_errors | ||
| + | AFTER SERVERERROR | ||
| + | ON DATABASE | ||
| + | DECLARE | ||
| + | v_sqltext VARCHAR2(1000); | ||
| + | nl_sqltext ora_name_list_t; | ||
| + | BEGIN | ||
| + | -- Capture entire error text | ||
| + | FOR i IN 1 .. ora_sql_txt(nl_sqltext) LOOP | ||
| + | v_sqltext := v_sqltext || nl_sqltext(i); | ||
| + | END LOOP; | ||
| + | INSERT INTO STATS$ERROR_LOG | ||
| + | (err_dt, db_user, msg_stack, sqltxt) | ||
| + | VALUES | ||
| + | (systimestamp, | ||
| + | | ||
| + | | ||
| + | END log_server_errors; | ||
| + | / | ||
| + | </ | ||
| - | =====ORA-19809: | + | ==== ORA-19809: limit exceeded for recovery files ==== |
| - | < | + | < |
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-03009: failure of backup command on ORA_DISK_1 channel at 07/15/2013 10:10:59 | ||
| + | ORA-19809: limit exceeded for recovery files | ||
| + | ORA-19804: cannot reclaim 274716160 bytes disk space from 1468006400 limit | ||
| + | </ | ||
| - | < | + | < |
| + | ORA-19809: limit exceeded for recovery files | ||
| + | Cause: The limit for recovery files specified by the db_recovery_file_dest_size was exceeded. | ||
| + | |||
| + | Action: The error is accompanied by 19804. See message 19804 for further details | ||
| + | |||
| + | ORA-19804: cannot reclaim string bytes disk space from string limit | ||
| + | Cause: Oracle cannot reclaim disk space of specified bytes from the DB_RECOVERY_FILE_DEST_SIZE limit. | ||
| + | |||
| + | Action: There are five possible solutions: | ||
| + | 1) Take frequent backup of recovery area using RMAN. | ||
| + | 2) Consider changing RMAN retention policy. | ||
| + | 3) Consider changing RMAN archivelog deletion policy. | ||
| + | 4) Add disk space and increase DB_RECOVERY_FILE_DEST_SIZE. | ||
| + | 5) Delete files from recovery area using RMAN. | ||
| + | </ | ||
| The solution here is to increase the value of db_recovery_file_dest_size but it might also indicate a problem with tapes if the archivelogs are being backed up to tape via tdpo. | The solution here is to increase the value of db_recovery_file_dest_size but it might also indicate a problem with tapes if the archivelogs are being backed up to tape via tdpo. | ||
| - | < | + | < |
| + | SYS@DN7> alter system set db_recovery_file_dest_size=4000M scope=both; | ||
| + | |||
| + | System altered. | ||
| + | |||
| + | </ | ||
| Looking into int further, saw RMAN parameters missing... | Looking into int further, saw RMAN parameters missing... | ||
| - | < | + | < |
| - | =====RMAN-00554: | + | CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 14 DAYS; |
| + | CONFIGURE BACKUP OPTIMIZATION OFF; | ||
| + | CONFIGURE DEFAULT DEVICE TYPE TO ' | ||
| + | CONFIGURE CONTROLFILE AUTOBACKUP ON; | ||
| + | CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE ' | ||
| + | CONFIGURE DEVICE TYPE ' | ||
| + | </ | ||
| + | ==== RMAN-00554: initialization of internal recovery manager package failed ==== | ||
| Getting this error after migrating a database from one machine to another and attaching to a nice new version 12c catalog on the new server | Getting this error after migrating a database from one machine to another and attaching to a nice new version 12c catalog on the new server | ||
| - | < | + | < |
| - | We cannot connect to the catalog via rman but there is no problem if connecting via SQL*Plus!<br /> | + | Recovery Manager: Release 11.2.0.2.0 - Production on Sat Jun 21 13:16:24 2014 |
| + | |||
| + | Copyright (c) 1982, 2009, Oracle and/or its affiliates. | ||
| + | |||
| + | connected to target database: SPMSUPP1 (DBID=3026014394) | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== | ||
| + | RMAN-00571: =========================================================== | ||
| + | RMAN-00554: initialization of internal recovery manager package failed | ||
| + | RMAN-04004: error from recovery catalog database: ORA-01017: invalid username/ | ||
| + | </ | ||
| + | We cannot connect to the catalog via rman but there is no problem if connecting via SQL*Plus!\\ | ||
| Solution: relink the rman executable. | Solution: relink the rman executable. | ||
| - | =====Using AIX commands genld, genkld and slibclean to avoid library file locking errors (libjox) (Doc ID 739963.1)===== | + | ==== Using AIX commands genld, genkld and slibclean to avoid library file locking errors (libjox) (Doc ID 739963.1) ==== |
| - | * [[https:// | + | * [[https:// |
| - | When installing interim (one-off) patches, CPU patches or patchsets, you may encounter some errors with regards to files being locked or oui/opatch being unable to copy files<br /> | + | When installing interim (one-off) patches, CPU patches or patchsets, you may encounter some errors with regards to files being locked or oui/opatch being unable to copy files\\ |
| - | even though the databases, listeners and all other Oracle processes associated with the ORACLE_HOME to be patched were stopped.<br /> | + | even though the databases, listeners and all other Oracle processes associated with the ORACLE_HOME to be patched were stopped.\\ |
| - | This could be as result of a process which requires termination or an additional file needing to be unloaded from the system cache.<br /> | + | This could be as result of a process which requires termination or an additional file needing to be unloaded from the system cache.\\ |
| Run following commands to clean up... | Run following commands to clean up... | ||
| - | < | + | < |
| + | genld -l | grep < | ||
| + | </ | ||
| If genld returns data then a currently executing process has something open in the ORACLE_HOME directory, therefore terminate the process as required/ | If genld returns data then a currently executing process has something open in the ORACLE_HOME directory, therefore terminate the process as required/ | ||
| - | < | + | < |
| + | genkld | grep < | ||
| + | </ | ||
| If the genkld command | If the genkld command | ||
| - | < | + | < |
| - | =====ORA-20011: | + | / |
| - | This seems to be related to orphaned | + | </ |
| - | * Check no datapump jobs are running | + | ==== ORA-1652: unable to extend temp segment by 512 in tablespace TEMP_SYSTEM ==== |
| - | < | + | Noticed this after patching. datapatch was failing with these errors in the alertlog |
| - | * Find orphaned tables | + | < |
| - | < | + | ORA-1652: unable to extend temp segment by 512 in tablespace TEMP_SYSTEM |
| - | Check that any rows seen are actually external tables | + | Unable to obtain current patch information due to error: 20001, ORA-20001: Latest xml inventory is not loaded into table |
| - | < | + | ORA-06512: at " |
| - | * Drop the tables if they are not currently being used (no datapump jobs running) | + | ORA-06512: at " |
| - | < | + | ORA-06512: at " |
| - | =====ORA-01547: | + | ORA-06510: PL/SQL: unhandled user-defined exception |
| + | ORA-06512: at " | ||
| + | ORA-29913: error in executing ODCIEXTTABLEFETCH callout | ||
| + | ORA-01652: unable to extend temp segment by 512 in tablespace TEMP_SYSTEM | ||
| + | ORA-06512: at " | ||
| + | ORA-06512: at " | ||
| + | ORA-06512: at " | ||
| + | ORA-06512: at " | ||
| + | </ | ||
| + | There were already 2 tempfiles in TEMP_SYSTEM so it was unlikely to need another. While attempting to rebuild the temp tablespaces, | ||
| + | < | ||
| + | select name,status from v$tempfile; | ||
| + | |||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | </ | ||
| + | < | ||
| + | alter database tempfile '/ | ||
| + | alter database tempfile '/ | ||
| + | </ | ||
| + | Retry the datapatch and we're all good again! | ||
| + | |||
| + | ==== ORA-20011: Approximate NDV failed: ORA-29913: error in executing ODCIEXTTABLEOPEN callout ==== | ||
| + | * [[https:// | ||
| + | |||
| + | This seems to be related to orphaned | ||
| + | * Check no datapump jobs are running | ||
| + | < | ||
| + | select * from dba_datapump_jobs; | ||
| + | </ | ||
| + | * Find orphaned tables | ||
| + | < | ||
| + | set lines 2000 | ||
| + | select owner | ||
| + | , object_name | ||
| + | , object_type | ||
| + | , status | ||
| + | , to_char(created,' | ||
| + | , to_char(last_ddl_time,' | ||
| + | from | ||
| + | where 1=1 | ||
| + | and object_name like ' | ||
| + | </ | ||
| + | Check that any rows seen are actually external tables | ||
| + | < | ||
| + | select owner | ||
| + | , table_name | ||
| + | , default_directory_name | ||
| + | , access_type | ||
| + | from | ||
| + | order by 1,2 | ||
| + | </ | ||
| + | * Drop the tables if they are not currently being used (no datapump jobs running) | ||
| + | < | ||
| + | drop table && | ||
| + | </ | ||
| + | |||
| + | Another case, in alertlog we see | ||
| + | < | ||
| + | Begin automatic SQL Tuning Advisor run for special tuning task " | ||
| + | Wed Apr 15 23:00:09 2020 | ||
| + | DBMS_STATS: GATHER_STATS_JOB encountered errors. | ||
| + | Errors in file / | ||
| + | ORA-20011: Approximate NDV failed: ORA-29913: error in executing ODCIEXTTABLEOPEN callout | ||
| + | ORA-29400: data cartridge error | ||
| + | KUP-04040: file ODGRAYDON.txt in EXTSQL_GRAYDON not found | ||
| + | Wed Apr 15 23:23:02 2020 | ||
| + | End automatic SQL Tuning Advisor run for special tuning task " | ||
| + | </ | ||
| + | In the mentioned tracefile, we see | ||
| + | < | ||
| + | *** 2020-04-15 23: | ||
| + | DBMS_STATS: GATHER_STATS_JOB: | ||
| + | DBMS_STATS: ORA-20011: Approximate NDV failed: ORA-29913: error in executing ODCIEXTTABLEOPEN callout | ||
| + | ORA-29400: data cartridge error | ||
| + | KUP-04040: file ODGRAYDON.txt in EXTSQL_GRAYDON not found | ||
| + | |||
| + | *** 2020-04-15 23: | ||
| + | DBMS_STATS: GATHER_STATS_JOB: | ||
| + | DBMS_STATS: ORA-20011: Approximate NDV failed: ORA-29913: error in executing ODCIEXTTABLEOPEN callout | ||
| + | ORA-29400: data cartridge error | ||
| + | KUP-04040: file ODGRAYDON_C.txt in EXTSQL_GRAYDON not found | ||
| + | </ | ||
| + | We see in this example that the gather_stats job is trying to access lbk.graydon_bulk which we can also see is an external table referencing ODGRAYDON.txt in whatever directory EXTSQL_GRAYDON is pointing to.\\ | ||
| + | Checking that directory on the filesystem, those files are indeed missing.\\ | ||
| + | The solution would be to drop those dictionary tables that refer to the files. | ||
| + | < | ||
| + | drop table lbk.graydon_bulk; | ||
| + | drop table lbk.graydon_bulk_c; | ||
| + | </ | ||
| + | |||
| + | ==== Environment variable ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to database unique name. ==== | ||
| + | When trying to start the Grid agent with | ||
| + | < | ||
| + | emctl start agent | ||
| + | </ | ||
| + | that error is seen. Try checking the PATH variable! IS the agent home at the beginning or is there some other home before it? Se tthe agent home at the beginning of the PATH and try again. | ||
| + | < | ||
| + | (0) agent oracle@hn5115:/ | ||
| + | Oracle Enterprise Manager Cloud Control 13c Release 3 | ||
| + | Copyright (c) 1996, 2018 Oracle Corporation. | ||
| + | Starting agent ............................................... started. | ||
| + | </ | ||
| + | |||
| + | ==== EM13c : Agent Causes High CPU And Hangs The Server (Doc ID 2213714.1) ==== | ||
| + | No specific errors but alerts generated by O/S team showing high CPU usage and the java process for the agent consistently shows on top of topas listing.\\ | ||
| + | Solution is to modify a value in emd.properties file, add a line to s_jvm_options.opt and restart the agent. | ||
| + | |||
| + | * Set the environment to the agent | ||
| + | * Find the name of the properties file | ||
| + | < | ||
| + | vi $(awk -F':' | ||
| + | </ | ||
| + | * Back this file up | ||
| + | * Modify agentJavaDefines=-Xmx128M to agentJavaDefines=-Xmx1024M | ||
| + | * Find the name of the options file | ||
| + | < | ||
| + | vi $(awk -F':' | ||
| + | </ | ||
| + | * Back this file up | ||
| + | * Add -XX: | ||
| + | * Restart the agent | ||
| + | < | ||
| + | emctl stop agent | ||
| + | emctl start agent | ||
| + | </ | ||
| + | |||
| + | ==== EM 13.4: OMS Java Process Consuming High CPU and Causing Console Slowness / OMS Hung Intermittently (Doc ID 2702019.1) ==== | ||
| + | OMS java process uses high CPU due to java 1.8 using a lot higher codeCache than previous versions.\\ | ||
| + | Solution os to increase the codeCacheSize from 100M to at least 512M and restart the oms. | ||
| + | |||
| + | * Set the environment to the oms | ||
| + | * Check the current value | ||
| + | < | ||
| + | emctl get property -name JAVA_EM_ARGS | ||
| + | </ | ||
| + | can also be seen in a ps listing | ||
| + | < | ||
| + | ps -ef | grep EMGC_OMS | grep ReservedCodeCacheSize | ||
| + | </ | ||
| + | |||
| + | * Set a higher value | ||
| + | < | ||
| + | emctl set property -name JAVA_EM_ARGS -value " | ||
| + | </ | ||
| + | |||
| + | * Restart the oms | ||
| + | < | ||
| + | emctl stop oms -all | ||
| + | emctl start oms | ||
| + | </ | ||
| + | |||
| + | ==== ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below ==== | ||
| + | * [[https:// | ||
| Database is restored and now we want to recover it but we see this... | Database is restored and now we want to recover it but we see this... | ||
| - | < | + | < |
| - | This means that although we have restored the database, we are still missing information to complete the recovery. This information is contained in the archived redo logs which must also be restored (from tape if they are no longer on disk)<br /> | + | Starting recover at 24-JUL-15 11:26:19 |
| - | We can see here that we need an archive log with sequence number 69763. But what is the file called and where should it be restored to?<br /> | + | |
| + | starting media recovery | ||
| + | |||
| + | unable to find archive log | ||
| + | archive log thread=1 sequence=69763 | ||
| + | Oracle Error: | ||
| + | ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below | ||
| + | ORA-01194: file 1 needs more recovery to be consistent | ||
| + | ORA-01110: data file 1: '/ | ||
| + | |||
| + | released channel: c1 | ||
| + | </ | ||
| + | This means that although we have restored the database, we are still missing information to complete the recovery. This information is contained in the archived redo logs which must also be restored (from tape if they are no longer on disk)\\ | ||
| + | We can see here that we need an archive log with sequence number 69763. But what is the file called and where should it be restored to?\\ | ||
| For this we can go to SQL*Plus and get the database to tell us | For this we can go to SQL*Plus and get the database to tell us | ||
| - | < | + | < |
| + | recover database using backup controlfile until cancel; | ||
| + | </ | ||
| and cancel straight away. | and cancel straight away. | ||
| - | < | + | < |
| - | Now we see that we need to find a file called arch_TRSCRP1_1_69763.arc and put it in the directory / | + | ORA-00279: change 13796376414661 generated at 07/14/2015 13:20:07 needed for |
| - | This will continue up until the time specified for the recover so restore a whole bunch of them.<br /> | + | thread 1 |
| - | Repeat the " | + | ORA-00289: suggestion : / |
| + | ORA-00280: change 13796376414661 for thread 1 is in sequence #69763 | ||
| + | |||
| + | |||
| + | Specify log: {< | ||
| + | cancel | ||
| + | ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below | ||
| + | ORA-01194: file 1 needs more recovery to be consistent | ||
| + | ORA-01110: data file 1: '/ | ||
| + | |||
| + | |||
| + | ORA-01112: media recovery not started | ||
| + | |||
| + | </ | ||
| + | Now we see that we need to find a file called arch_TRSCRP1_1_69763.arc and put it in the directory / | ||
| + | This will continue up until the time specified for the recover so restore a whole bunch of them.\\ | ||
| + | Repeat the " | ||
| Type CANCEL when point is reached and | Type CANCEL when point is reached and | ||
| - | < | + | < |
| + | alter database open resetlogs; | ||
| + | </ | ||
| + | |||
| + | === ORA-01194: file 1 needs more recovery to be consistent === | ||
| + | Found another method online but I cannot see why it works... | ||
| + | < | ||
| + | SQL> shutdown immediate | ||
| + | ORA-01109: database not open | ||
| + | Database dismounted. | ||
| + | ORACLE instance shut down. | ||
| + | |||
| + | SQL> startup mount | ||
| + | ORACLE instance started. | ||
| + | |||
| + | Total System Global Area 530288640 bytes | ||
| + | Fixed Size 2131120 bytes | ||
| + | Variable Size | ||
| + | Database Buffers | ||
| + | Redo Buffers | ||
| + | Database mounted. | ||
| + | |||
| + | SQL> ALTER SYSTEM SET " | ||
| + | SQL> ALTER SYSTEM SET undo_management=MANUAL SCOPE = SPFILE; | ||
| + | |||
| + | SQL> shutdown immediate | ||
| + | ORA-01109: database not open | ||
| + | Database dismounted. | ||
| + | ORACLE instance shut down. | ||
| + | |||
| + | SQL> startup mount | ||
| + | ORACLE instance started. | ||
| + | |||
| + | Total System Global Area 530288640 bytes | ||
| + | Fixed Size 2131120 bytes | ||
| + | Variable Size | ||
| + | Database Buffers | ||
| + | Redo Buffers | ||
| + | Database mounted. | ||
| + | |||
| + | SQL> alter database open resetlogs; | ||
| + | |||
| + | Database altered. | ||
| + | |||
| + | SQL> CREATE UNDO TABLESPACE undo1 datafile '< | ||
| + | |||
| + | Tablespace created. | ||
| + | |||
| + | SQL> ALTER SYSTEM SET undo_tablespace = undo1 SCOPE=spfile; | ||
| + | System altered. | ||
| + | |||
| + | SQL> alter system set undo_management=auto scope=spfile; | ||
| + | System altered. | ||
| + | |||
| + | SQL> shutdown immediate | ||
| + | |||
| + | SQL> startup | ||
| + | </ | ||
| + | |||
| + | |||
oracle_errors.1544130327.txt.gz · Last modified: 2018/12/06 21:05 by 91.177.234.129
