Tuesday, February 24, 2015

Login Page is not accessible

Issue:

Getting the following error when trying to open the login page:

You have encountered an unexpected error. Please contact the System Administrator for assistance.
  • All MT services are up and running normally!
  • No errors in the log files!

Solution:

To get more info about the error do the following:

- Enable "FND:Diagnostics" profile option from backend

update fnd_profile_option_values set profile_option_value='YES' where level_id=10001 and profile_option_id = (select fpo.profile_option_id from fnd_profile_options fpo,fnd_profile_options_tl fpot where upper(fpot.user_profile_option_name) like upper('FND: Diagnostics') and fpo.profile_option_name=fpot.profile_option_name);

commit;

select fnd_profile.value('FND_DIAGNOSTICS') "FND: Diagnostics" from dual;


- Refresh the login page again, now the error is:

Exception Details. 
 oracle.apps.fnd.framework.OAException: Could not load application module 'oracle.apps.fnd.sso.login.server.MainLoginPageAM'.
    at oracle.apps.fnd.framework.webui.OAJSPApplicationRegistry.registerApplicationModule(OAJSPApplicationRegistry.java:279)
    at oracle.apps.fnd.framework.webui.OAJSPApplicationRegistry.registerApplicationModule(OAJSPApplicationRegistry.java:78)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1300)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:543)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:431)
    at _OA._jspService(_OA.java:212)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
    at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:259)
    at com.evermind.server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:51)
    at com.evermind.server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:193)
    at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:284)
    at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:198)
    at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:395)
    at _RF._jspService(_RF.java:225)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
    at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
    at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
    at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
    at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:234)
    at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:29)
    at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:879)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    at java.lang.Thread.run(Thread.java:619)
## Detail 0 ##
oracle.apps.fnd.framework.OAException: Application: FND, Message Name: FND_NO_TRANSACTION_ID.
    at oracle.apps.fnd.framework.webui.OAJSPHelper.getTransactionId(OAJSPHelper.java:352)
    at oracle.apps.fnd.framework.webui.OAJSPApplicationRegistry.registerApplicationModule(OAJSPApplicationRegistry.java:133)
    at oracle.apps.fnd.framework.webui.OAJSPApplicationRegistry.registerApplicationModule(OAJSPApplicationRegistry.java:78)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1300)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:543)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:431)
    at _OA._jspService(_OA.java:212)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
    at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:259)
    at com.evermind.server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:51)
    at com.evermind.server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:193)
    at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:284)
    at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:198)
    at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:395)
    at _RF._jspService(_RF.java:225)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
    at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
    at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
    at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
    at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:234)
    at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:29)
    at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:879)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    at java.lang.Thread.run(Thread.java:619)
oracle.apps.fnd.framework.OAException: Application: FND, Message Name: FND_NO_TRANSACTION_ID.
    at oracle.apps.fnd.framework.webui.OAJSPHelper.getTransactionId(OAJSPHelper.java:352)
    at oracle.apps.fnd.framework.webui.OAJSPApplicationRegistry.registerApplicationModule(OAJSPApplicationRegistry.java:133)
    at oracle.apps.fnd.framework.webui.OAJSPApplicationRegistry.registerApplicationModule(OAJSPApplicationRegistry.java:78)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1300)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:543)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:431)
    at _OA._jspService(_OA.java:212)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
    at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:259)
    at com.evermind.server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:51)
    at com.evermind.server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:193)
    at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:284)
    at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:198)
    at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:395)
    at _RF._jspService(_RF.java:225)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
    at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
    at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
    at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
    at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:234)
    at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:29)
    at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:879)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    at java.lang.Thread.run(Thread.java:619)


- Make sure you do not have Invalid objects, incase you have, run the following:

login to the DB node as sysdba

SQL> @$ORACLE_HOME/rdbms/admin/utlrcmp.sql

Package created.

No errors.
SQL> exec utl_recomp.recomp_parallel(6);

