Wednesday, April 29, 2015

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

Got above issue while import a schema using IMPDP



DataPump Import Results In ORA-39001 Invalid Argument Value ORA-1775 Looping Chain Of Synonyms (Doc ID 459151.1)


Initially I checked for synonyms like SYS_IMPORT_SCHEMA, which resulted in no rows.
But we have to check for all the synonyms present for the IMPORT.

These synonyms are left over of the improper termination of imports 



diudbs01:sint4> select owner, object_name, object_type, status from dba_objects where object_name like '%SYS_IMPORT%';

OWNER                    OBJECT_NAME                    OBJECT_TYPE         STATUS
------------------------ ------------------------------ ------------------- -------
PUBLIC                   SYS_IMPORT_FULL_01             SYNONYM             VALID
PUBLIC                   SYS_IMPORT_FULL_02             SYNONYM             INVALID

diudbs01:sint4> drop public synonym SYS_IMPORT_FULL_02 ;

Synonym dropped.


diudbs01:sint4> drop public synonym SYS_IMPORT_FULL_01;

Synonym dropped.



Import ran fine after that

Tuesday, April 28, 2015

ORA-39006: internal error ORA-39213: Metadata processing is not available in EXPDP

I was getting this error when I do an schema export , Initial investigation suggested below fix

ORA-39006: internal error ORA-39213: 
Metadata processing is not available  in EXPDP

attempt 1:
hostname:dbname> SELECT comp_id, version, status FROM dba_registry;

COMP_ID                        VERSION                        STATUS
------------------------------ ------------------------------ -------------------
XDB                            11.2.0.3.0                     VALID
CATALOG                        11.2.0.3.0                     VALID
CATPROC                        11.2.0.3.0                     VALID

hostname:dbname> set timing on;
hostname:dbname> set time on;
15:47:57 hostname:dbname> exec dbms_metadata_util.load_stylesheets;

PL/SQL procedure successfully completed.

Elapsed: 00:00:03.77

I retried my export again and this time gave a different error

$ expdp \"sys/password@dbname as sysdba\" DIRECTORY=id_migartion SCHEMAS=USBAJA DUMPFILE=test.dmp LOGFILE=test.log

Export: Release 11.2.0.3.0 - Production on Tue Apr 28 15:48:21 2015

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
ORA-39006: internal error
ORA-39065: unexpected master process exception in DISPATCH
ORA-01403: no data found

ORA-39097: Data Pump job encountered unexpected error 100

attempt 2: Looking up for this issue , found a solution with note id

Errors ORA-39125 ORA-1403 ORA-39125 ORA-39065 ORA-39006 When Running A DataPump Import (Doc ID 789102.1)


hostname:dbname> select owner, object_name, object_type
     from   dba_objects
     where  object_name = 'DUAL';   2    3

OWNER                    OBJECT_NAME                    OBJECT_TYPE
------------------------ ------------------------------ -------------------
SYS                      DUAL                           TABLE
PUBLIC                   DUAL                           SYNONYM


But, It was not the case , there was no additional DUAL table in my database, searched more and found below note.

fix : DataPump Export Reports ORA-39097: Data Pump job encountered unexpected error 100 (Doc ID 453796.1)

This has fixed my issue ,

hostname:dbname> select count(*) from metanametrans$;

  COUNT(*)
----------
         0

hostname:dbname> @$ORACLE_HOME/rdbms/admin/catmet2.sql

PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.



PL/SQL procedure successfully completed.

hostname:dbname> hostname:dbname> @$ORACLE_HOME/rdbms/admin/utlrp.sql
.

Cause for the issue can be attributed to a recent XDB installation which done manually and not through oui.



Friday, April 17, 2015

Oracle ORA-00060 Troubleshooting Wizard

For troubleshooting the deadlock issue , there is one great tool oracle provides .It is  Oracle ORA-00060 Troubleshooting Wizard, it is part of RDA which oracle provides.

Let me demonstrate on how to use it .

first , download here https://support.oracle.com/epmos/faces/DocumentDisplay?parent=DOCUMENT&sourceId=1550091.2&id=314422.1#download  

Unzip the files , move in RDA/da directory


