Skip to main content

Posts

Solution to Problem: "ORA-01665: control file is not a standby control file"

Solution to Problem:   "ORA-01665: control file is not a standby control file" The Solution is to put the command to tell dataguard that this is physical standby. ALTER DATABASE CONVERT TO PHYSICAL STANDBY; Steps: SQL>  STARTUP MOUNT SQL>   SELECT database_role FROM v$database; DATABASE_ROLE —————- PRIMARY SQL>  ALTER DATABASE CONVERT TO PHYSICAL STANDBY ; SQL>  STARTUP MOUNT SQL>  SELECT database_role FROM v$database; DATABASE_ROLE —————- PHYSICAL STANDBY SQL>  ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT; So, now the control file is for Physical Standby database.

How to grant select on v$session

How to grant select on v$session SQL> grant select on v$session to test; grant select on v$session to test ORA-02030: can only select from fixed tables/views SQL> select OWNER,OBJECT_NAME,OBJECT_TYPE from dba_objects where OBJECT_NAME='V$SESSION'; OWNER                          OBJECT_NAME                                                                      OBJECT_TYPE ------------------------------ -------------------------------------------------------------------------------- ------------------- PUBLIC                         V$SESSION                                        ...

EXPDP error ORA-39001: invalid argument value and ORA-01775: looping chain of synonyms

EXPDP error ORA-39001: invalid argument value  and  ORA-01775: looping chain of synonyms After issuing expdp command the following errors were occured: ORA-39001: invalid argument value ORA-01775: looping chain of synonyms The solution is so simple in this case. You have to find the synonym which was creating problem. Issue the following command: Select owner, object_name, object_type, status   from dba_objects  where object_name like '%SYS_EXPORT_%'; Drop the synonym or all the synonym found in this query. drop public synonym SYS_EXPORT_SCHEMA_01; Now run the expdp command again. ======================================================= Happy to help !!!

MRP: Background Media Recovery process shutdown or NO MRP0 EXISTS !

MRP: Background Media Recovery process shutdown  The main problem was standby db not applying the archive redo received from production DB. The MRP0 process was missing. When we query the following SQL it returned no rows. SQL> SELECT PROCESS FROM V$MANAGED_STANDBY WHERE PROCESS LIKE 'MRP%'; no rows returned. Suspicious list of errors showing on Standby Server alert: ORA-16401: archive log rejected by Remote File Server (RFS) MRP: Background Media Recovery process shutdown  To Drill down check the error message in dataguard status: select severity,        error_code,        message,        to_char(timestamp, 'DD-MON-YYYY HH24:MI:SS') "TIMESTAMP"   from v$dataguard_status  order by timestamp desc; You will find an error like following: MRP0: Detected orphaned datafiles!  This could be for two reason. 1. There may me UNNAMED datafiles To Check: select file#,name from ...

ORACLE FLASH RECOVERY AREA USAGE QUERY

FINDING ORACLE FLASH RECOVERY AREA USAGE SELECT NAME,        (SPACE_LIMIT / 1024 / 1024 / 1024) SPACE_LIMIT_GB,          ((SPACE_LIMIT - SPACE_USED + SPACE_RECLAIMABLE) / 1024 / 1024 / 1024) AS SPACE_AVAILABLE_GB,        ROUND((SPACE_USED - SPACE_RECLAIMABLE) / SPACE_LIMIT * 100, 1) AS PERCENT_FULL   FROM V$RECOVERY_FILE_DEST;

Unblock the agent in OEM 12C by performing an agent resync from the console