PL/SQL procedure successfully completed.

SQL>

 
- Then run "$FND_TOP/sql/FNDDLTMP.sql" to Purge Inactive Sessions:

SQL> @$FND_TOP/sql/FNDDLTMP.sql

PL/SQL procedure successfully completed.


70 rows deleted.


78 rows deleted.


265 rows deleted.


0 rows deleted.


0 rows deleted.


0 rows deleted.


0 rows deleted.


Commit complete.


PL/SQL procedure successfully completed.

Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[apfintest@erpmigrate02 ~l]$


 
- Refresh your login page (no need to restart any services).
- Disable "FND:Diagnostics" profile option

update fnd_profile_option_values set profile_option_value='NO' where level_id=10001 and profile_option_id = (select fpo.profile_option_id from fnd_profile_options fpo,fnd_profile_options_tl fpot where upper(fpot.user_profile_option_name) like upper('FND: Diagnostics') and fpo.profile_option_name=fpot.profile_option_name);

commit;


=> logout and relogin

select fnd_profile.value('FND_DIAGNOSTICS') "FND: Diagnostics" from dual;


Regards,
Mohamed

Thursday, December 19, 2013

Unable to open Oracle Report Manager outputs using MS Excel

Issue:

The user comes with a complain that he is not able to view report output in Excel format, the below error appears on the User's browser:


 
Cause:
IE security rules prevent the creation of an object using ActiveX Component.


Solution:
1- Add your application URL to the trusted sites (Internet Explorer > Tools > Internet Options > Security tab > click on the trusted sites sign)


Click on Sites button:



Click "Add" then close.

2- Change the security options for the trusted sites by clicking on "Custom Level" button then change the value of "Initialize and script ActiveX controls not marked as safe for scripting" to "Enable":



3- Change the value of "Enable XSS filter" to "Disable":



4- Open MS Excel and do the following:

File > Options > Trust Center > Trust Center Settings > Macro Settings

Ensure that "Trust access to the VBA project object model" is checked.


Wednesday, December 04, 2013

How to add a link to Oracle applications 12.1 home page using personalization

To start with this activity you need to change profile option “Personalize Self-Service Defn” for the desired user to Yes.
Login to the application using the user who have the personalization enabled.
Click on "Personalize Page" link.
Change the Personalization Level to "Function: Applications Configurable Home Page" then click Go.
Select "Content" tab as shown in the below snap:
Select the region that you want to include the link inside it, the red arrow shows the region I have selected to put my Link:
The next step we will define the link details:
Item Style: Link
ID: link1
Destination URI: http://erpmigrate02.rsteel.com:8010/OA_HTML/HR_Policy.pdf
Text: *** HR Policy Manual ***

Click Apply button.
The newly added link will be placed by default at the bottom, we need to use the "reorder" link to put it in the requested place:
Click Apply button.
 At the end it will look like:
On the OS level, login as the MT owner, in my case "apfintest" and put the .pdf file in the correct location:
[apfintest@erpmigrate02 ~]$ cd $OA_HTML
[apfintest@erpmigrate02 html]$ pwd
/Test/FINTEST/apps/apps_st/comn/webapps/oacore/html
[apfintest@erpmigrate02 html]$ ls -l HR_Policy.pdf
-rw-r--r-- 1 apfintest oinstall 7096969 Jan 29  2013 HR_Policy.pdf
[apfintest@erpmigrate02 html]$
Click on the "home" link again, and you will see your link.

Wednesday, November 13, 2013

How to dorp/recreate your Undo Tablespaces

> It is better to put the database in the mount mode while doing these activities.
> If the database is up and running you may face
"ORA-30013: undo tablespace '%s' is currently in use." error while dropping the old Undo tablespace, this error indicates that you must wait for the undo tablespace to become unavailable. In other words, you must wait for existing transactions to be committed or rolled back. Also be aware that on some platforms, disk space is not freed to the OS until the database is restarted.  The disk space will remain "allocated" from the OS perspective until the database restart.

