Monday, August 15, 2011

11g Agent Installation fails

./runInstaller -responseFile /oracle/Agent/linux_x64/response/additional_agent.rsp


Starting Oracle Universal Installer...



Checking Temp space: must be greater than 150 MB. Actual 6886 MB Passed

Checking swap space: must be greater than 150 MB. Actual 3851 MB Passed

Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-08-15_01-28-49PM. Please wait ...[oracle@dw001.snc3 /oracle/Agent/linux_x64/agent/install]$











ERROR: /oracle/Agent/linux_x64/agent//install/response//emnoseed.rsp file doesnot exists.



 
 
 
Solution :
 
1) create the response file.
2) Copy the response file to location where the emnoseed.rsp file should be . ( whatever location installer complains about)
 
eg :  /oracle/Agent/linux_x64/agent//install/response//emnoseed.rsp
 
 cp /oracle/Agent/linux_x64/response/additional_agent.rsp /oracle/Agent/linux_x64/agent//install/response//emnoseed.rsp
 
3) rerun the installer with ( or without ) responsefile.

Wednesday, June 1, 2011

keytool error: java.lang.Exception: Certificate not imported, alias already exists

/usr/java/jdk1.6.0_24/jre/bin/keytool -import -keystore /usr/java/jdk1.6.0_24/jre/lib/security/cacerts -file /tmp/prodrootca.cer -storepass changeit


keytool error: java.lang.Exception: Certificate not imported, alias already exists
 
 
 
SOLUTION:
 
Add the alias key as the default naming already exists
 
 /usr/java/jdk1.6.0_24/jre/bin/keytool  -import -keystore /usr/java/jdk1.6.0_24/jre/lib/security/cacerts -alias prodintermediateca -file /tmp/prodintermediateca.cer -storepass changeit

Friday, May 27, 2011

BI publisher scheduler configurations fails


When we enter the DB information and try scheduling the schema it fails with below error

Content-Length: 285

]] Root cause of ServletException.
java.lang.NoClassDefFoundError: oracle/xml/parser/schema/XSDBuilder
        at oracle.toplink.platform.xml.xdk.XDKPlatform.(XDKPlatform.java:55)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at java.lang.Class.newInstance0(Class.java:355)
        at java.lang.Class.newInstance(Class.java:308)
        at oracle.toplink.internal.security.PrivilegedAccessHelper.newInstanceFromClass(PrivilegedAccessHelper.java:335)
        at oracle.toplink.platform.xml.XMLPlatformFactory.getXMLPlatform(XMLPlatformFactory.java:95)
        at oracle.toplink.tools.sessionconfiguration.XMLSessionConfigLoader.loadDocument(XMLSessionConfigLoader.java:331)
        at oracle.toplink.tools.sessionconfiguration.XMLSessionConfigLoader.loadDocument(XMLSessionConfigLoader.java:298)
        at oracle.toplink.tools.sessionconfiguration.XMLSessionConfigLoader.load(XMLSessionConfigLoader.java:220)
        at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(SessionManager.java:448)
        at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(SessionManager.java:409)
        at oracle.apps.xdo.servlet.scheduler.toplink.XmlpTableCreator.createSession(XmlpTableCreator.java:884)
        at oracle.apps.xdo.servlet.scheduler.toplink.XmlpTableCreator.installSchema(XmlpTableCreator.java:731)
        at oracle.apps.xdo.servlet.ui.admin.SchedulerConfigPage.installSchema(SchedulerConfigPage.java:300)
        at oracle.apps.xdo.servlet.ui.admin.SchedulerConfigPage.doPost(SchedulerConfigPage.java:182)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at oracle.apps.xdo.servlet.security.SecurityFilter.doFilter(SecurityFilter.java:86)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
        at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
        at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
        at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)




Solution:


The WebLogic can’t access the Toplink libraries (a Java persistence layer from Oracle) that it needs to create the database tables for the scheduler.
Now Toplink is shipped with the BI Publisher software, but you need to edit the script that launches the WebLogic Admin Server so that it knows about it.

To do this, 

shut down the WeLogic Admin Server (just CTRL-C in the console window that’s running it), locate the script that runs the Admin Server startup
(mine was at /opt/app/oracle/test/midfortest/user_projects/domains/test_domain/bin/startWebLogic.sh) and add -Dtoplink.xml.platform=oracle.toplink.platform.xml.jaxp.JAXPPlatform to the startup script, so that it goes from this:

if [ "${WLS_REDIRECT_LOG}" = "" ] ; then
    echo "Starting WLS with line:"
    echo "${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS}  ${PROXY_SETTINGS} ${SERVER_CLASS}"
    ${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS}  ${PROXY_SETTINGS} ${SERVER_CLASS}
else
    echo "Redirecting output from WLS window to ${WLS_REDIRECT_LOG}"
    ${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS}  ${PROXY_SETTINGS} ${SERVER_CLASS}  >"${WLS_REDIRECT_LOG}" 2>&1
fi

to this

if [ "${WLS_REDIRECT_LOG}" = "" ] ; then
    echo "Starting WLS with line:"
    echo "${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS} -Dtoplink.xml.platform=oracle.toplink.platform.xml.jaxp.JAXPPlatform ${PROXY_SETTINGS} ${SERVER_CLASS}"
    ${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS} -Dtoplink.xml.platform=oracle.toplink.platform.xml.jaxp.JAXPPlatform ${PROXY_SETTINGS} ${SERVER_CLASS}
else
    echo "Redirecting output from WLS window to ${WLS_REDIRECT_LOG}"
    ${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS} -Dtoplink.xml.platform=oracle.toplink.platform.xml.jaxp.JAXPPlatform ${PROXY_SETTINGS} ${SERVER_CLASS}  >"${WLS_REDIRECT_LOG}" 2>&1
fi

Starting the BI application for OIM will fail with below error