==> cd da
[DB]oracle@server:/opt/app/home/oracle/rda/da
==> ./da.sh menu menus/ora60.xml
           Oracle ORA-00060 Troubleshooting Wizard            04-17 11:55:27


  The ORA-00060 Troubleshooting Wizard Menu provides the automatic scanning
  of an alert log for ORA-00060 errors and subsequently providing the details
  of the deadlock along with suggested resolutions.  This menu also allows for
  you to perform these tasks separately.

  Select option 1 to begin automatic diagnosis:
    1 RECOMMENDED: Automatically diagnose latest ORA-00060 trace files
    2 Manually identify, then diagnose latest ORA-00060 trace files
    3 Determine an object name from the "dictionary objn" value
    4 Package Files for upload
    5 Package and Upload results to a SR
    6 Create Draft SR [MOS connection required]

    Help    Exit


             [ DA Output Usage: 56K, Free: 159.7G, %Disk Used: 19% ]

  Make Selection ==> 1

  Please enter the location to your Alert Log:
    ... DA_SESSION_ALERT_LOG_DIR=/opt/app/oracle/diag/rdbms/dbname/DBNAME/trace/alert_DBNAME.log
  ==>    Note: Only one choice available, auto-selected:1

JAVA collector running: Determine the type of ORA-00060 error you are encountering






Make sure you have set correct database environment , as its picks the database alert log automatically.




Tuesday, April 14, 2015

download oracle software using wget

To download a patch from OTN

select the patch you want to download and copy its link address

command to download:

/usr/sfw/bin/wget "https://updates.oracle.com/Orion/Download/process_form/p4547809_92080_SOLARIS64.zip?file_id=18098537&aru=8690061&userid=o-sameerahmed.siddique.ap@nielsen.com&email=sameerahmed.siddique.ap@nielsen.com&patch_password=&patch_file=p4547809_92080_SOLARIS64.zip" --no-check-certificate --http-user=sameerahmed.siddique.ap@nielsen.com --ask-password

Log:

==> /usr/sfw/bin/wget "https://updates.oracle.com/Orion/Download/process_form/p4547809_92080_SOLARIS64.zip?file_id=18098537&aru=8690061&userid=o-sameerahmed.siddique.ap@nielsen.com&email=sameerahmed.siddique.ap@nielsen.com&patch_password=&patch_file=p4547809_92080_SOLARIS64.zip" --no-check-certificate --http-user=sameerahmed.siddique.ap@nielsen.com --ask-password
Password:
--2015-04-14 13:40:40--  https://updates.oracle.com/Orion/Download/process_form/p4547809_92080_SOLARIS64.zip?file_id=18098537&aru=8690061&userid=o-sameerahmed.siddique.ap@nielsen.com&email=sameerahmed.siddique.ap@nielsen.com&patch_password=&patch_file=p4547809_92080_SOLARIS64.zip
Resolving updates.oracle.com... 141.146.44.51
Connecting to updates.oracle.com|141.146.44.51|:443... connected.
WARNING: cannot verify updates.oracle.com's certificate, issued by `/C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=Terms of use at https://www.verisign.com/rpa (c)10/CN=VeriSign Class 3 International Server CA - G3':
  Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://login.oracle.com/pls/orasso/orasso.wwsso_app_admin.ls_login?site2pstoretoken=v1.2~E4066BF0~0B55FD9A3F9D64F55E8DA694BF5D5BE1CC8EF8C98C36E56D91F6AED8320E520BB3FE5779B244BED60E7874E4179C4B977652FB63D1CF1CA5199D753DECCB14359DBBEFAF11A120AEBC3A5FB1D63F62764EEE5B28C474F75E1A0509AA08C9E5CE4433B907074645EDA711AC5C974AA9B287BAD00E311EA79D7D98E43DBDBE0F6C2FBD95DA6FD211825382930D4FC33AF95C4CE4FBA0D6442C4458E388B7D27AF6ACC2F4CBCDD6B6A4FF479319F093A81ABF813DBF43EB839B0E479786FBA619EF5BDC57F9A0CD95C8AA269C08306814FEEEF053DCC6013F2CA657D79B842F912A2195D95C6BB57D7B330A42F3524F8A61DE0614667F71F54829B4E8AB623802C2118A731AC9D2CD0E8FA4E26EEEBA9A0C5F22F2D256E176B57E71D0F72956933B73633278D42FB7226AD2030AC2D2040D35E6CA100BA29A07BEB92BF8119209FAA81251AAB1A52858CA8DFD9CD92EF0A20DC4BBB387A96A762819AD3A0BDEFF97291C29B202532AA4539EF4B50AFEF5D36B2F553955542ECCB39AE7AFE84944FDEDF0CD7D524FE508B7CE6E14957FD1A32983B5D6AB82E94B [following]