1- Collect the required data about your Undo Tablespaces:

SQL> SELECT TABLESPACE_NAME FROM DBA_TABLESPACES WHERE CONTENTS='UNDO';

TABLESPACE_NAME
------------------------------
APPS_UNDOTS1
 SQL> sho parameter undo

NAME                     TYPE     VALUE
------------------------------------ ----------- ------------------------------
undo_management              string     AUTO
undo_retention                 integer     900
undo_tablespace              string     APPS_UNDOTS1
SQL>

SQL> SELECT * FROM DBA_DATA_FILES WHERE TABLESPACE_NAME='APPS_UNDOTS1';

FILE_NAME                 FILE_ID TABLESPACE_NAME            BYTES      BLOCKS STATUS    RELATIVE_FNO AUT   MAXBYTES    MAXBLOCKS INCREMENT_BY USER_BYTES USER_BLOCKS ONLINE_
---------------------------------------- ---------- ------------------------------ ---------- ---------- --------- ------------ --- ---------- ---------- ------------ ---------- ----------- -------
/oracle/PROD/db/apps_st/data/undo01.dbf    379 APPS_UNDOTS1           4194304000      512000 AVAILABLE        379 YES 3.4360E+10      4194302     12800 4194238464      511992 ONLINE
/oracle/PROD/db/apps_st/data/undo02.dbf     19 APPS_UNDOTS1           4404019200      537600 AVAILABLE         19 YES 3.4360E+10      4194302     12800 4402970624      537472 ONLINE

SQL>

- Total size of the Undo Tablespace:

SQL> SELECT sum(bytes)/1024/1024/1024 FROM DBA_DATA_FILES WHERE TABLESPACE_NAME='APPS_UNDOTS1';

SUM(BYTES)/1024/1024/1024
-------------------------
        8.0078125

SQL> !ls -ltrh /oracle/PROD/db/apps_st/data/undo0*
-rw-r----- 1 orstage dba 4.2G Nov 16 16:49 /oracle/PROD/db/apps_st/data/undo02.dbf
-rw-r----- 1 orstage dba 4.0G Nov 16 16:49 /oracle/PROD/db/apps_st/data/undo01.dbf

SQL>

2- Create a new undo tablespace:

SQL> create undo tablespace APPS_UNDOTS2 datafile '/oracle/PROD/db/apps_st/data/undoNew.dbf' size 1000M;

3- Set the new tablespace as the undo tablespace to be used:

SQL> alter system set undo_tablespace=APPS_UNDOTS2 scope=spfile;

SQL> sho parameter undo

NAME                     TYPE     VALUE
------------------------------------ ----------- ------------------------------
undo_management              string     AUTO
undo_retention                 integer     900
undo_tablespace              string     APPS_UNDOTS2
SQL>   

4- Drop the old undo tablespace:

    SQL> drop tablespace APPS_UNDOTS1 including contents and datafiles;

5- Recreate the old undo tablespace with a smaller size:

    SQL> create undo tablespace APPS_UNDOTS1 datafile '/oracle/PROD/db/apps_st/data/undo01.dbf' size 10240M '/oracle/PROD/db/apps_st/data/undo02.dbf' size 10240M;

6- Set the old tablespace as the undo tablespace to be used:

    SQL> alter system set undo_tablespace=APPS_UNDOTS1 scope=spfile;

 7- Drop the temp undo tablespace:

    SQL> drop tablespace APPS_UNDOTS2 including contents and datafiles;

Regards,
Mohamed

Troubleshooting Concurrent Request ORA-20100 error

When running "GMFRLAYR module: GMF Recreate Batch / Period Layers" Concurrent request we got the below error:

ORACLE error 20100 in FDPSTP Cause: FDPSTP failed due to ORA-20100: Error: FND_FILE failure. Unable to create file, o1152922.tmp in the directory, /usr/tmp. You will find more information in the request log. ORA-06512: at "APPS.FND_FILE", line 417 