Message icon - Error weblogic.application.ModuleException: [HTTP:101216]Servlet: "QuartzInitializer" failed to preload on startup in Web application: "xmlpserver". oracle.apps.xdo.servlet.resources.ResourceNotFoundException: /opt/app/oracle/test/midfortest/deployment/xmlpserver/xdo/repository/Admin/Scheduler/quartz-config.properties at oracle.apps.xdo.servlet.ReportException.fillInStackTrace(ReportException.java:124) at java.lang.Throwable.(Throwable.java:196) at java.lang.Exception.(Exception.java:41) at oracle.apps.xdo.servlet.ReportException.(ReportException.java:36) at oracle.apps.xdo.servlet.resources.ResourceNotFoundException.(ResourceNotFoundException.java:20) at oracle.apps.xdo.servlet.resources.FileConfigProvider.getConfigInputStream(FileConfigProvider.java:434) at oracle.apps.xdo.servlet.scheduler.quartz.ExtendedQuartzInitializerServlet.init(ExtendedQuartzInitializerServlet.java:56) at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64) at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58) at weblogic.servlet.internal.StubLifecycleHelper.(StubLifecycleHelper.java:48) at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539) at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1985) at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1959) at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1878) at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3153) at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1508) at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:482) at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52) at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119) at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200) at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247) at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52) at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119) at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27) at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:636) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52) at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:205) at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:43) at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161) at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116) at weblogic.deploy.internal.targetserver.operations.StartOperation.doCommit(StartOperation.java:140) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323) at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844) at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253) at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440) at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207) at weblogic.work.ExecuteThread.run(ExecuteThread.java:176) :oracle.apps.xdo.servlet.resources.ResourceNotFoundException:/opt/app/oracle/test/midfortest/deployment/xmlpserver/xdo/repository/Admin/Scheduler/quartz-config.properties



Solution is to :


Set up the BI Publisher repository.
To set up the BI Publisher repository, copy the XMLP repository to a location on
your server, then edit the configuration file to point to the saved location, as
follows:
a. Copy the XMLP repository directory from \manual on your installation media
to your server.
b. Open the xmlp-server-config.xml file located in the
c:mydestination\xmlpserver\WEB-INF\
directory where you unpacked the ear or war file.
c. Replace ${oracle.home}/xdo/repository with the file path to the
location where you copied the XMLP repository directory on your server. For
example, if you copied the repository directory to
/home/repository/XMLP, update the xmlp-server-config.xml file as
follows:





d. Save xmlp-server-config.xml after updating.

Managed Server failed to start when started from console.

failed with below Error





Parsing Failure in config.xml: java.lang.AssertionError: java.lang.ClassNotFoundException: com.bea.wcp.sip.management.descriptor.beans.SipServerBean





SOLUTION:



You have to make sure this class is in the classpath: com.bea.wcp.sip.management.descriptor.beans.SipServerBean.

You have to edit the nodemanager.properties file and set the variable StartScriptEnabled=true instead of the default false.
The nodemanager.properties file is usually located in the directory: /wlserver_10.3/common/nodemanager.

Now the nodemanager uses the start script usually startWebLogic, which calls the setDomainEnv in which the classpath for the SIP server is set.

When you use the startManagedServer command the setDomainEnv is called so the classpath is set.

Tuesday, December 21, 2010

PATCH 9239090

Adworker fails with below error




ATTENTION: All workers either have failed or are waiting:




FAILED: file bomprg.ldt on worker 2.

FAILED: file jg12acp.ldt on worker 3.



Dumping LCT file /db2/oracle/EBS/DEV1/apps/apps_st/appl/fnd/12.0.0/patch/115/import/afcpprog.lct(120.2.12010000.2) into FND_SEED_STAGE_CONFIG


Dumping LDT file /db2/oracle/EBS/DEV1/apps/apps_st/appl/bom/12.0.0/patch/115/import/US/bomprg.ldt into FND_SEED_STAGE_ENTITY

A database error occurred:

ORA-24816: Expanded non LONG bind data supplied after actual LONG or LOB column

 
 
Solution: Set the env and run the program manually or


To implement the solution, please execute the following steps:




If the Patch is stopped please just change setup for environment variable NLS_LANG to proper value and restart adpatch (continue previous session).



For example:



If the database characterset is UTF8 set NLS_LANG to American_America.UTF8.



a. Execute 'export' as follows.



# export NLS_LANG=American_America.UTF8



b. Query value for NLS_LANG to verify it.



#echo $NLS_LANG (Unix)

>echo %NLS_LANG% (Windows)



OR



If adpatch is still running but hanging due to failed workers:



1. Stop adpatch.



Please use adctrl utility to stop adpatch.



The best way to do this is to shut down the workers manually, which

also causes the AD utility to quit in an orderly fashion.



Action

a. Select AD Controller(adctrl) Option 3 and enter all for the worker number. Each worker

stops once it completes or fails its current job.



b. Verify that no worker processes are running. Use a command similar to the one

in the following example. The command arguments may vary on different

platforms.

UNIX:

$ ps -a
grep adworker

Windows:

Invoke the Task Manager (Ctrl-Alt-Delete) to view processes.



c. When all workers have shut down, the manager and the AD utility quits.



2. Change NLS_LANG setup.



Please refer to the example above.



3. Start adpatch again, continue previous session.



Check if AutoPatch is progressing, if not use adctrl utility, option 2 to restart failing worker.



4. How to avoid similar issue in the future.



Verify NLS_LANG setup in the Autoconfig Context file.



Edit the context file using Oracle Applications Manager(OAM) or Context Editor and find value for NLS_LANG:



If the database characterset is UTF8 it should be:



American_America.UTF8

American_America.UTF8

American_America.UTF8



If NLS_LANG parameters have different values than expected please apply corrections. Then execute Autoconfig and make sure it was successful.



5. Test if the changes to NLS_LANG were successful.



Source the env file and query:



#echo $NLS_LANG (Unix)

>echo %NLS_LANG% (Windows)

Sunday, October 10, 2010

runInstaller doesnot display ASM disks during 11gR2 grid (cluster) installation

During 11gR2 Grid installation the candidate disks for vote and ocr were not displayed in the list screen. The issue may be many but one of the reason for this behaviour is the permission .



The runinstaller uses /usr/sbin/oracleasm-discover to to display the files and not oracleasm and its behaviour mainly depends on the filepermissoins under /dev/oracleasm