--2015-04-14 13:40:41--  https://login.oracle.com/pls/orasso/orasso.wwsso_app_admin.ls_login?site2pstoretoken=v1.2~E4066BF0~0B55FD9A3F9D64F55E8DA694BF5D5BE1CC8EF8C98C36E56D91F6AED8320E520BB3FE5779B244BED60E7874E4179C4B977652FB63D1CF1CA5199D753DECCB14359DBBEFAF11A120AEBC3A5FB1D63F62764EEE5B28C474F75E1A0509AA08C9E5CE4433B907074645EDA711AC5C974AA9B287BAD00E311EA79D7D98E43DBDBE0F6C2FBD95DA6FD211825382930D4FC33AF95C4CE4FBA0D6442C4458E388B7D27AF6ACC2F4CBCDD6B6A4FF479319F093A81ABF813DBF43EB839B0E479786FBA619EF5BDC57F9A0CD95C8AA269C08306814FEEEF053DCC6013F2CA657D79B842F912A2195D95C6BB57D7B330A42F3524F8A61DE0614667F71F54829B4E8AB623802C2118A731AC9D2CD0E8FA4E26EEEBA9A0C5F22F2D256E176B57E71D0F72956933B73633278D42FB7226AD2030AC2D2040D35E6CA100BA29A07BEB92BF8119209FAA81251AAB1A52858CA8DFD9CD92EF0A20DC4BBB387A96A762819AD3A0BDEFF97291C29B202532AA4539EF4B50AFEF5D36B2F553955542ECCB39AE7AFE84944FDEDF0CD7D524FE508B7CE6E14957FD1A32983B5D6AB82E94B
Resolving login.oracle.com... 209.17.4.8
Connecting to login.oracle.com|209.17.4.8|:443... connected.
WARNING: cannot verify login.oracle.com's certificate, issued by `/C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=Terms of use at https://www.verisign.com/rpa (c)10/CN=VeriSign Class 3 International Server CA - G3':
  Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 401 Authorization Required
