Sunday, November 4, 2012

Compile 10g Forms/Reports Takes a Very Long Time against 11g database


Compile 10g Forms/Reports Takes a Very Long Time against 11g database


Hi All

Here the new issue that I found during upgrade to R12 with 11g Database.
As you know the biggest part of patches are generating Forms and Reports in the end of patch installation. This procedure was very slow and takes a lot of time.

After some search in Metalink and Google I found the Doc ID 880660.1 - Compilation Against a 11g Database Hangs or Takes a Very Long Time (Thanks to Harry Tieb).

Action Plan 

1. Apply the database Patch 8560951 on top of your Database. 
   The Patch 8560951 brings modifications in a sensible area and it is needed to use_FIX_CONTROL to enable the fix. 

*** This patch is already included in higher database versions (e.g. 10.2.0.5, 11.2.0.2). For these it's not necessary to install the patch.  But, _FIX_CONTROL='8560951:ON' still needs to be set as the fix is disabled by default. 

2. ALTER SYSTEM SET "_FIX_CONTROL"='8560951:ON'; - This will enable the fix in memory. 
OR add this parameter to init.ora file and restart the database.

3. Compile the Forms/Reports again.
    If needed to restore things as they were, you can similarly turn the fix off with:
    ALTER SYSTEM SET "_FIX_CONTROL"='8560951:OFF';
OR 
Use the following workaround: 

1. Connect to the DB with SQL*Plus as the user who compiles the Forms application 
2. Use the following command to create a synonym all_objects with:
    create synonym all_objects for sys.dba_objects; 
    If it's not working, grant SELECT privelege on sys.dba_objects to the user who will be  compiling the form.
3. Compile the Forms/Reports again.
    If you want at the end, you can drop this synonym with:  drop synonym all_objects;

Taken from http://dba-story.blogspot.co.il/2012/02/compile-10g-formsreports-takes-very.html

WebADI Run-time error'1004' Method 'VBProject' of object '_Workbook' failed






ISSUE:

Run-time error '1004':

Method 'VBProject' of Object'_Workbook' Failed
this issue reproduce when downloading the excel sheet via webADI .

SOLUSTION:
In Excel 2003:
go to "Tools" > "Macro" > "Security" and select the "Trusted Sources" tab.  Check the box next to "Trust access to Visual Basic Project".
(Note: The box for "Trust all installed add-ins and templates" should also be checked.)

In Excel 2007, use the following navigation:
·         Click on the Office button in the upper left corner
·         Click on the Excel Options button
·         On the left, click on the Trust Center
·         Click on the Trust Center Settings button
·         On the left, click on Macro Settings
·         Click on "Trust access to the VBA project object model"
Ref: 376013.1
       406526.1      


Sunday, October 21, 2012

Turn off user password expiration in ORACLE

Hi,


First of all you can check if user password not expire:
 
SELECT LIMIT FROM dba_profiles WHERE resource_name ='FAILED_LOGIN_ATTEMPTS' 
and PROFILE = (select profile from dba_users where username = 'SCOTT');
Replace scott with user you are interested in , if it is unlimited or no rows selected it means it wont expire.

You can disable passsword expiration for specified user:
SELECT PROFILE FROM dba_users WHERE username = 'User you are interested in';

When you know profile name, you can change it:
ALTER PROFILE <profile_name> LIMIT FAILED_LOGIN_ATTEMPTS UNLIMITED;
ALTER PROFILE <profile_name> LIMIT PASSWORD_LIFE_TIME UNLIMITED;

Best regards.

Tuesday, October 16, 2012

SQL SERVER – FIX : Error 15023: User already exists in current database.


Error 15023: User already exists in current database.
1) This is the best Solution.
First of all run following T-SQL Query in Query Analyzer. This will return all the existing users in database in result pan.
USE YourDB
GO
EXEC sp_change_users_login 'Report'
GO

Run following T-SQL Query in Query Analyzer to associate login with the username. ‘Auto_Fix’ attribute will create the user in SQL Server instance if it does not exist. In following example ‘ColdFusion’ is UserName, ‘cf’ is Password. Auto-Fix links a user entry in the sysusers table in the current database to a login of the same name in sysxlogins.
USE YourDB
GO
EXEC sp_change_users_login 'Auto_Fix', 'ColdFusion', NULL, 'cf'
GO

Run following T-SQL Query in Query Analyzer to associate login with the username. ‘Update_One’ links the specified user in the current database to login. login must already exist. user and login must be specified. password must be NULL or not specified
USE YourDB
GO
EXEC sp_change_users_login 'update_one', 'ColdFusion', 'ColdFusion'
GO

2) If login account has permission to drop other users, run following T-SQL in Query Analyzer. This will drop the user.
USE YourDB
GO
EXEC sp_dropuser 'ColdFusion'
GO

Create the same user again in the database without any error.

How to create Backup & Delete all rows from a table

Hello,

Sometime you should make backup for a table and then delete all from original table.
You can do it which next steps.

First of all you have check data in original table:
1. select * from CHOICE_VALUES

When you know count of rows this is a time for backup table:
2. create table CHOICE_VALUES_backup as select * from  CHOICE_VALUES;

Delete old data from original table.
3. delete from CHOICE_VALUES;
4. commit;

Good luck....

Monday, August 13, 2012

How to kill terminating/long running/hang request oracle


Action:

1) #First Terminate the Request as follows

         update fnd_concurrent_requests
         set status_code='X', phase_code='C'
         where request_id=10122488;

         commit;

2) #Then change the status with Completed-Error as follows.

         update fnd_concurrent_requests
         set status_code='E', phase_code='C'
         where request_id=10122488;

         commit;



#This will change the status of any request.
#Status Code
E -  Error
X -  Terminate
G -  Warning

Thursday, August 2, 2012

Session timeouts, profile options and adconfig for the Oracle eBusiness Suite


Symptoms:
Your log on session is no longer valid. Would you like to log back in so you can continue working? If you do not log in, any outstanding data changes in your forms will not be saved.
Your Session has expired, please login again
Solution:
Set the values of the following profile options appropriately. See Note:171261.1 for details:


ICX:Session Timeout
E.g. From 30 to null (minutes)
ICX: Limit time
E.g. From 10 to 24 (hours)

Remember: When you refresh or clone Test / Development environments the setting for ICX:Session Timeout gets reset!

Also you can solve the issue in $CONTEXT_FILE
located in directory $APPL_TOP/admin/$CONTEXT_NAME.xml.
<session_timeout oa_var="s_sesstimeout">1800000</session_timeout>
And set to the appropriate value. Note that s_sesstimeout is in milliseconds so multiple by (1000*60) to get the time in minutes that is represented in the profile option.
E.g. if you want to set it to 60 minutes then in the context file put value 60 * 1000 * 60 = 3600000. Either that or just set to null:
<session_timeout oa_var="s_sesstimeout">1800000</session_timeout>
Then next time you run adconfig.sh (or a patch/clone does) then you won't have to reset profile options.