EG: ( First we will use root user and then the actual user trying to install the software )


[oragrd@appsonline-rac dev]$ cd oracleasm
[oragrd@appsonline-rac oracleasm]$ cd disks
[oragrd@appsonline-rac disks]$ ls
SOAPRD_DATA01 SOAPRD_DATA02 SOAPRD_DATA03 SOAPRD_DATA04 SOAPRD_FRA01 SOAPRD_FRA02 SOAPRD_FRA03 SOAPRD_FRA04 SOAPRD_VOTE01 SOAPRD_VOTE02 SOAPRD_VOTE03

mailto:root@appsonline-rac
/usr/sbin/oracleasm
[root@appsonline-rac disks]# ls -l /usr/sbin/oracleasm*
-rwxr-xr-x 1 root root 16600 Mar 18 2009 /usr/sbin/oracleasm
-rwxr-xr-x 1 root root 10664 Mar 18 2009 /usr/sbin/oracleasm-discover
[root@appsonline-rac disks]# which oracleasm-discover
/usr/sbin/oracleasm-discover

Run the Discover Command
 [root@appsonline-rac disks]# oracleasm-discover
Using ASMLib from /opt/oracle/extapi/64/asm/orcl/1/libasm.so
ASM Library - Generic Linux, version 2.0.4 (KABI_V2)]
Discovered disk: ORCL:SOAPRD_DATA01 [93803472 blocks (48027377664 bytes), maxio 512]
Discovered disk: ORCL:SOAPRD_DATA02 [93803472 blocks (48027377664 bytes), maxio 512]
Discovered disk: ORCL:SOAPRD_DATA03 [93803472 blocks (48027377664 bytes), maxio 512]
Discovered disk: ORCL:SOAPRD_DATA04 [93803472 blocks (48027377664 bytes), maxio 512]
Discovered disk: ORCL:SOAPRD_FRA01 [93803472 blocks (48027377664 bytes), maxio 512]
Discovered disk: ORCL:SOAPRD_FRA02 [93803472 blocks (48027377664 bytes), maxio 512]
Discovered disk: ORCL:SOAPRD_FRA03 [93803472 blocks (48027377664 bytes), maxio 512]
Discovered disk: ORCL:SOAPRD_FRA04 [93803472 blocks (48027377664 bytes), maxio 512]
Discovered disk: ORCL:SOAPRD_VOTE01 [2096753 blocks (1073537536 bytes), maxio 512]
Discovered disk: ORCL:SOAPRD_VOTE02 [2096753 blocks (1073537536 bytes), maxio 512]
Discovered disk: ORCL:SOAPRD_VOTE03 [2096512 blocks (1073414144 bytes), maxio 512]

Now Try executing the same commands as user than will own the Cluster , in my example its oragrd


[root@appsonline-rac disks]# su - oragrd
[oragrd@appsonline-rac ~]$ /usr/sbin/oracleasm-discover
Using ASMLib from /opt/oracle/extapi/64/asm/orcl/1/libasm.so
asm_version() failed with code 2

If this fails then try tracing the session to find what exactly is the error. The above error is misleading and has nothing to do with library.

[oragrd@appsonline-rac ~]$ strace /usr/sbin/oracleasm-discover >/tmp/11.log
execve("/usr/sbin/oracleasm-discover", ["/usr/sbin/oracleasm-discover"], [/* 19 vars */]) = 0
brk(0) = 0x1692f000
mmap(NULL, 4096, PROT_READ
PROT_WRITE, MAP_PRIVATE
MAP_ANONYMOUS, -1, 0) = 0x2b0dd6b39000
uname({sys="Linux", node="appsonline-rac.oracle.com", ...}) = 0
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3

fstat(3, {st_mode=S_IFREG
0644, st_size=104289, ...}) = 0
mmap(NULL, 104289, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2b0dd6b3a000
close(3) = 0
open("/lib64/libdl.so.2", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\16 \0331\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG
0755, st_size=23360, ...}) = 0
mmap(NULL, 4096, PROT_READ
PROT_WRITE, MAP_PRIVATE
MAP_ANONYMOUS, -1, 0) = 0x2b0dd6b54000
map(0x311b200000, 2109696, PROT_READ
PROT_EXEC, MAP_PRIVATE
MAP_DENYWRITE, 3, 0) = 0x311b200000
mprotect(0x311b202000, 2097152, PROT_NONE) = 0
mmap(0x311b402000, 8192, PROT_READ
PROT_WRITE, MAP_PRIVATE
MAP_FIXED
MAP_DENYWRITE, 3, 0x2000) = 0x311b402000
close(3) = 0
open("/lib64/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\332\241\0321\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG
0755, st_size=1713088, ...}) = 0
mmap(0x311aa00000, 3494168, PROT_READ
PROT_EXEC, MAP_PRIVATE
MAP_DENYWRITE, 3, 0) = 0x311aa00000
mprotect(0x311ab4c000, 2097152, PROT_NONE) = 0
mmap(0x311ad4c000, 20480, PROT_READ
PROT_WRITE, MAP_PRIVATE
MAP_FIXED
MAP_DENYWRITE, 3, 0x14c000) = 0x311ad4c000
mmap(0x311ad51000, 16664, PROT_READ
PROT_WRITE, MAP_PRIVATE
MAP_FIXED
MAP_ANONYMOUS, -1, 0) = 0x311ad51000
close(3) = 0
mmap(NULL, 4096, PROT_READ
PROT_WRITE, MAP_PRIVATE
MAP_ANONYMOUS, -1, 0) = 0x2b0dd6b55000
arch_prctl(ARCH_SET_FS, 0x2b0dd6b55800) = 0
mprotect(0x311b402000, 4096, PROT_READ) = 0
mprotect(0x311ad4c000, 16384, PROT_READ) = 0
mprotect(0x311a81b000, 4096, PROT_READ) = 0
munmap(0x2b0dd6b3a000, 104289) = 0
brk(0) = 0x1692f000
brk(0x16950000) = 0x16950000
open("/opt/oracle/extapi/64/asm/orcl/1/libasm.so", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\21\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG
755, st_size=18176, ...}) = 0
mmap(NULL, 2113440, PROT_READ
PROT_EXEC, MAP_PRIVATE
MAP_DENYWRITE, 3, 0) = 0x2b0dd6b56000
mprotect(0x2b0dd6b5a000, 2093056, PROT_NONE) = 0
mmap(0x2b0dd6d59000, 4096, PROT_READ
PROT_WRITE, MAP_PRIVATE
MAP_FIXED
MAP_DENYWRITE, 3, 0x3000) = 0x2b0dd6d59000