Reusing existing connection to login.oracle.com:443.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://updates.oracle.com/osso_login_success?urlc=v1.2%7E6A2DA3265A6646312AF39DCF49709F40ECF49C48FBDE3154E5F5E892FE0F33D7AE40FCEFF40CB94949E2C971B4A5227CE83986FF09A8D7195F815CE40A35AAFD75A60133AA838FC5B182AADB99F591C4A6380D0EA957DB3E619C3D4E92CB0AACD676FC8AF6DEB0906A3B9F049FC56746BE4742930EC5077F317B8737DA88F6EE59A65D2181F0C2B7BA5CFEAF78346C30ECB67151ED1C55B0A094E4C8D2FF5BC01465B0E184F0E3C19A672AF1B70C9AD8438A8F23F1D011600C7EEE39F7491B3BEC31F59E8741BD015B89CE439B788B7F2C4A0B3E26B18D8CC2A01E89AF997E2E9F96B0F1241068223A717E7C65EC7211D60E3480F4F4EB4174A4DF6694C70A0CD0E7C6D527754ECCD535A0879701C95C6835872C78386DFF70B65CA308A2C72595D2CD4D8F53C61EFD5E1DD980F990DB8962C9A46A1C519DDC33408AE17F57B6F3A5EFEB8E7D1B5FA34AD400E48AC9A8F3011AF43008F6A94F2EA043DB23B362D309A7F7BB33104A121BBC19F48796E5D2D75F23F20876CFF658BFC6B3B52D079D4FF10DAADDB955CD4753F9B673A8E312681797BCF39A40962204EAA44D6AF100F3BD664E64B9BF2E27243AD9D6DFBF7113F5E07C97F310B259BF8D385A34FF69DD7DE1ABC2B4D9063083F7ADFD783C8F39659E76C28F6332D1CAB407D2C3FF58801068250530BED87A50AD10682E9EB18C58175E18AB3A7D68FD55BFAE79E1AC3CE2F1676834CE0389771CC7F6A8B31DFF2AA1592F00CCF3EBADA9BABE88E91C8D032E06A2E6C05FA2137EC47B9A1AE98C0F2625D3D469A8B5E443B6D202F5 [following]
--2015-04-14 13:40:41--  https://updates.oracle.com/osso_login_success?urlc=v1.2%7E6A2DA3265A6646312AF39DCF49709F40ECF49C48FBDE3154E5F5E892FE0F33D7AE40FCEFF40CB94949E2C971B4A5227CE83986FF09A8D7195F815CE40A35AAFD75A60133AA838FC5B182AADB99F591C4A6380D0EA957DB3E619C3D4E92CB0AACD676FC8AF6DEB0906A3B9F049FC56746BE4742930EC5077F317B8737DA88F6EE59A65D2181F0C2B7BA5CFEAF78346C30ECB67151ED1C55B0A094E4C8D2FF5BC01465B0E184F0E3C19A672AF1B70C9AD8438A8F23F1D011600C7EEE39F7491B3BEC31F59E8741BD015B89CE439B788B7F2C4A0B3E26B18D8CC2A01E89AF997E2E9F96B0F1241068223A717E7C65EC7211D60E3480F4F4EB4174A4DF6694C70A0CD0E7C6D527754ECCD535A0879701C95C6835872C78386DFF70B65CA308A2C72595D2CD4D8F53C61EFD5E1DD980F990DB8962C9A46A1C519DDC33408AE17F57B6F3A5EFEB8E7D1B5FA34AD400E48AC9A8F3011AF43008F6A94F2EA043DB23B362D309A7F7BB33104A121BBC19F48796E5D2D75F23F20876CFF658BFC6B3B52D079D4FF10DAADDB955CD4753F9B673A8E312681797BCF39A40962204EAA44D6AF100F3BD664E64B9BF2E27243AD9D6DFBF7113F5E07C97F310B259BF8D385A34FF69DD7DE1ABC2B4D9063083F7ADFD783C8F39659E76C28F6332D1CAB407D2C3FF58801068250530BED87A50AD10682E9EB18C58175E18AB3A7D68FD55BFAE79E1AC3CE2F1676834CE0389771CC7F6A8B31DFF2AA1592F00CCF3EBADA9BABE88E91C8D032E06A2E6C05FA2137EC47B9A1AE98C0F2625D3D469A8B5E443B6D202F5
Connecting to updates.oracle.com|141.146.44.51|:443... connected.
WARNING: cannot verify updates.oracle.com's certificate, issued by `/C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=Terms of use at https://www.verisign.com/rpa (c)10/CN=VeriSign Class 3 International Server CA - G3':
  Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://updates.oracle.com/Orion/Download/process_form/p4547809_92080_SOLARIS64.zip?file_id=18098537&aru=8690061&userid=o-sameerahmed.siddique.ap@nielsen.com&email=sameerahmed.siddique.ap@nielsen.com&patch_password=&patch_file=p4547809_92080_SOLARIS64.zip [following]
--2015-04-14 13:40:41--  https://updates.oracle.com/Orion/Download/process_form/p4547809_92080_SOLARIS64.zip?file_id=18098537&aru=8690061&userid=o-sameerahmed.siddique.ap@nielsen.com&email=sameerahmed.siddique.ap@nielsen.com&patch_password=&patch_file=p4547809_92080_SOLARIS64.zip
Connecting to updates.oracle.com|141.146.44.51|:443... connected.
WARNING: cannot verify updates.oracle.com's certificate, issued by `/C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=Terms of use at https://www.verisign.com/rpa (c)10/CN=VeriSign Class 3 International Server CA - G3':
  Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 302 Found