Unblock the agent in OEM 12 C  by performing an agent resync from the console I am using OEM 12 c. Today my EM page was showing that one of the agent in unreachable. So, first of all I tried to see the status of the agent and it showed me the agent is alright. [oracle@NODE4 bin]$ ./emctl status agent Oracle Enterprise Manager Cloud Control 12c Release 2 Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved. --------------------------------------------------------------- Agent Version     : 12.1.0.2.0 OMS Version       : (unknown) Protocol Version  : 12.1.0.1.0 Agent Home        : /home/dir/oemcc/agent_inst Agent Binaries    : /home/oracle/dir/core/12.1.0.2.0 Agent Process ID  : 5159 Parent Process ID : 5044 - - - - --------------------------------------------------------------- Agent is Running and Ready Then I tried to upload the agent and found the following error: [oracl...

How to delete/remove Management Agent from Oracle Enterprise Manager 12C

  1. Before you deinstall a Management Agent, do the following:     a. Stop the Agent using command from Management Agent home:                 cd /u01/oemcc_latest/core/12.1.0.2.0/bin/                 $ emctl stop agent     b. Wait for the Management Agent to go to the unreachable state in the Cloud Control console.     c. It is mandatory to delete the Management Agent and their monitored targets using any of the following methods: Remove the Agent target manually from the console: 1. Login to 12C Cloud Control 2. Navigate to Setup => Manage Cloud Control => Agents 3. Go to the Home page of the Agent that you want to remove 4. Expand the drop-down menu near the " Agent " 5. Expand the " Target Setup " option 6. Select " Remove Target "   ...

How to Create INCIDENT Package

How to Create INCIDENT Package You can create a logical package based on an incident number, a problem number, a problem key, or a time interval. Create a logical package such that it will be most useful to diagnose the error of your concern. Following are the method using which an incident package can be created : Creating package based on incident. Select correct incident if there are many incidents. adrci > SHOW INCIDENT adrci > IPS CREATE PACKAGE INCIDENT incident_number If there are multiple incident then add each of them using following command: adrci > IPS ADD INCIDENT incident_number PACKAGE package_number Once you have created a logical package using any methods, next step is to generate a physical package. adrci > IPS GENERATE PACKAGE package_number IN path Here path is the Hard disk location where the ZIP file will be generated. Note: Please see the metalink note 411.1 for further details.

ADRCI error - DIA-48448: This command does not support multiple ADR homes

ADRCI error - DIA-48448: This command does not support multiple ADR homes adrci> show control DIA-48448: This command does not support multiple ADR homes This error occurs due to multiple ADR home location. Solution is to set the ADRCI home for the instance you want to work. adrci> show homes ADR Homes:  diag/rdbms/DB1/DB1 diag/rdbms/DBISL/DBISL diag/rdbms/ultisl/ULTISL diag/tnslsnr/DCDBLIVE-3/listenerc diag/tnslsnr/DCDBLIVE-3/listeneri adrci> SET HOME  diag/rdbms/DB1/DB1 _________________________________________________________________________________

UDI-31623: operation generated ORACLE error 31623 / ORA-31623: a job is not attached to this session via the specified handle

UDI-31623: operation generated ORACLE error 31623 / ORA-31623: a job is not attached to this session via the specified handle While importing a dumpfile to a test server, the following error were raised. Through a tough time searching the solution, I discovered the solution from a post. My datapump command was like this: -bash-4.1$ impdp system/sys123 schemas=scott directory=db_pump dumpfile=BEF_EOD.dmp Import: Release 11.2.0.3.0 - Production on Mon Dec 31 03:30:01 2012 Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options UDI-31623: operation generated ORACLE error 31623 ORA-31623: a job is not attached to this session via the specified handle ORA-06512: at "SYS.DBMS_DATAPUMP", line 3326 ORA-06512: at "SYS.DBMS_DATAPUMP", line 4551 ORA-06512: at line 1 ...

Installing ORACLE 11g R2 on Linux 6.2

Installing ORACLE 11g R2 on Linux 6.2 Checking memory # grep MemTotal /proc/meminfo # grep SwapTotal /proc/meminfo # df -h /dev/shm/ # mount -t tmpfs tmpfs -o size=10000m /dev/shm # df -h /dev/shm/ Install All Packages Needed. Add entry in host file. #vi /etc/hosts Make entry like this: [IP]        [HOST_NAME] Open /etc/sysctl.conf and add the following lines: # Oracle settings fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmall = 2097152 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048586 net.ipv4.tcp_wmem = 262144 262144 262144 net.ipv4.tcp_rmem = 4194304 4194304 4194304 Refresh settings # /sbin/sysctl -p # /sbin/sysctl -q Open /etc/security/limits.conf and add these lines. oracle   ...

RMAN Restoration Failed due to Error: RMAN-03002, RMAN-06026 and RMAN-06023

While restoring a database using RMAN CLONING, I got the following errors. ________________________________________________________________________________ RMAN> restore database; Starting restore at 02-AUG-12 using channel ORA_DISK_1 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of restore command at 08/02/2012 11:16:52 RMAN-06026: some targets not found - aborting 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 1 found to restore _________________________________________________________________________________ After a thorough search, I found the command to check INCURNATION . After changing the incurnation the restore command worked. RMAN> li...

Query to check the OPTIMAL UNDO RETENTION

Query to check the OPTIMAL UNDO RETENTION _____________________________________________________________________________ SELECT d.undo_size / (1024 * 1024) "ACTUAL UNDO SIZE [MByte]",        SUBSTR(e.value, 1, 25) "UNDO RETENTION [Sec]",        ROUND((d.undo_size / (to_number(f.value) * g.undo_block_per_sec))) "OPTIMAL UNDO RETENTION [Sec]"   FROM (SELECT SUM(a.bytes) undo_size           FROM v$datafile a, v$tablespace b, dba_tablespaces c          WHERE c.contents = 'UNDO'            AND c.STATUS = 'ONLINE'            AND b.name = c.tablespace_name            AND a.ts# = b.ts#) d,        v$parameter e,        v$parameter f,        (SELECT MAX(undoblks / ((end_time - begin_time) * 3600 * 24)) undo_block_per_sec  ...

10g Release 2 (10.2.0.5) Patch Set 4 for Solaris Operating System (x86-64)

10g Release 2 (10.2.0.5) Patch Set 4 for Solaris Operating System (x86-64) PART ONE: Applying Patch___________________________________________________ Step 1:  Shut Down Oracle Databases SQL> shutdown immediate;  Shut down any existing Oracle Database instances with normal or immediate priority. On Oracle RAC systems, shut down all instances on each node. Step 2: Stopping All Processes for a Single Instance Installation Shut down the following Oracle Database 10g processes in the order specified before installing the patch set:  Shut down all processes in the Oracle home that might be accessing a database; for example, Oracle Enterprise Manager Database Control: $ emctl stop dbconsole $ lsnrctl stop Step 3: To install the Oracle Database 10g patch set interactively: a. Log in as the oracle user. b. Enter the following commands to start Oracle Universal Installer, where patchset_directory is the directory where you unpac...

Create Tablespace in ORACLE 10g

Create Tablespace in ORACLE 10g Permanent tablespace Adding Tablespace in database: CREATE SMALLFILE TABLESPACE  BU_SYSTEM_TBS  DATAFILE  '$DATAFILE_LOCATION/BU_SYSTEM_TBS'  SIZE  100M  AUTOEXTEND  ON  NEXT  1000M  MAXSIZE  UNLIMITED  LOGGING   EXTENT MANAGEMENT  LOCAL  SEGMENT SPACE MANAGEMENT  AUTO; Adding Datafile in a Tablespace: Use ALTER TABLESPACE to add datafile in tablespace: ALTER TABLESPACE BU_HIS_LOG_TBS ADD DATAFILE '$DATAFILE_LOCATION/BU_HISTLOG_TBS_01.dbf' SIZE 1000M AUTOEXTEND ON NEXT 20M MAXSIZE UNLIMITED; Modify Datafile: You can modify datafile using ALTER DATABASE command: ALTER DATABASE DATAFILE   ’$DATAFILE_LOCATION/data01.dbf’  AUTOEXTEND   ON   NEXT   30M   MAXSIZE   1200M; which means datafile data02.dbf can automatically grow upto 1200 MB size in blocks of 30 MB each time as required. Renami...

Starting and Stopping the Oracle Enterprise Manager Console

Starting and Stopping the Oracle Enterprise Manager Console To access the Oracle Enterprise  Manager Console from a client browser, the  dbconsole  process needs to be running on the server. The dbconsole process is automatically started after installation. However, in the event of a system restart,change in IP, or other changes, you can start it manually at the command line. To start the  dbconsole  process from the command line: Navigate into your  ORACLE_HOME/bin  directory. Run the following statement: ./emctl start dbconsole Additionally, you can stop the process and view its status. To stop the  dbconsole  process:          ./emctl stop dbconsole To view the status of the  dbconsole  process:         ./emctl status dbconsole -------------------------------------------------------------------------------------------------------

How to enable log shipping on Standby after failing archival.

The Primary Database was giving error in alert log that it was not able to send archivelogs to Standby. The error looked like the following: Tue Jun  5 10:31:36 2012 Errors in file /u01/oracle/admin/DB1/bdump/DB1_arcp_6846.trc: ORA-16055: FAL request rejected ARCH: FAL archive failed. Archiver continuing Diagnosis: To check the status of archiving the following sql was issued:   Check what is the destination status  select ds.dest_id                id,            ad.status,          ds.database_mode          db_mode,          ad.archiver               type,          ds.recovery_mode,          ds.protection_mode,          ds.standby_logfile_count  "SRLs",   ...