close(3) = 0
fstat(1, {st_mode=S_IFREG
644, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ
PROT_WRITE, MAP_PRIVATE
MAP_ANONYMOUS, -1, 0) = 0x2b0dd6d5a000
open("/dev/oracleasm/.query_version", O_RDWR) = -1 EACCES (Permission denied)
open("/dev/oracleasm/iid", O_RDONLY) = -1 EACCES (Permission denied)
write(2, "asm_version() failed with code 2"..., 33asm_version() failed with code 2
) = 33


write(1, "Using ASMLib from /opt/oracle/ex"..., 61) = 61
exit_group(2)
= ?


The above error shows its unable to read some file under /dev/oracleasm . So change the permissions as below.

[root@appsonline-rac oracleasm]# ls -lart



total 0
-rwxrwx--- 1 root root 0 Jul 12 13:17 .query_version
-rwxrwx--- 1 root root 0 Jul 12 13:17 .query_disk
drwxrwx--- 1 root root 0 Jul 12 13:17 iid
-rwxrwx--- 1 root root 0 Jul 12 13:17 .get_iid
drwxr-xr-x 1 root root 0 Jul 12 13:17 disks
-rwxrwx--- 1 root root 0 Jul 12 13:17 .check_iid
rwxr-xr-x 4 root root 0 Jul 12 13:17 .
rwxr-xr-x 15 root root 6860 Jul 13 14:51 ..


[root@appsonline-rac oracleasm]# chown oragrd:asmdba /dev/oracleasm/.query_version


[root@appsonline-rac oracleasm]# chown -R oragrd:asmdba iid
[root@appsonline-rac oracleasm]# chown -R oragrd:asmdba .q*
drwxr-xr-x 15 root root 6860 Jul 13 14:51 ..
[root@appsonline-rac oracleasm]# chown -R oragrd:asmdba .check_iid .get_iid
[root@appsonline-rac oracleasm]# ls -lart
total 0
-rwxrwx--- 1 oragrd asmdba 0 Jul 12 13:17 .query_version
-rwxrwx--- 1 oragrd asmdba 0 Jul 12 13:17 .query_disk
drwxrwx--- 1 oragrd asmdba 0 Jul 12 13:17 iid
-rwxrwx--- 1 oragrd asmdba 0 Jul 12 13:17 .get_iid
drwxr-xr-x 1 root root 0 Jul 12 13:17 disks
-rwxrwx--- 1 oragrd asmdba 0 Jul 12 13:17 .check_iid
drwxr-xr-x 4 root root 0 Jul 12 13:17 .
drwxr-xr-x 15 root root 6860 Jul 13 14:51 ..

Rerun the command

[root@appsonline-rac oracleasm]# su - oragrd
[oragrd@appsonline-rac ~]$ /usr/sbin/oracleasm-discover
Using ASMLib from /opt/oracle/extapi/64/asm/orcl/1/libasm.so
[ASM Library - Generic Linux, version 2.0.4 (KABI_V2)]
iscovered disk: ORCL:SOAPRD_DATA01 [93803472 blocks (48027377664 bytes), maxio 512]
Discovered disk: ORCL:SOAPRD_DATA02 [93803472 blocks (48027377664 bytes), maxio 512]
Discovered disk: ORCL:SOAPRD_DATA03 [93803472 blocks (48027377664 bytes), maxio 512]
Discovered disk: ORCL:SOAPRD_DATA04 [93803472 blocks (48027377664 bytes), maxio 512]
Discovered disk: ORCL:SOAPRD_FRA01 [93803472 blocks (48027377664 bytes), maxio 512]
Discovered disk: ORCL:SOAPRD_FRA02 [93803472 blocks (48027377664 bytes), maxio 512]
Discovered disk: ORCL:SOAPRD_FRA03 [93803472 blocks (48027377664 bytes), maxio 512]
Discovered disk: ORCL:SOAPRD_FRA04 [93803472 blocks (48027377664 bytes), maxio 512]
Discovered disk: ORCL:SOAPRD_VOTE01 [2096753 blocks (1073537536 bytes), maxio 512]
Discovered disk: ORCL:SOAPRD_VOTE02 [2096753 blocks (1073537536 bytes), maxio 512]
Discovered disk: ORCL:SOAPRD_VOTE03 [2096512 blocks (1073414144 bytes), maxio 512]

Once you are done either restart the runinstaller or Browse and manually enter the discovery path.


Thanks , Sandarsh Chavalmane


Friday, June 18, 2010

Disabling RAC on 11gR2

There is some difference in enabling and disabling RAC on 11gR2 from the previous releases

Before we disable we need to verify if the products are really enabled.


cd $ORACLE_HOME/rdbms/lib

ar -t libknlopt.a | grep -c kcsm.o


would return 0 if RAC is disabled or a number >0 if enabled

For example:

Environment where RAC is disabled:

[oradev1@xxx lib]$ ar -t libknlopt.a |grep -c kcsm.o
0


Environment where RAC is enabled:

[oragrd@xxx lib]$ ar -t libknlopt.a |grep -c kcsm.o
1



DISABLE RAC:

To disable rac at oracle binary level we need to execute the below command.

make -f ins_rdbms.mk rac_off

After this ,relink the oracle exe

cd $ORACLE_HOME
make -f rdbms/lib/ins_rdbms.mk ioracle


Similarly we can use below key words to disable other components in 11gR2


  • RAT - kecwr.o
  • OLS - kzlibac.o
  • DV - kzvidv.o
  • ASM - kfon.o
  • OLAP - xsyeolap.o
  • PART - kkpoban.o
  • CTX - kciwcx.o

where {option} is => OPTION - {option on} / {option off }


  • RAT - rat_on / rat_off
  • OLS - lbac_on / lbac_off
  • DV - dv_on / dv_off
  • ASM - asm_on / asm_off
  • OLAP - olap_on / olap_off
  • PART - part_on / part_off
  • CTX - ctx_on / ctx_off

Thanks ,
Sandarsh Chavalmane

Thursday, June 17, 2010

11gR2 nodeapps vip issue

VIP was down as it got attached to a different device.

11gR2 RAC environment has the below issues.


When we run a installer or cluster verify you could see that nodeapps is not running .

Verifying the nodeapps you see that one of the component (vip) is down.


[oragrd@XXX ~]$ srvctl status nodeapps -n XXX

VIP xxx-vip is enabled
VIP xxx-vip is not running
Network is enabled
Network is running on node: xxx
GSD is enabled
GSD is running on node: xxx
ONS is enabled
ONS daemon is running on node: xxx
eONS is enabled
eONS daemon is running on node: xxx



Check the status on cluster registry


$ crs_stat -t |grep vip
obi.vip application ONLINE ONLINE afso...b101
ora....101.vip ora....t1.type ONLINE OFFLINE
ora....102.vip ora....t1.type ONLINE OFFLINE
ora.scan1.vip ora....ip.type ONLINE ONLINE afso...b102
ora.scan2.vip ora....ip.type ONLINE ONLINE afso...b101
ora.scan3.vip ora....ip.type ONLINE ONLINE afso...b101


This indicates VIP is in inconsistent state. Now check weather vip is available on the network
Below command shows that vip is attached to eth3 and it is like a physical IP .


ifconfig -a


eth3 Link encap:Ethernet HWaddr F4:CE:46:AF:49:44
inet addr:10.32.200.151 Bcast:10.32.200.255 Mask:255.255.255.0
inet6 addr: fe80::f6ce:46ff:feaf:4944/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6116467 errors:0 dropped:0 overruns:0 frame:0
TX packets:70229 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1504763071 (1.4 GiB) TX bytes:3056240 (2.9 MiB)
Interrupt:139



10.32.200.151 is our vip and its running. Ideally it should not be as crs_stat is showing its down.
When you try restarting , you see that VIP is already in use in the cluster log

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

2010-05-27 14:56:15.509: [UiServer][1520855360] Container [ Name: ORDER
MESSAGE:
TextMessage[CRS-5005: IP Address: 10.32.200.151 is already in use in the network]
MSGTYPE:
TextMessage[1]
OBJID:
TextMessage[ora.SOAIAT2.lsnr afsoqatdb102 1]
WAIT:
TextMessage[0]

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



Work Around to fix this issue:

[oragrd@XXX ~]$ srvctl stop nodeapps -n XXX

Bringdown the device to which vip is attached

Run below command as root.

ifdown eth3



Run if config and make sure that eth3 is not running or attached to any device .

Then start the nodeapps

[oragrd@XXX ~]$ srvctl start nodeapps -n XXX

Check the status.

[oragrd@XXX ~]$ srvctl status nodeapps -n XXX
-n option has been deprecated.
VIP XXX-vip is enabled
VIP XXX-vip is running on node: XXX
Network is enabled
Network is running on node: XXX
GSD is enabled
GSD is running on node: XXX
ONS is enabled
ONS daemon is running on node: XXX
eONS is enabled
eONS daemon is running on node: XXX

Check on the cluster:

[oragrd@XXX ~]$ crs_stat -t | grep vip
obi.vip application ONLINE ONLINE afso...b101
ora....101.vip ora....t1.type ONLINE ONLINE afso...b101
ora....102.vip ora....t1.type ONLINE ONLINE afso...b102
ora.scan1.vip ora....ip.type ONLINE ONLINE afso...b101
ora.scan2.vip ora....ip.type ONLINE ONLINE afso...b101
ora.scan3.vip ora....ip.type ONLINE ONLINE afso...b101
[oragrd@XXX ~]$

Now make sure vip does not get attached to any device . In our case it was getting attached to eth3 . We need to disable it permanently

cd /etc/sysconfig/network-scripts
vi ifcfg-eth3

remove
IPADDR=
NETMASK=
PEERDNS=yes




This should prevent the device from picking up the IP after reboot.

Thanks ,
Sandarsh Chavalmane

Sunday, June 6, 2010

Hyperion Installation document

Hyperion High Level Installation Steps

Download PDF with Architecture Diagram. Hyperion Installation

Here I am explaining about Hyperion installation on a distributed environment (High Level). Since planning and reporting are expected to consume high resources we kept these services separated.

Hyperion Installation Steps.

On LinuxDBHyperion.appsonlinedba.com
1) Install Oracle Binaries (11gR2) . Since we planned to test cold failover we had installed the oracle binaries on cluster.
2) Create a dummy (blank) db using DBCA.
3) Install 11gR2 client.
4) Install Hyperion essbase. You need to deselect all the other components which are selected by default.


