Friday, November 29, 2013

Problem : tnsping service test fails

Error :


1. TNSPING test under generic services in Enterprise Manager fails.
2. Manually running tnsping from the bin directory of the agent home (which hosts the beacon) fails with the following error:-

[oracle@svruatebsdl1 SVRUAT_svruatebsdl1]$ tnsping SVRPRD
TNS Ping Utility for Linux: Version 11.1.0.7.0 - Production on 06-NOV-2013 20:50:39
Copyright (c) 1997, 2008, Oracle.  All rights reserved.
Message 3511 not found; No message file for product=network, facility=TNSMessage 3512 not found; No message file for product=network, facility=TNSAttempting to contact ( (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=svrprdebsdl1.singiri.com)(PORT=1521)) (CONNECT_DATA= (SERVICE_NAME=SVRPRD) (INSTANCE_NAME=SVRPRD)))
TNS-12533: Message 12533 not found; No message file for product=network, facility=TNS

Solution A:

The following workaround is effective, but will not record a corrective action in the agent inventory as should be considered an inferior solution, consequently:

Copy the missing files from an Oracle database install hosted on a similar operating system as the agent hosting the beacon.  Note that the tnsping in the 11.1.0.1 agent home is 11.1.0.7 so ideally copy the files from an 11.1.0.7 database home.

1. Login to the server hosting the Enterprise Manager repository database.

2. Extract the following:

<ORACLE_HOME>/network/mesg/tnsus.msg
<ORACLE_HOME>/network/mesg/tnsus.msb

3. Login to the agent server and copy the files into:

<AGENT_HOME>/network/mesg/tnsus.msg
<AGENT_HOME>/network/mesg/tnsus.msb

4. Execute the tnsping test to verify.

Solution B:

Upgrade to Enterprise Manager 12.1.0.3 Cloud Control.
+++++++++++++++++++++++++
Error:

The listener is down: Message 3509 not found; No message file for product=network, facility=TNS

Solution:

To implement the solution, execute the following steps:
$ chmod 775 $ORACLE_HOME/network/mesg
$ cd mesg
$ chmod 666 *

Note: The ORACLE_HOME referred is the ORACLE_HOME from where the listener is started.

+++++++++++++++

(Doc ID 1454550.1) 

++++++++++Manjunatha++++++++++

How To Install the Vertex Quantum (Tax Q) Monthly Update File (Doc ID 1521407.1)

Goal:
How do I install the monthly update file from Vertex for the Tax Q database for use with Oracle Fusion Payroll (US)?
  
Vertex:
  
In the United States and Canada, the legislation rules and tax routines are maintained by Vertex Inc., an independent, third party software company. This taxation data is accessed by the Payroll calculation engine via software provided by Vertex Inc., which is redistributed by Oracle.

The main file you will receive directly from Vertex is the monthly rate data update file, qfpt.dat.  Delivered with the Monthly Vertex Update, is the

Vertex Payroll Tax Q Series Calculation Guide -  This contains the rate and calculation information provided by Vertex in a PDF document. You can view the Vertex Payroll Tax Q Series Calculation Guide for this information.
  
For Real time Ex:

1. Go to www.vertexinc.com

2. Click on myVertex

3. Login

4. Click on Downloads

5. Under 'Payroll Tax Q Series - Oracle'

    click on Data Update File and save

6. Unzip file to local directory

7. Upload the extracted file, qfpt.dat, to a directory in the server

    Example:
        $VERTEX_TOP/data
[oracle@svrprdebsal1 ~]$ cd /d01/oracle/SVRPROD/apps/apps_st/appl/pay/12.0.0/vendor/quantum_versions/3.1.0

[oracle@svrprdebsal1 3.1.0]$ mv qfpt.dat qfpt.dat_bkp06-Nov13

[oracle@svrprdebsal1 3.1.0]$ cd ../../quantum/
[oracle@svrprdebsal1 quantum]$ cp -rp data data_06-Nov13
[oracle@svrprdebsal1 quantum]$ du -sh data  data_06-Nov13

8. Navigate to $VERTEX_TOP/utils

[oracle@svrprdebsal1 data]$ cd $PAY_TOP/vendor/quantum_versions/3.1.0/utils

9. Execute vprtmupd

10. Select '1. - Update Payroll Tax Database'

11. Enter Data Source: ../data

    Example:
        Enter Data Source: ../data OR the Full path to the Quantum data directory

12. Enter the path to the update file:

    (this is where you uploaded the qfpt.dat file to)

Example:
/amer/oracle/prdmx01/home/patches

13. When you see the following message

    "Payroll Tax Monthly Update successful.
     Press Enter to continue..."

    Hit 'Enter'