- All configurations seems to be OK:
As the DB owner:
SQL> sho parameter utl_file_dir

NAME                     TYPE     VALUE
------------------------------------ ----------- ------------------------------
utl_file_dir                 string     /usr/tmp, /usr/tmp, /Test/FINT
                         EST/db/tech_st/11.1.0/appsutil
                         /outbound/FINTEST_erpmigrate02
                         , /usr/tmp
SQL> 

As the MT owner:
[apfintest@erpmigrate02 ~]$ echo $APPLPTMP
/usr/tmp
[apfintest@erpmigrate02 ~]$ ls -l /usr/|grep tmp
lrwxrwxrwx   1 root root     10 Nov  4 13:01 tmp -> ../var/tmp
[apfintest@erpmigrate02 ~]$ ls -l /var|grep tmp
drwxrwxrwx  3 root root  4096 Nov 13 11:31 tmp
[apfintest@erpmigrate02 ~]$ 

- We have enough space for new logs:
[apfintest@erpmigrate02 ~]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2             254G  5.7G  235G   3% /
/dev/sdb2             943G  348G  547G  39% /Oracle
/dev/sdb1             946G  348G  551G  39% /Test
/dev/sda1             289M   32M  243M  12% /boot
tmpfs                 7.9G   17M  7.9G   1% /dev/shm
[apfintest@erpmigrate02 ~]$

- Trying to use the package used by the application to write the file:

SQL> sho user
USER is "APPS"
SQL> exec FND_FILE.PUT_LINE(FND_FILE.LOG, 'testing /usr/tmp folder');

PL/SQL procedure successfully completed.

SQL> !ls -ltr|tail
-rwxrwxrwx 1 orscm     dba           0 Nov 13 11:40 o1152928.tmp
-rwxrwxrwx 1 orscm     dba           0 Nov 13 11:40 l1152928.tmp
-rwxrwxrwx 1 orscm     dba           0 Nov 13 11:41 o1152959.tmp
-rwxrwxrwx 1 orscm     dba           0 Nov 13 11:41 l1152959.tmp
-rwxrwxrwx 1 orscm     dba           0 Nov 13 11:41 o1152946.tmp
-rwxrwxrwx 1 orscm     dba           0 Nov 13 11:41 l1152946.tmp
-rwxrwxrwx 1 orscm     dba           0 Nov 13 11:41 o1152916.tmp
-rwxrwxrwx 1 orscm     dba           0 Nov 13 11:41 l1152916.tmp
-rw-r--r-- 1 orfintest oinstall      0 Nov 13 11:41 o1154916.tmp
-rw-r--r-- 1 orfintest oinstall     24 Nov 13 11:41 l1154916.tmp

SQL> !cat l1154916.tmp
testing /usr/tmp folder

SQL>

- At last I found that the /usr/tmp folder is shared between two instances! and the same file name got generated by both instances!
- At this point you have two options:
a)
1. Stop all MT services.
2. Change $APPLPTMP value to another directory "ensure it is the first value listed by
utl_file_dir DB parameter"
3. Run autoconfig on the MT nodes
4. Restart all services
5. Re-test the failed process

b)
As a quick solution "should not be applied unless you really need an urgent solution"
[root@erpmigrate02 tmp]# chmod 777 /usr/tmp/*
[root@erpmigrate02 tmp]# 

re-run your CR again...

Regards,
Mohamed



Tuesday, November 27, 2012

How to map a Windows share folder on Linux

- Create the required mount point:

[root@erpapp1 ~]# mkdir /mnt/TimeSheets
[root@erpapp1 ~]#

[root@erpapp1 ~]# cd /mnt/TimeSheets
[root@erpapp1 TimeSheets]#


- Get the UID for the user who will own the shared files:

[root@erpapp1 /]# id apstage1
uid=500(apstage1) gid=54326(dba) groups=54326(dba),54321(oinstall)
[root@erpapp1 /]#



Windows machine: file-server
Windows shared folder: TimeSheets 
Linux mount point: /mnt/TimeSheets
local user (uid=500) will become the owner of the mounted files.


[root@erpapp1 ~]# cat /root/smblogin.txt
username=rsteel/erp.auto
password=ERP112233
[root@erpapp1 ~]# 

where:
Domain Name: rsteel
Windows User Name: erp.auto
Windows user passwd: ERP112233


***********************
***********************
*** Once you mounted the folder, you can remove your password from smblogin.txt
***********************
***********************

[root@erpapp1 mnt]# diff /etc/fstab /etc/fstab_25Nov2012
10d9
\\file-server\TimeSheets /mnt/TimeSheets cifs credentials=/root/smblogin.txt,uid=500,user 0 0
[root@erpapp1 mnt]#


[root@erpapp1 TimeSheets]# mount /mnt/TimeSheets
[root@erpapp1 TimeSheets]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/cciss/c0d0p3      19G   16G  2.9G  85% /
/dev/cciss/c0d0p6     209G  174G   25G  88% /home
/dev/cciss/c0d0p5      15G  4.5G  9.1G  33% /usr
/dev/cciss/c0d0p1      99M   25M   69M  27% /boot
tmpfs                 7.7G   16M  7.7G   1% /dev/shm
//file-server/test    420G  129G  291G  31% /mnt/TimeSheets
[root@erpapp1 TimeSheets]#

[root@erpapp1 TimeSheets]# cd /mnt/TimeSheets
[root@erpapp1 TimeSheets]# ls
setup.msi
[root@erpapp1 TimeSheets]#



Regards,
Mohamed

Friday, November 16, 2012

Recreating Temporary Tablespace

1- Check existing temp tablespaces:

SQL> SELECT tablespace_name, file_name, bytes FROM dba_temp_files;

TABLESPACE_NAME            FILE_NAME                      BYTES
------------------------------ --------------------------------------------- ----------
TEMP1                   /Oracle/TEST/db/apps_st/data/temp01.dbf         2097152000
TEMP2                   /Oracle/TEST/db/apps_st/data/temp02.dbf         2097152000

SQL>

2- Check what is the default Temp Tablespace:


SQL> select PROPERTY_NAME,PROPERTY_VALUE from database_properties where property_name like '%TEMP%';

PROPERTY_NAME               PROPERTY_VALUE
------------------------------ ------------------------------
DEFAULT_TEMP_TABLESPACE        TEMP

SQL>

 
- Check if the assigned default tablespace is a tablespace or a temporary tablespace group! in the above example "TEMP" is a temporary tablespace group.

3- Create new Temporary Tablespace Tempo:


SQL> CREATE TEMPORARY TABLESPACE TEMPO TEMPFILE  '/oracle/PROD/db/apps_st/data/tempo.dbf' SIZE 3000M;

4- Change the default Temp Tablespace to be tempo tablespace:


SQL> ALTER DATABASE DEFAULT TEMPORARY TABLESPACE tempo;

5- Drop the old Temporary tablespaces:


> If the old temporary tablespaces are being used by some active sessions, the drop command will hang till the sessions that using those tablespaces were stopped:

-  Check the session that is currently use temporary tablespaces V$SORT_USAGE:

SQL> SELECT USERNAME,SESSION_NUM,TABLESPACE FROM V$SORT_USAGE;

-  If you decided to kill those sessions then you can do the following:

a) SQL> SELECT SID, SERIAL#, STATUS,STATE FROM V$SESSION WHERE SERIAL#=&SESSION_NUM;

b) Terminate unwanted sessions:
 
 SQL> ALTER SYSTEM KILL 'SID,SERIAL#';

c) Drop temp tablespace