On LinuxappHyperion.appsonlinedba.com
5) Install Foundation(Shared Services) and Financial reporting . By default essbase and planning are selected , deselect them before proceeding with the installation

On WindowsHyperion.appsonlinedba.com
6) Installation Planning . Here you need to deselect other components which are checked by default.

Hyperion Configuration Steps

Create Schema:

We can install each service on different schema or same schema. To isolate each module we created separate schemas

Hss: stands for Hyperion shared services
Hbi: Hyperion Business Intelligence
heas: Hyperion essbase administration services’
hes: Hyperion essbase studio

Configure different services:
When you invoke the installer it asks you about which service to configure make sure you do it as below on each server. Also make sure you select the correct schema created above .

a) Configure Shared service ( LinuxappHyperion)
b) Configure essbase ( LinuxDBHyperion )
c) Configure Planning ( WindowsHyperion )
d) Configure Reporting ( LinuxappHyperion )

Thanks ,
Sandarsh Chavalmane

Saturday, April 3, 2010

11gR2 RAC , GRID infrastructure ASM ,vote ,ocr bla bla.... and a big confusion before you implement these.

11gR2 RAC , GRID infrastructure ASM :

Since I did my first implementation, I was interested in sharing

1) Why is VOTE and OCR inside ASM?

Storing the OCR and vote disk inside ASM eliminates the need for third party cluster and volume managers and also helps eliminate the complexity of managing separate disk partitions for the OCR in oracle clusterware installations.
Better manageability. and also Oracle WANT to SELL RAC with ASM ,....

