Skip to main content

Posts

SP2-0618: Cannot find the Session Identifier.

Today I could not enabled autorace and reason was SP2-0618. After looking for in google I found solution and now want to share it. SQL> set autotrace traceonly; SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled SP2-0611: Error enabling STATISTICS report To enable autotrace PLUSTRACE role should be exists! If not exists create it. Under $ORACLE_HOME\sqlplus\admin\ you may execute by SYS user  SQL> @$ORACLE_HOME\sqlplus\admin\plustrce.sql;  Another way you may just manually create plustrace role and assign select on necessary views; SQL> create role plustrace; Role created. SQL> grant select on v_$sesstat to plustrace; Grant succeeded. SQL> grant select on v_$statname to plustrace; Grant succeeded. SQL> grant select on v_$mystat to plustrace; Grant succeeded. SQL> grant plustrace to dba with admin option; Grant succeeded. At the end grant plustrace role to needed user; SQL> ...

Enable Archivelog mode on Oracle11g R2 RAC environment

Today I want to show you how to enable archivelog mode on Oracle 11g R2 RAC environment. 1. Checking log_mode: [oracle@rac1 acfs]$ export ORACLE_SID=RAC1 [oracle@rac1 acfs]$ sqlplus "/as sysdba" SQL> archive log list Database log mode No Archive Mode Automatic archival Disabled Archive destination USE_DB_RECOVERY_FILE_DEST Oldest online log sequence 9 Current log sequence 10 SQL> [oracle@rac2 acfs]$ export ORACLE_SID=RAC2 [oracle@rac2 acfs]$ sqlplus "/as sysdba" SQL*Plus: Release 11.2.0.1.0 Production on Mon Oct 13 18:13:53 2014 Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options SQL> select name, open_mode, log_mode from v$database; NAME OPEN_MODE LOG_MODE --------- -...

Error: ORA-16810: multiple errors or warnings detected

Today after restarting primary and standby database servers I faced with ORA-16810 error DGMGRL> show configuration; Configuration - DGMANAGER   Protection Mode: MaxAvailability   Databases:     XXXPROD - Primary database       Error: ORA-16810: multiple errors or warnings detected for the database     XXXSTND - Physical standby database       Error: ORA-01017: invalid username/password; logon denied Fast-Start Failover: DISABLED Configuration Status: ERROR I did not understand what and why it happened... After research I found that it was related password file of standby side. DGMGRL> show database 'XXXPROD'   Database - XXXPROD   Role:            PRIMARY   Intended State:  TRANSPORT-ON   Instance(s):     FCDBPROD       Error: ORA-16737: the redo transport service for standby database "XXXSTND" has an error ...

Warning: ORA-16826: apply service state is inconsistent with the DelayMins property

Today when I tested dataguard configuration I saw ORA-16826 error. DGMGRL> show configuration; Configuration - DGMANAGER   Protection Mode: MaxPerformance   Databases:     PROD   - Primary database     PRODST - Physical standby database       Warning: ORA-16826: apply service state is inconsistent with the DelayMins property Fast-Start Failover: DISABLED Configuration Status: WARNING DGMGRL> This is because I managed my standby database with NODELAY option. ALTER DATABASE RECOVER MANAGED STANDBY DATABASE  THROUGH ALL SWITCHOVER DISCONNECT  NODELAY; To fix this cancel recover managed: SQL> alter database recover managed standby database cancel; Database altered. Start with current logfile option: SQL> alter database recover managed standby database using current logfile disconnect; Database altered. Try again DGMGRL> show configuration; Configuration - DGMANAGER   Pr...

Online Patch Apply

Hello, Today I want to share my experience about online patching. Download needed patch : https://support.oracle.com For tutorial I got p16928674_112030_Generic.zip file. 1. Go to $ORACLE_HOME/Opatch dir and call opatch with parameters [oracle@dbserver OPatch]$ pwd /u01/app/oracle/product/11.2.0/db_1/OPatch [oracle@dbserver OPatch]$ ./opatch lsinventory Invoking OPatch 11.2.0.1.7 Oracle Interim Patch Installer version 11.2.0.1.7 Copyright (c) 2011, Oracle Corporation. All rights reserved. Oracle Home : /u01/app/oracle/product/11.2.0/db_1 Central Inventory : /u01/app/oraInventory from : /etc/oraInst.loc OPatch version : 11.2.0.1.7 OUI version : 11.2.0.3.0 Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2014-10-08_11-53-07AM.log Lsinventory Output file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2014-10-08_11-53-07AM.txt -------------------------...

Forgot sysman password ?

Today I could not remember sysman password for database grid control. How carefully may I change sysman password ? Just follow. 1. Stop OMS (go to OMS dir) [oracle@gridrepo bin]$ ./emctl stop oms Oracle Enterprise Manager 11g Release 1 Grid Control Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved. Stopping WebTier... WebTier Successfully Stopped Stopping Oracle Management Server... Oracle Management Server Successfully Stopped Oracle Management Server is Down 2. Config oms password with -change_repos_pwd parameter [oracle@gridrepo bin]$ ./emctl config oms -change_repos_pwd Oracle Enterprise Manager 11g Release 1 Grid Control Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved. -change_in_db option not specified. Password not changed in backend. Enter Repository User's New Password : Updating repository password in Credential Store... Repository password in Credential Store updated successfully. ...

Add, enable, disable service using srvctl

A brief post about add||enable||disable service using SRVCTL. [oracle@oralab1 dbhome_1]$ srvctl config database orcl [oracle@oralab1 dbhome_1]$ srvctl config database -d orcl Database unique name: orcl Database name: orcl Oracle home: /u01/app/oracle/product/11.2.0/dbhome_1 Oracle user: oracle Spfile: +DATA/orcl/spfileorcl.ora Domain: Start options: open Stop options: immediate Database role: PRIMARY Management policy: AUTOMATIC Database instance: orcl Disk Groups: DATA Services: --There is no any service(s). --create new service: SQL> begin 2 dbms_service.create_service('NEWORCL','NEWORCL'); 3 end; 4 / PL/SQL procedure successfully completed. SQL> select name, enabled from dba_services; NAME ENA --------------------------------- --------------------------- SYS$BACKGROUND NO SYS$USERS NO NEWORCL ...