14. Then Select '2. - Exit Program'

For Step 9 to 14 follow below:

[oracle@svrprdebsal1 utils]$ ./vprtmupd

Vertex Payroll Tax Q Series - Monthly Update Program

Version 3.1.0    2012/09/16

Copyright (c) Vertex Inc.  1994-2012.  All Rights Reserved.

WARNING! The update process will destroy the contents of the
current database before it creates a new one.  Please make
a backup before proceeding.

Select a Monthly Update Function
--------------------------------
1.  - Update Payroll Tax Database
2.  - Exit Program

Select: 1

Beginning Payroll Tax Monthly Update Process.

Enter Data Source:   /d01/oracle/SVRPROD/apps/apps_st/appl/pay/12.0.0/vendor/quantum/data
Enter the path to the update file:  /d01/oracle/SVRPROD/apps/apps_st/appl/pay/12.0.0/vendor/quantum_versions/3.1.0
Updating database. Please wait. It may take a while...

Payroll Tax Monthly Update successful.
Press Enter to continue...

WARNING! The update process will destroy the contents of the
current database before it creates a new one.  Please make
a backup before proceeding.

Select a Monthly Update Function
--------------------------------
1.  - Update Payroll Tax Database
2.  - Exit Program

Select: 2

Finished.
=======================================
How To Install the Vertex Quantum (Tax Q) Monthly Update File (Doc ID 1521407.1)
How To Verify Vertex Quantum Data File Version (Doc ID 264290.1)
NOTE:735988.1

========================================

Thursday, November 21, 2013

How To Create Users Like Another User In Oracle Database At SQL Command Line, Not From OEM (Doc ID 1352212.1)

Solution 1:
exec  dbms_metadata.set_transform_param(dbms_metadata.SESSION_TRANSFORM,'SQLTERMINATOR',TRUE);

select dbms_metadata.get_ddl( 'USER', '<USERNAME>' ) from dual
    UNION ALL
    select dbms_metadata.get_granted_ddl( 'SYSTEM_GRANT', '<USERNAME>' ) from dual
    UNION ALL
    select dbms_metadata.get_granted_ddl( 'OBJECT_GRANT', '<USERNAME>' ) from dual
    UNION ALL
    select dbms_metadata.get_granted_ddl( 'ROLE_GRANT', '<USERNAME>' ) from dual;

Solution 2:
To get the user's privileges you can query the following tables:

--  For Table privileges: DBA_TAB_PRIVS

-- For Column privileges: DBA_COL_PRIVS

-- For System privileges: DBA_SYS_PRIVS

-- For Roles:  DBA_ROLE_PRIVS


You can also use the DBMS_METADATA package:

-- For object privileges granted to a user :
SELECT DBMS_METADATA.GET_GRANTED_DDL('OBJECT_GRANT',upper('&GRANTED_USER'))
FROM DUAL;

-- For system privileges granted to a user :
SELECT DBMS_METADATA.GET_GRANTED_DDL('SYSTEM_GRANT',upper('&GRANTED_USER'))
FROM DUAL;

-- For roles granted to a user :
SELECT DBMS_METADATA.GET_GRANTED_DDL('ROLE_GRANT',upper('&GRANTED_USER'))
FROM DUAL;

The following scripts can be used to create a user identical to another user :

NOTE: The commands are provided as is and are not supported by Oracle.
You will have to verify yourself that the commands are applicable to your environment.

set pages 0 feed off veri off lines 500

accept oldname prompt "Enter user to model new user to: "
accept newname prompt "Enter new user name: "
accept psw prompt "Enter new user's password: "

-- Create user...
select 'create user &&newname identified by &psw'||
' default tablespace '||default_tablespace||
' temporary tablespace '||temporary_tablespace||' profile '||
profile||';'
from sys.dba_users
where username = upper('&&oldname');

-- Grant Roles...
select 'grant '||granted_role||' to &&newname'||
decode(ADMIN_OPTION, 'YES', ' WITH ADMIN OPTION')||';'
from sys.dba_role_privs
where grantee = upper('&&oldname');

-- Grant System Privs...
select 'grant '||privilege||' to &&newname'||
decode(ADMIN_OPTION, 'YES', ' WITH ADMIN OPTION')||';'
from sys.dba_sys_privs
where grantee = upper('&&oldname');

-- Grant Table Privs...
select 'grant '||privilege||' on '||owner||'.'||table_name||' to &&newname;'
from sys.dba_tab_privs
where grantee = upper('&&oldname');