2) How does cluster start as vote disk and OCR are inside ASM???

In 11GR2, every node has a local registry called OLR. OLR is created during the installation and by default its located under $GRID_HOME/cdata/.olr
This file actually facilitates the oracle cluterware to startup process when OCR and vote are inside ASM.

During the startup OLR is referenced to determine the exact location of the vote disks. This will facilitate the node to join the cluster. After the initial phase ASM is started and the processes that require full OCR can start and the clusterware startup process completes.

3) SAN and NAS.

I always assumed EMC sells only SAN . But they too have NAS storage.Since we prefer to have block storage for oracle database we opted SAN for oracle software and NAS for usual NFS.

Also good that now there is a EM plugin avaliable to monitor EMC disks.


Thanks

Sandarsh Chavalmane

Wednesday, June 3, 2009

PCP in non-RAC instances - Pitfalls

It was a wonderful surprise when I stumbled upon Metalink Note ID: 743716.1, which details steps for configuring PCP in non-RAC instances.



This is very useful while using hardware or software clustering and not Oracle clustering (RAC).



We are using Veritas clustering (software clustering) for server failover. We were recently testing server failover and there are two things that I am unable to figure out as of now and which necessitates manual intervention rendering the whole failover mechanism manual:




1. How would the VNC server failover when using PCP with non-RAC?



Since, the hostname changes when the failover happens, the display variable would still be pointing to the failed server and not the failover server.

The work around to the above problem is obviously to reset the display variable and run autoconfig, which would mean that the failover mechanism is no longer automatic.



2. As soon as the failover happens, we need to make a manual entry in the Web Tier $TNS_ADMIN/tnsnames.ora to reflect the change in the concurrent processing server. This entry takes the form FNDFS_<FAILOVER_SERVER_NAME>.. Thankfully, this does NOT necessitate downtime of the instance.



Do post your comments/suggestions/ideas on the above 2 problems.


Tuesday, March 24, 2009

Issue while exporting /importing the oracle outlines from one database to other

On of the DBA complained that he had created 25 outlines in the test instance while tuning the bad sql's. Now he wanted to move the outlines to production.
One of the method to achieve this is to export the tables from the outl schema of the source (DEV) to target(PROD)
Both the export and import utilities executed without any issues.

25 rows were exported from DEV and then imported to source(PROD).

But when we count the dba_outlines table it showed 21 rows , 4 outlines were missing.


Below are the details

--------------------EXPORT COMMAND on DEV-------------------




exp / file=/tmp/outl2.dmp log=/tmp/outl2.log CONSTRAINTS=n TRIGGERS=n tables=outln.ol\$,outln.ol\$hints,outln.ol\$nodes grants=n

Export: Release 10.2.0.3.0 - Production on Mon Mar 23 18:26:03 2009



About to export specified tables via Conventional Path ...
Current user changed to OUTLN
. . exporting table OL$ 25 rows exported
. . exporting table OL$HINTS 488 rows exported
. . exporting table OL$NODES 733 rows exported
Export terminated successfully without warnings.




-------------------import COMMAND on PROD-------------------------

Import the outlines on the target

ibisdev-e2-zone02.east:PATCH4:/orahome $ imp / file=/tmp/outl2.dmp log=/tmp/outlBTCsingle.log CONSTRAINTS=n grants=n fromuser=outln touser=outln ignore=y commit=y

Import: Release 10.2.0.3.0 - Production on Mon Mar 23 18:28:26 2009


Export file created by EXPORT:V10.02.01 via conventional path
import done in US7ASCII character set and AL16UTF16 NCHAR character set
import server uses UTF8 character set (possible charset conversion)
export client uses UTF8 character set (possible charset conversion)
. importing OUTLN's objects into OUTLN
. . importing table "OL$" 25 rows imported
. . importing table "OL$HINTS" 488 rows imported
. . importing table "OL$NODES" 733 rows imported
Import terminated successfully without warnings.


---- below sql shows that there are only 21 outline on PROD -----

login to database

sqlplus "/ as sysdba"

select count(*) from dba_outlines;

Count(*)
------------------------------------------

21

------------------------------------------



Below you can see a difference in the header hint count .

If there is a hint ol$ hint count is less than ol$hints then the import utility will first import the data and then sync both the tables.
If the ol$ hint count is more than ol$hints then the data will be first imported and then deleted due to hintcount mismatch.

In other words

You need to ensure that you use a similar SQL statement to swap the counts, because if the hint count and the number of hints do not match, then one of the closing procedural steps in the import will
be to delete any plan which is internally inconsistent - i.e. where the actual
count doesn't match the recorded count.


Only way to overcome this is to update the outln.ol$ hintcount to the value less than or equal to hintcount of outln.ol$hints

=================Below query on PROD shows that there are no hints mismatch between the tables==================

SQL> clear buffer
buffer cleared
SQL> 1 select a.OL_NAME,a.HINTCOUNT,count(b.OL_NAME)
2 from outln.ol$ a,
3 outln.ol$hints b
4 where a.OL_NAME = b.OL_NAME
5 group by a.OL_NAME,a.HINTCOUNT
6* having count(b.OL_NAME) <> a.HINTCOUNT SQL> SQL> SQL> SQL> SQL>
SP2-0734: unknown command beginning "6* having ..." - rest of line ignored.
SQL>
SQL> 6 having count(b.OL_NAME) <> a.HINTCOUNT
SQL> /

no rows selected

===============================Shows that there are only 21 outlines on PROD and has the hints in sync===========================================

