Posts

Showing posts from April, 2017

Upload patch to OEM (12c/13c)

Image
EM 12c, EM 13c: How to upload a patch manually (Doc ID 1931686.1): Manually uploaded patches are shown in the Enterprise >> Provisioning and Patching >> Saved Patches page. This is also where you upload patches (from Desktop) First download the patch either from   Offline  - via a computer with a browser connected to the internet via  https://support.oracle.com  , search for the patch and then download to this computer locally. If this computer does not have access to the OMS then files needs to be transfered to a computer that does has access. or Online  - via the Enterprise Manager Cloud Console.  Go to Enterprise >> Provisioning and Patching >> Patches and Updates, search for the patch and download desktop (locally) OR download to Software Library The patch file, the format is p<patch_number>_<version>_<platform>.zip The patch metadata file, the format is p<patch_number>_<version>.American There is also the option to download the

TEMP Space usage is high in the database

Queries from V$BACKUP_PIECE_DETAILS or V$RMAN_STATUS Return Error ORA-01652 (Doc ID 2119607.1): SYMPTOMS: Querying V$BACKUP_PIECE_DETAILS results in ORA-01652: unable to extend temp segment Temporary tablespace can run out of space or become full and we may get error ORA-1652. This documents provides the queries to find out the SQL which is using these temp segments. Find Issue causing query with below: SELECT a.username, a.sid, a.serial#, a.osuser, b.tablespace, b.blocks, c.sql_text FROM v$session a, v$tempseg_usage b, v$sqlarea c WHERE a.saddr = b.session_addr AND c.address= a.sql_address AND c.hash_value = a.sql_hash_value ORDER BY b.tablespace, b.blocks; SQL> set pagesize 0 set feedback off select max(substr(handle,1,instr(handle,'/',-1,1))||'osfiles_'||sys_context('userenv','db_name')||'_'||substr(tag,-10)) from V$BACKUP_PIECE_DETAILS  where tag not like 'TAG%'; SQL> from V$BACKUP_PIECE_DETAILS   * ERROR at line 2: ORA-01652: u

Data block corruption on standby database

ORA-01578: ORACLE data block corrupted (file # 36, block # 19148) ORA-01110: data file 36: 'G:\ORADATA\NARENDER\POL.DBF' ORA-26040: Data block was loaded using the NOLOGGING option 1. List the files that have had nologging changes applied by querying the V$DATAFILE view on the standby database. For example: SQL> SELECT FILE#, to_char(FIRST_NONLOGGED_SCN) FROM V$DATAFILE WHERE FIRST_NONLOGGED_SCN > 0;      FILE# to_char(FIRST_NONLOGGED_SCN) ---------- ----------------------------------------          4 10239550638512          5 10235753270190          8 10239550889438         10 10239439045199         11 10239439045152         12 10239439045148         13 10239439045144         14 10239439045144         15 10239439045158         17 10239439045155 2. Stop Redo Apply on the standby database: SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL; 3. On the standby database, offline the datafiles (recorded in step 0) that have had nologging changes. Taking these dataf

Reset Root user password in Linux VMware

Reboot server press space enter 'e' select 2nd line (root=) and press 'e' next - press space bar and type '1 or one' - Enter type 'b' after reboot it will come to terminal mode in terminal mode: sudo passrd root - enter enter new password

Database Restore with RMAN Duplicate option

SQL>select current_scn from v$database; 7705798324 SQL> select timestamp_to_scn(to_timestamp('24/09/2012 14:24:54','DD/MM/YYYY HH24:MI:SS')) as scn from dual; SCN ---------- 7705798324 SQL> SQL> select scn_to_timestamp(7705798324) as timestamp from dual; 24-SEP-12 02.24.52.000000000 PM select scn_to_timestamp(481805) as timestamp from dual; select timestamp_to_scn(to_timestamp('13/11/2016 14:24:54','DD/MM/YYYY HH24:MI:SS')) as scn from dual; ============================================================================================================================================================================================== ***Shut down TEST database*** SQL> shut immediate; Database closed. Database dismounted. ORACLE instance shut down. ============================================================================================================================================================================================== ***Update