Location: http://aru-akam.oracle.com/adcarurepos/vol/patch08/CORE/SOLARIS-64/R8092080/p4547809_92080_SOLARIS64.zip?FilePath=/adcarurepos/vol/patch08/CORE/SOLARIS-64/R8092080/p4547809_92080_SOLARIS64.zip&File=p4547809_92080_SOLARIS64.zip&params=bnRrc2ZPUURNZmZOeU9aU1A0M3M4ZzphcnU9ODY5MDA2MSZlbWFpbD1zYW1lZXJhaG1lZC5zaWRkaXF1ZS5hcEBuaWVsc2VuLmNvbSZmaWxlX2lkPTE4MDk4NTM3JnBhdGNoX2ZpbGU9cDQ1NDc4MDlfOTIwODBfU09MQVJJUzY0LnppcCZ1c2VyaWQ9by1zYW1lZXJhaG1lZC5zaWRkaXF1ZS5hcEBuaWVsc2VuLmNvbSZzaXplPTQzNTg2ODY4MiZjb250ZXh0PUFAMTArSEBhYXJ1dm10cDA2Lm9yYWNsZS5jb20rUEAmZG93bmxvYWRfaWQ9MTYyNzcyNTA4&AuthParam=1429033362_fd115d2ad94bdbeeabcf7b674fd12298 [following]
--2015-04-14 13:40:42--  http://aru-akam.oracle.com/adcarurepos/vol/patch08/CORE/SOLARIS-64/R8092080/p4547809_92080_SOLARIS64.zip?FilePath=/adcarurepos/vol/patch08/CORE/SOLARIS-64/R8092080/p4547809_92080_SOLARIS64.zip&File=p4547809_92080_SOLARIS64.zip&params=bnRrc2ZPUURNZmZOeU9aU1A0M3M4ZzphcnU9ODY5MDA2MSZlbWFpbD1zYW1lZXJhaG1lZC5zaWRkaXF1ZS5hcEBuaWVsc2VuLmNvbSZmaWxlX2lkPTE4MDk4NTM3JnBhdGNoX2ZpbGU9cDQ1NDc4MDlfOTIwODBfU09MQVJJUzY0LnppcCZ1c2VyaWQ9by1zYW1lZXJhaG1lZC5zaWRkaXF1ZS5hcEBuaWVsc2VuLmNvbSZzaXplPTQzNTg2ODY4MiZjb250ZXh0PUFAMTArSEBhYXJ1dm10cDA2Lm9yYWNsZS5jb20rUEAmZG93bmxvYWRfaWQ9MTYyNzcyNTA4&AuthParam=1429033362_fd115d2ad94bdbeeabcf7b674fd12298
Resolving aru-akam.oracle.com... 24.143.205.128, 24.143.205.179
Connecting to aru-akam.oracle.com|24.143.205.128|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 435868682 (416M) [application/zip]
Saving to: `p4547809_92080_SOLARIS64.zip?file_id=18098537&aru=8690061&userid=o-sameerahmed.siddique.ap@nielsen.com&email=sameerahmed.siddique.ap@nielsen.com&patch_password=&patch_file=p4547809_92080_SOLARIS64.zip'

100%[===================================================================================================================>] 435,868,682 2.15M/s   in 3m 30s

2015-04-14 13:44:12 (1.98 MB/s) - `p4547809_92080_SOLARIS64.zip?file_id=18098537&aru=8690061&userid=o-sameerahmed.siddique.ap@nielsen.com&email=sameerahmed.siddique.ap@nielsen.com&patch_password=&patch_file=p4547809_92080_SOLARIS64.zip' saved [435868682/435868682]


Issue list :
1.copying wrong URL

2,HTTP request sent, awaiting response... 401 Authorization Required
use --no-check-certificate in your wget command

3.zsh: parse error near `&'
your URL is having a unrecognized symbol , enclose the URL in double quotes.


4.wget: unrecognized option `--ask-password'
on linux , give password in command in single quotes




Monday, April 13, 2015

How to Manually Uninstall Ultra Search


ummary of the parameters: 
  SYS = "&1"  <== sys user
  SYSPW = "&2" <== password for sys user
  CONN_STRING = "&3" <== If uninstalling Ultra Search on a non-RAC instance, pass a null string. If uninstalling on a RAC machine, be sure to enter the TNS descriptor.  e.g., :: 
- or -
"(DESCRIPTION=(LOAD_BALANCE=yes)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)
     (HOST=cls02a)(PORT=3999)) (ADDRESS=(PROTOCOL=TCP)(HOST=cls02b)(PORT=3999)))
     (CONNECT_DATA=(SERVICE_NAME=acme.us.com)))" 

   
DEV:[DB]oracle@server:/oracle/app/oracle/product/oracle/ultrasearch/admin
==> sqlplus

SQL*Plus: Release 9.2.0.7.0 - Production on Mon Apr 13 16:22:02 2015

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Enter user-name: /as sysdba

Connected to:
Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.7.0 - Production

SQL> @wk0deinst.sql sys password
==============  Ultra Search Deinstallation ==============

Enter value for 3:
Connected.

Context dropped.


User dropped.


Role dropped.


User dropped.

Clean up interMedia Text dictionary

PL/SQL procedure successfully completed.

SQL>

How to Install/Deinstall Oracle Workspace Manager

How to Determine if Workspace Manager is Being Used? (Doc ID 727765.1)
How to Install/Deinstall Oracle Workspace Manager (Doc ID 263428.1)



==> sqlplus

SQL*Plus: Release 9.2.0.7.0 - Production on Mon Apr 13 16:05:39 2015

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Enter user-name: /as sysdba

Connected to:
Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.7.0 - Production


SQL> @$ORACLE_HOME/rdbms/admin/owmuinst.plb