SQL> l
1 select a.OL_NAME,a.HINTCOUNT,count(b.OL_NAME)
2 from outln.ol$ a,
3 outln.ol$hints b
4 where a.OL_NAME = b.OL_NAME
5 group by a.OL_NAME,a.HINTCOUNT
6* having count(b.OL_NAME) <> a.HINTCOUNT
SQL> del 6
SQL> /
CR_6788803_FNDWFBG 22 22
CR_6807075_CWP_05 9 9
CWP_ACCT_INFO_01 27 27
CR_6805769_PR_08 36 36
CR_6807045_CWP_01_OLD 17 17
CR_6805769_PR_02 17 17
CR_6788792_ARBARL 22 22
CR_6805769_PR_03 12 12
CR_6805769_PR_04 17 17
CR_6805769_PR_10 20 20
CR_6789052_FNDWFBG 22 22
CR_6794612_CWP_04 12 12
CR_6805769_PR_12 18 18
CR_6807240_AMSRFSEG 18 18
CR_6794623_CWP_07 12 12
CR_6797878_ITA_SETUP 25 25
CR_6805769_PR_06 12 12
CR_6807068_CWP_03 29 29
CR_6805769_PRICE_REPORT 17 17
CR_6805769_PR_07 12 12
CR_6809701_OE_EBFF 53 53

21 rows selected.





-----------------------------------COMMAND shows thate outlines that have hintcount difference on DEV---------------------------------------------

SQL> select a.OL_NAME,a.HINTCOUNT,count(b.OL_NAME)
from outln.ol$ a,
outln.ol$hints b
where a.OL_NAME = b.OL_NAME
group by a.OL_NAME,a.HINTCOUNT 2 3 4 5
6 having count(b.OL_NAME) <> a.HINTCOUNT
7 ;

OL_NAME HINTCOUNT COUNT(B.OL_NAME)
------------------------------ ---------- ----------------
CR_6807045_CWP_01 18 17
CR_6807062_CWP_02 23 22
CR_6807090_CWP_09 24 14
CR_6788803_FNDWFBG 22 24
CR_6789052_FNDWFBG 22 24
CR_6809701_OE_EBFF 53 54

6 rows selected.


--------------------------------------------------------------------------------------------------------
Still we can see only 4 outline from the above six are missing , it is because the ol$ hintcount is LESS than ol$hints in the .




===================SOLUTION=========================

----------perform the below steps on source(DEVELOPMENT)-----------


SQL>select hintcount
from outln.ol$
where
OL_NAME='CR_6807045_CWP_01';


HINTCOUNT
----------
18

SQL> update outln.ol$
set hintcount=17
where OL_NAME='CR_6807045_CWP_01';


1 row updated.

SQL> select hintcount from outln.ol$ where OL_NAME='CR_6807045_CWP_01';

HINTCOUNT
----------
17

SQL> commit;

Commit complete.

SQL> !
$

------------EXPORT COMMAND on DEV after making the hints on ol$ equal to ol$hints------------------------------------



$ exp / file=/tmp/outl2.dmp log=/tmp/outl2.log CONSTRAINTS=n TRIGGERS=n tables=outln.ol\$,outln.ol\$hints,outln.ol\$nodes grants=n

Export: Release 10.2.0.3.0 - Production on Mon Mar 23 18:26:03 2009

Copyright (c) 1982, 2005, Oracle. All rights reserved.


Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Oracle Label Security, OLAP
and Data Mining options
Export done in UTF8 character set and AL16UTF16 NCHAR character set
Note: grants on tables/views/sequences/roles will not be exported
Note: constraints on tables will not be exported

About to export specified tables via Conventional Path ...
Current user changed to OUTLN
. . exporting table OL$ 25 rows exported
. . exporting table OL$HINTS 488 rows exported
. . exporting table OL$NODES 733 rows exported
Export terminated successfully without warnings.


---------------------import COMMAND on PROD-----------------------



:/orahome $ imp / file=/tmp/outl2.dmp log=/tmp/outlBTCsingle.log CONSTRAINTS=n grants=n fromuser=outln touser=outln ignore=y commit=y

Import: Release 10.2.0.3.0 - Production on Mon Mar 23 18:28:26 2009

Copyright (c) 1982, 2005, Oracle. All rights reserved.


Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining options

Export file created by EXPORT:V10.02.01 via conventional path
import done in US7ASCII character set and AL16UTF16 NCHAR character set
import server uses UTF8 character set (possible charset conversion)
export client uses UTF8 character set (possible charset conversion)
. importing OUTLN's objects into OUTLN
. . importing table "OL$" 25 rows imported
. . importing table "OL$HINTS" 488 rows imported
. . importing table "OL$NODES" 733 rows imported
Import terminated successfully without warnings.



--------------------------VALIDATING THE FIX ---------------------

:/orahome $
me $ sqlplus

SQL*Plus: Release 10.2.0.3.0 - Production on Mon Mar 23 18:28:40 2009

Copyright (c) 1982, 2006, Oracle. All Rights Reserved.

Enter user-name: / as sysdba

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining options

SQL> select count(*) from dba_outlines;

COUNT(*)
----------
22


This shows that this time import has imported 22 outline (21 + the one which was fixed)

You may have to perform the workaround on all the outlines that have a hints mismatch (ol$ hintcount > ol$hints hintcount)


About EXPORT and IMPORT functionality with outline as an example


1) check - select * from EXPACT$ where owner = 'OUTLN'; - Import runs this to cleanup

Some of these rows are cleared out at later point by the packages called in order to ensure the internal consistency of the metadata.

The packages called are outline.drop_collision, outline.drop_unrefd_hints, outline.drop_extras. These packages are called as an Import/Export post table action and the main purpose of this procedure is to clean up after an import. The drop of outlines may be because they are simply not required in the target database to obtain plan stability. The definitions for all of these procedures can be found in dbmsol.sql. Taking
a look at the usage notes, there would appear to be some inconsistency which gets cleared up by these functions during export/import. This could explain the missing rows.


The outln$ table has a 'hintcount' column.