SQL> DROP TABLESPACE temp1 INCLUDING CONTENTS AND DATAFILES;SQL> DROP TABLESPACE temp2 INCLUDING CONTENTS AND DATAFILES;

6- Recreate Temporary Tablespaces:


SQL> CREATE TEMPORARY TABLESPACE TEMP1 TEMPFILE '/oracle/PROD/db/apps_st/data/temp01.dbf' SIZE 6000M AUTOEXTEND ON NEXT 100M MAXSIZE unlimited EXTENT MANAGEMENT LOCAL;
 
SQL> CREATE TEMPORARY TABLESPACE TEMP2 TEMPFILE '/oracle/PROD/db/apps_st/data/temp02.dbf' SIZE 6000M AUTOEXTEND ON NEXT 100M MAXSIZE unlimited EXTENT MANAGEMENT LOCAL;

7- Add the Tablespaces to a temporary tablespace group


SQL> ALTER TEMPORARY TABLESPACE temp1 TABLESPACE GROUP TEMP;SQL> ALTER TEMPORARY TABLESPACE temp2 TABLESPACE GROUP TEMP;

- Check that both tablespaces were assigned to the group:
SQL> select * from DBA_TABLESPACE_GROUPS;

- If you need to remove the tablespace from the group use:
SQL> ALTER TEMPORARY TABLESPACE temp1 TABLESPACE GROUP '';

8- Change the default tablespace back again to it's original value:


SQL> ALTER DATABASE DEFAULT TEMPORARY TABLESPACE temp;

9- Drop the tempo tablespace:

SQL> DROP TABLESPACE tempo INCLUDING CONTENTS AND DATAFILES;

Regards,
Mohamed

Sunday, June 03, 2012

Setup a remote shared folder and configure SAMBA

Server side:

1
    Edit /etc/exports, add one line to the file for each directory to be exported:
      directory hostname(options) hostname2(options)
            directory is an absolute path to a local directory you wish to export
            hostname is the name or IP address of the client if you wish to restrict access or * if no restrictions
            options: see man exports for all options for example ro, rw...
2
    Force the nfs server daemons to reread /etc/exports: exportfs -ra

Client side

1
    Create a mount point: mkdir /mnt/remotefs
2
    Mount the NFS export: mount -t nfs <server name or ip address>:/exportedDir /mnt/remotefs
3
    Use the remote filesystem as if it were local by accessing /mnt/remotefs: ls /mnt/remotefs

Example:
========
On The server side:

[root@erpdb01 /]# cat /etc/exports
/Test erpmt01(rw,sync,no_subtree_check,no_root_squash)
[root@erpdb01 /]#
[root@erpdb01 Test]# exportfs -ra

> system-config-services mark the service "nfs" to start automatically with the OS.
[root@erpdb01 Test]# service nfs start
Starting NFS services:                                     [  OK  ]
Starting NFS quotas:                                       [  OK  ]
Starting NFS daemon:                                       [  OK  ]
Starting NFS mountd:                                       [  OK  ]
[root@erpdb01 Test]#

On the client side:

[root@erpmt01 /]# mkdir /mnt/remotefs
[root@erpmt01 /]# cd /mnt/remotefs
[root@erpmt01 remotefs]# ls
[root@erpmt01 remotefs]#

[root@erpmt01 /]# mount -t nfs erpdb01:/Test /mnt/remotefs
[root@erpmt01 /]#
[root@erpmt01 /]# cd /mnt/remotefs/
[root@erpmt01 remotefs]# ls
Clone_Files  db
[root@erpmt01 remotefs]#

###################################

Configure SAMBA:
================
- Create the user that will be used to access the files from windows...
system-config-users
username: HR
> system-config-services mark the service "smb" to start automatically with the OS.
> system-config-samba:
Add user:
Unix User: HR
Windows User: HR
password: manhr
Add share:
- Basic
Directory: /Test
Share name: images
select (writable,visible)
- Access
Only allow access to specific users
HR