Procedure created.


PL/SQL procedure successfully completed.


Procedure dropped.

SQL>

Thursday, April 2, 2015

ORA-28368: cannot auto-create wallet

While setting up the TDE in one of our systems, faced this issue


SQL> alter system set encryption key identified by dbawa11et;
alter system set encryption key identified by dbawa11et
*
ERROR at line 1:
ORA-28368: cannot auto-create wallet

Check the path where oracle is looking at


SQL> select * from v$encryption_wallet;

WRL_TYPE
--------------------
WRL_PARAMETER
--------------------------------------------------------------------------------
STATUS                         WALLET_TYPE          WALLET_OR FULLY_BAC
------------------------------ -------------------- --------- ---------
    CON_ID
----------
FILE
/etc/ORACLE/WALLETS/DBNAME/
NOT_AVAILABLE                  UNKNOWN              SINGLE    UNDEFINED
         0

check if that path exists

SQL> !ls /etc/ORACLE/WALLETS/DBNAME/
ls: /etc/ORACLE/WALLETS/DBNAME/: No such file or directory

if Not , create it

:[DBNAME]oracle@server:/home/oracle
==> mkdir -p /etc/ORACLE/WALLETS/DBNAME/
mkdir: cannot create directory `/etc/ORACLE': Permission denied
:[DBNAME]oracle@server:/home/oracle
==> sudo  mkdir -p /etc/ORACLE/WALLETS/DBNAME/
:[DBNAME]oracle@server:/home/oracle
==> chown oracle:dba /etc/ORACLE
chown: changing ownership of `/etc/ORACLE': Operation not permitted
:[DBNAME]oracle@server:/home/oracle
==> sudo chown -R oracle:dba /etc/ORACLE
:[DBNAME]oracle@server:/home/oracle
==> exit


Wednesday, April 1, 2015

What to do when encryption password is lost

Case 1.When wallet is NOT auto-login
I dont think anything can be done 

Case 2.When wallet is auto-login


Column Encryption : get the list of columns which are encrypted.
 select * from DBA_ENCRYPTED_COLUMNS;
  1.  remove the ENCRYPT attribute of these columns
  2.  move these tables out of encrypted tablespace

Tablespace encryption:Get the list of encrypted tablespaces

SQL> select TABLESPACE_NAME, status from dba_tablespaces where encrypted = 'YES';

TABLESPACE_NAME                STATUS
------------------------------ ---------
ENCRYPTED_TS                   ONLINE
ENCRYPTED_TS2                  ONLINE
ENCRYPTED_TS3                  ONLINE

2. Move the content of these tablespace to other tablespaces
SQL> select segment_name , owner, segment_type,TABLESPACE_NAME from dba_segments where tablespace_name in (select TABLESPACE_NAME from dba_tablespaces where encrypted = 'YES');

3. drop the encrypted tablespaces

SQL> drop tablespace ENCRYPTED_TS;

Tablespace dropped.

SQL> drop tablespace ENCRYPTED_TS2;

Tablespace dropped.

SQL> drop tablespace ENCRYPTED_TS3;

Tablespace dropped.

4. Remove the wallet

==> chattr -i ewallet.p12
==> chattr -i cwallet.sso
==> rm -rf wallet
==> lsnrctl status


4. perform a full log switch rotation
5. regenerate a new wallet
6. encrypt the previously encrypted data again


execute dbms_job.broken(125,false);





dbms_defer_sys.push(destination=>'DESTINATION.COM.AU');




SQL> select job, failures, broken, last_date, last_sec, next_date, next_sec from user_jobs;

       JOB   FAILURES BROKEN LAST_DATE LAST_SEC NEXT_DATE NEXT_SEC
---------- ---------- ------ --------- -------- --------- --------
         1          0 N      04/FEB/14 20:45:17 04/FEB/14 22:45:17
       125          0 N      04/FEB/14 21:51:33 04/FEB/14 22:21:33
        64          0 N      04/FEB/14 21:43:23 04/FEB/14 21:53:23
       145          0 N      04/FEB/14 21:43:28 04/FEB/14 21:53:28
       146          0 N      04/FEB/14 21:45:13 04/FEB/14 21:55:13
       147          0 N      04/FEB/14 21:45:13 04/FEB/14 21:55:13
       148          0 N      04/FEB/14 21:45:13 04/FEB/14 21:55:13
       149          0 N      04/FEB/14 21:43:58 04/FEB/14 21:53:58