Tuesday, September 23, 2014

How to recover apps password in R12.


In R12 , apps password is not hardcoded, still few workarounds may work for you.
1. if sqlplus , than u need to set it back to old value and continue to work. you can also use 'identified by value' option instead of giving password.

2. if FNDCPASS , than
a. You  can change it back to old value...no loss.
b. if you have any custom program which has apps password hardcoded u can check from there.
c. if you have any custom script in cron or so where apps password is hardcoded u can check from there.
d. check bash_history for last FNDCPASS command.
   e.
Decrypting APPS password in R12 :
SQL> show user
USER is "SYS"
SQL> create FUNCTION apps.decrypt_pin_func(in_chr_key IN VARCHAR2,in_chr_encrypted_pin IN VARCHAR2)
RETURN VARCHAR2
AS
LANGUAGE JAVA NAME 'oracle.apps.fnd.security.WebSessionManagerProc.decrypt(java.lang.String,java.lang.String) return java.lang.String';
/ 2 3 4 5

Function created.

SQL> select ENCRYPTED_FOUNDATION_PASSWORD from apps.fnd_user where USER_NAME='GUEST';

ENCRYPTED_FOUNDATION_PASSWORD
--------------------------------------------------------------------------------
ZG1040180FF7A514EB0209759D297661E8E28DD99460D28850C00D783E24843FC44BCB81BD289305AA4FCFF468533FBBBB72


SQL> SELECT apps.decrypt_pin_func('GUEST/ORACLE','ZG1040180FF7A514EB0209759D297661E8E28DD99460D28850C00D783E24843FC44BCB81BD289305AA4FCFF468533FBBBB72') from dual;

APPS.DECRYPT_PIN_FUNC('GUEST/ORACLE','ZG1040180FF7A514EB0209759D297661E8E28DD994
--------------------------------------------------------------------------------
S2MUL8TION

SQL> conn apps/S2MUL8TION
Connected.
SQL>

SQL> drop function apps.decrypt_pin_func;

Function dropped.

Monday, September 8, 2014

Installing and configuring CSSCAN

Below are high label steps for Installing and configuring CSSCAN  in Oracle 10G and 11G .

select value from NLS_DATABASE_PARAMETERS where parameter='NLS_CHARACTERSET';

Note 745809.1 Installing and configuring CSSCAN in 10g and 11g

3) Installing Csscan
Run csminst.sql using these commands and SQL statements:

cd $ORACLE_HOME/rdbms/admin
set oracle_sid=<your SID>
sqlplus /nolog
SQL>conn / as sysdba
SQL>set TERMOUT ON
SQL>set ECHO ON
SQL>spool csminst.log
SQL> START csminst.sql

select owner,  object_type, status, object_name from dba_objects where status ='INVALID';



csscan  full=y userid=sys "/as sysdba"  FROMCHAR=UTF8 TOCHAR=AL32UTF8 LOG=UTF8_TO_UTF8_17_april CAPTURE=Y ARRAY=1000000 PROCESS=2


conn / as sysdba
SELECT OWNER, ORIGINAL_NAME, OBJECT_NAME, TYPE from dba_recyclebin order by 1,2;


conn / as sysdba
PURGE DBA_RECYCLEBIN;

csscan FULL=Y  userid=csmig/S0l_ut10n FROMCHAR=UTF8 TOCHAR=AL32UTF8 LOG=dbcheck CAPTURE=N ARRAY=1000000 PROCESS=2


csscan  full=y userid=csmig/S0l_ut10n FROMCHAR=UTF8 TOCHAR=AL32UTF8 LOG=post_drop CAPTURE=Y ARRAY=1000000 PROCESS=2

Tuesday, September 2, 2014

Changing the NLS_CHARACTERSET to AL32UTF8 / UTF8



Changing the NLS_CHARACTERSET to AL32UTF8 / UTF8 (Unicode) in 8i, 9i , 10g and 11g (Doc ID 260192.1)
Note 788156.1 AL32UTF8 / UTF8 (Unicode) Database Character Set Implications
What languages are supported in an Unicode (UTF8/AL32UTF8) database? (Doc ID 1051824.6)

From SR

your existing database has a lot of LOSSY data that needs to be fixed.
But this can be fixed after moving to the new character set also .
( Path: you can export data, truncate table, convert characterset and then import data back into tables in new characterset).

But the problem here, you have a lot of LOSSY data. Both using fromchar=WE8ISO8859P1, tochar=WE8ISO8859P1 as well as fromchar=WE8ISO8859P1, tochar=AL32UTF8.

We shall see if there is an intermediate way to do this and bringdown lossy data.
Please provide below details:

1. Please run Csscan FROMCHAR=<WE8ISO8859P1> TOCHAR=<WE8MSWIN1252> and upload the csscan results.
2.
SELECT DUMP(COUNTRY_REMARK, 1016) FROM DW.TB_COM02190_DIM_GEOGRAPHY
where rowid='AACfPpABEAAADDqABV';
SELECT DUMP(SUPPLIER_NAME_CITY_CODE, 1016) FROM DW.BUF_SRC_DLV_MET_SUPP_PLNT_LK_1
where rowid='AACfPpABEAAADDqABV';
3.

select distinct(nls_charset_name(charsetid)) CHARACTERSET,
decode(type#, 1, decode(charsetform, 1, 'VARCHAR2', 2, 'NVARCHAR2','UNKNOWN'),
9, decode(charsetform, 1, 'VARCHAR', 2, 'NCHAR VARYING', 'UNKNOWN'),
96, decode(charsetform, 1, 'CHAR', 2, 'NCHAR', 'UNKNOWN'),
8, decode(charsetform, 1, 'LONG', 'UNKNOWN'),
112, decode(charsetform, 1, 'CLOB', 2, 'NCLOB', 'UNKNOWN')) TYPES_USED_IN
from sys.col$ where charsetform in (1,2) and type# in (1, 8, 9, 96, 112)
order by CHARACTERSET, TYPES_USED_IN