-- Grant Column Privs...
select 'grant '||privilege||' on '||owner||'.'||table_name||
'('||column_name||') to &&newname;'
from sys.dba_col_privs
where grantee = upper('&&oldname');

-- Set tablespace Quotas...
select 'alter user '||username||' quota '||
decode(max_bytes, -1, 'UNLIMITED', max_bytes)||
' on '||tablespace_name||';'
from sys.dba_ts_quotas
where username = upper('&&oldname');
NOTE:
The above generated commands must be executed to actually create the new user with its privileges


-- Set Default Role...
set serveroutput on
declare
defroles varchar2(4000);
begin
  for c1 in (select * from sys.dba_role_privs
             where grantee = upper('&&oldname')
             and default_role = 'YES'
            )
  loop
    if length(defroles) > 0 then
      defroles := defroles||','||c1.granted_role;
    else
      defroles := defroles||c1.granted_role;
    end if;
  end loop;
dbms_output.put_line('alter user &&newname default role '||defroles||';');
end;
/

.........To find the user details with out any error ......
select (case
        when ((select count(*)
               from   dba_users
               where  username = '&&Username') > 0)
        then  dbms_metadata.get_ddl ('USER', '&&Username')
        else  to_clob ('   -- Note: User not found!')
        end ) Extracted_DDL from dual
UNION ALL
select (case
        when ((select count(*)
               from   dba_ts_quotas
               where  username = '&&Username') > 0)
        then  dbms_metadata.get_granted_ddl( 'TABLESPACE_QUOTA', '&&Username')
        else  to_clob ('   -- Note: No TS Quotas found!')
        end ) from dual
UNION ALL
select (case
        when ((select count(*)
               from   dba_role_privs
               where  grantee = '&&Username') > 0)
        then  dbms_metadata.get_granted_ddl ('ROLE_GRANT', '&&Username')
        else  to_clob ('   -- Note: No granted Roles found!')
        end ) from dual
UNION ALL
select (case
        when ((select count(*)
               from   dba_sys_privs
               where  grantee = '&&Username') > 0)
        then  dbms_metadata.get_granted_ddl ('SYSTEM_GRANT', '&&Username')
        else  to_clob ('   -- Note: No System Privileges found!')
        end ) from dual
UNION ALL
select (case
        when ((select count(*)
               from   dba_tab_privs
               where  grantee = '&&Username') > 0)
        then  dbms_metadata.get_granted_ddl ('OBJECT_GRANT', '&&Username')
        else  to_clob ('   -- Note: No Object Privileges found!')
        end ) from dual
/

Wednesday, November 13, 2013

Unable to change USER password in R12


Error: Unable to change the password for fnd_user ASADMIN

[oracle@svruatebsal1 ~]$FNDCPASS apps/apps 0 Y system/manager USER ASADMIN oracle123
[oracle@svruatebsal1 ~]$ cat L9238207.log
+---------------------------------------------------------------------------+
Application Object Library: Version : 12.0.0
Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
 module:
+---------------------------------------------------------------------------+
Current system time is 14-NOV-2013 03:45:15
+---------------------------------------------------------------------------+

Working...
Unable to change the password for fnd_user ASADMIN.

+---------------------------------------------------------------------------+
Concurrent request completed
Current system time is 14-NOV-2013 03:45:15
+---------------------------------------------------------------------------+

SQL> select USER_NAME,ENCRYPTED_USER_PASSWORD,PASSWORD_LIFESPAN_DAYS from fnd_user where USER_NAME='ASADMIN';

SQL> select fnd_web_sec.validate_login('ASADMIN','<Password>') from dual;
FND_WEB_SEC.VALIDATE_LOGIN('ASADMIN','oracle123')
--------------------------------------------------------------------------------
N

solution
=========

Go to system Adminstrator---->profile--->system

query for profile option:Signon Password No Reuse

change 360 to 0    & save it.

[oracle@svruatebsal1 ~]$FNDCPASS apps/apps 0 Y system/manager USER ASADMIN oracle123
Note: cat the log file , it shows with out any error ...

SQL> select USER_NAME,ENCRYPTED_USER_PASSWORD,PASSWORD_LIFESPAN_DAYS from fnd_user where USER_NAME='ASADMIN';

SQL> select fnd_web_sec.validate_login('ASADMIN','<password>') from dual;

SQL> select fnd_web_sec.validate_login('ASADMIN','oracle123') from dual;

FND_WEB_SEC.VALIDATE_LOGIN('ASADMIN','ORACLE123')
--------------------------------------------------------------------------------
Y

Go to system Adminstrator---->profile--->system

query for profile option:Signon Password No Reuse

change 0 to 360    & save it.


+++++++++++++++++++++++++++++++++