You need to ensure that you use a similar SQL statement to swap the counts, because if the hint count and the number of hints do not match, then one of the closing procedural steps in the import will
be to delete any plan which is internally inconsistent - i.e. where the actual
count doesn't match the recorded count.


You might try establishing a db_link between the two databases and thendo an update using a slect from the other table. This would bypass the export/import actions that are deleting your new outlines even as itadds them. Another possibility if db_links aren't workable is to import into a different user then use the update using a select from that users tables.

Thanks, Sandarsh



Monday, July 21, 2008

Version of mod_security with EBS 11.5.10.2

Though it was a bit tough to find out the version of Mod_security that is shipped with E-Business Suite 11.5.10.2, I finally managed to do it, thanks to Metalink Fora!

The version that comes with eBS 11.5.10.2 is 1.8.4. Below is how you find out the version of mod_security shipped with your version of eBS.

$ strings $IAS_ORACLE_HOME/Apache/Apache/libexec/mod_security.so | grep mod_security/

Wednesday, July 2, 2008

Using GLOGIN.SQL

Many a time, DBAs and Developers tend to run scripts, accidentally, in instances that they do not actually intend to. In extreme cases, this might result in disastrous consequences, sometimes even leading to recovering/restoring the database from a backup.

This mistake can easily be avoided if the sql prompt displays the username and/or the SID in lieu of just "SQL>". This can be achieved using a variety of methods.

The easiest method (according to me) is detailed below.

Whenever sqlplus is invoked, 2 files are executed: glogin.sql and login.sql (in the order mentioned). These 2 files are located under $ORACLE_HOME/sqlplus/admin.

Modify the file glogin.sql and add the below line:

set sqlprompt "_user'@'_connect_identifier > "

The net result of this is that the sqlprompt will appear as below whenever you login to sqlplus:

system@ORCL>

where system is the username and ORCL is the SID.

Note: One drawback of this method, if it may be called so, is that whenever one logs in to sqlplus using /nolog option, only the '@' character is displayed as the connection to the database is yet to be established. As soon as the connection is established, the username and SID are again populated in the sqlprompt. Incidentally, this is a new feature in 10g, wherein the glogin.sql and login.sql files are executed after the connect command.

Wednesday, March 12, 2008

Table Fragmentation

Table Fragmentation

Found this good note on net:-
When rows are not stored contiguously, or if rows are split onto more than one block, performance decreases because these rows require additional block accesses.

Note that table fragmentation is different from file fragmentation. When a lot of DML operations are applied on a table, the table will become fragmented because DML does not release free space from the table below the HWM.

HWM is an indicator of USED BLOCKS in the database. Blocks below the high water mark (used blocks) have at least once contained data. This data might have been deleted. Since Oracle knows that blocks beyond the high water mark don't have data, it only reads blocks up to the high water mark when doing a full table scan.

DDL statement always resets the HWM.

Table size (with fragmentation)

SQL> select table_name,round((blocks*8),2)||'kb' "size"
2 from user_tables
3 where table_name = 'BIG1';

TABLE_NAME size
------------------------------ ------------------------------------------
BIG1 72952kb

Actual data in table:

SQL> select table_name,round((num_rows*avg_row_len/1024),2)||'kb' "size"
2 from user_tables
3 where table_name = 'BIG1';

TABLE_NAME size
------------------------------ ------------------------------------------
BIG1 30604.2kb

Note = 72952 - 30604 = 42348 Kb is wasted space in table

The difference between two values is 60% and Pctfree 10% (default) - so, the table has 50% extra space which is wasted because there is no data.

How to reset HWM / remove fragemenation?

For that we need to reorganize the fragmented table.

We have four options to reorganize fragmented tables:

1. alter table ... move + rebuild indexes
2. export / truncate / import
3. create table as select ( CTAS)
4. dbms_redefinition

Wednesday, January 9, 2008

GSD (Global Syncorinization Demone is a dummy service after 10.1 .
This is because iOracle does not want to support any other clusters other that CRS.

But you can still find GSD running

Eg:

Creating VIP application resource on (0) nodes.
Creating GSD application resource on (0) nodes.
Creating ONS application resource on (0) nodes.


Basically GSD is simply a dummy service . gsdctl.sh will call lsnodes in $CRS_HOME/bin.

lsnodes is obselete in 10.2 all because of GSD. in 10.2 we use olsnode

eg:

olsnodes -n nodename


but still you can find lsnodes in $CRS_HOME/bin. this is there just to show GSD service is UP.

lsnodes -n nodename will throw a syntak error ,


Same Script:

####gsdctl.sh

if olsnodes = o

then
......
......
...

return 0
else
return 0

endif;


The If condition will never be true since lsnodes has a syntak error . So the piece of code that executes in gsdctl.sh is just

return(0) from the else condition.


To check this

mv gsdct gsdct.old
touch gsdctl

srvctl start nodeapps -n



Still your cluster will function normal.


Thanks,
Sandarsh

Sunday, January 6, 2008

Live session tracing

Live session tracing

If you have identified a particular session from a concurrent request or a forms user, you can enable trace while the session is active. To do so, you must first have the spid (LOCAL=NO) process for this sid.

vi process.sql
column a.program format a40
select b.sid, b.serial#, a.spid, a.program from v$process a , v$session b
where a.addr = b.paddr and b.sid = &sid
/

SQL> @process
Enter value for sid: 919

SID SERIAL# SPID PROGRAM
---------- ---------- ------------ ------------------------------------------------
919 6335 15191 oracle@sun9999 (TNS V1-V3)

Make sure you’re running with the environment for oracle user – can’t run the oradebug statement from applmgr environment.
SQL> oradebug setospid 15191
Oracle pid: 152, Unix process pid: 15191, image: oracle@sun9999 (TNS V1-V3)
SQL> oradebug unlimit
Statement processed.
SQL> oradebug event 10046 trace name context forever, level 12
Statement processed.

When you are finished tracing…

SQL> oradebug setospid 15191 -- may not need to execute setospid again
Oracle pid: 152, Unix process pid: 15191, image: oracle@sun9999 (TNS V1-V3)
SQL> oradebug event 10046 trace name context off
Statement processed.

Your trace file will contain the spid in the string.