Tuesday, December 11, 2012


Changing Sequence by resetting Value of DID

This example demonstrates to start value of DID with 410000000 

DROP SEQUENCE IDCSEQREVID
CREATE SEQUENCE  "UAT_OCS"."IDCSEQREVID"  MINVALUE 410000000 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 410000000 CACHE 200 ORDER  NOCYCLE
SELECT IDCSEQREVID.NEXTVAL S FROM DUAL;

Verify if Custom IDOCScript working or not

In this example I want to verify for dID value by writing a small IDOCScript  by playing with its substring and Length.
and testing it in doc_info.htm file as shown in the path below. Open browser and type like this below to check your updated idocscript:
http://abc.com:16200/cs/idcplg?IdcService=DOC_INFO&dID=47401&dDocName=CREATDEC11100627CET2012

/WeblogicInstance/soft/oracle_ecm/middleware/Oracle_ECM1/ucm/idc/resources/core/templates/doc_info.htm
Edit this file and put your code to test the output

<$include std_doctype_html_decl$>
<head>
<$include std_info_html_head_declarations$>
</head>
Sreeram
<$dID/2$>
<$include info_body_def$>

<$include info_page_content$>

</body>
</html>

<$strSubstring(dID,0,2)$>
<$if strLength(dID) >2$><$subString(dID,strlength(dID)-3)$><$else$><$dID$><$endif$>


UCM Query with Date

select did,dindate,dcreatedate from revisions where (dInDate >={ts '2012-05-31 
0:46:38'} and dInDate <={ts '2012-06-02 0:46:38'})

UPDATE DATE TIME

Update revisions set dInDate = TO_DATE(to_char(dInDate, 'hh24')||':'||to_char(to_char(dInDate,'mi')+10) ||':'||to_char(dInDate, 'ss'),'hh24:mi:ss') where did=1000522404

the above query is adding 10minutes

Finding LOG FILE Details like htm file

http://abc.com:16200/cs/groups/secure/logs/IdcLog11.htm

/mnt/stellent_data_acc/weblayout/groups/secure/logs/IdcLog11.htm

UCM CONFIG 11G

/WEBLOGIC/soft/oracle_ecm/middleware/user_projects/domains/sites_ecm_domain/ucm/cs/config/config.cfg

/WEBLOGIC/soft/oracle_ecm/middleware/user_projects/domains/sites_ecm_domain/ucm/cs/bin/intradoc.cfg

Logging Enable Disable Tracing in UCM

Administration--->System Audit Information

Tracing Sections Information
Verbose Full Verbose Tracing
Active Sections
Save Save for node 'abcserver' 

UCM DocMeta Defintion


SELECT ROWID, ORA_ROWSCN, DNAME DNAME, DTYPE DTYPE, DISREQUIRED DISREQUIRED, DISENABLED DISENABLED, DISSEARCHABLE DISSEARCHABLE, DCAPTION DCAPTION, DISOPTIONLIST DISOPTIONLIST, DOPTIONLISTKEY DOPTIONLISTKEY, DDEFAULTVALUE DDEFAULTVALUE, DORDER DORDER, DOPTIONLISTTYPE DOPTIONLISTTYPE, DISPLACEHOLDERFIELD DISPLACEHOLDERFIELD, DCATEGORY DCATEGORY, DEXTRADEFINITION DEXTRADEFINITION, DDECIMALSCALE DDECIMALSCALE, DCOMPONENTNAME DCOMPONENTNAME FROM "ABC_OCS"."DOCMETADEFINITION"


UCM Content Server Error 

1Node1: Unable to start the providers for 'Idc Content Service idc'. Unable to start the system provider 'SystemServerSocket'. Could not listen on address 10.102.65.46 port 4444. java.net.BindException: Address already in use: JVM_Bind [ Details ] 

[stellent@l0305 etc]$ lsof -i:4445
COMMAND  PID     USER   FD   TYPE   DEVICE SIZE NODE NAME
java    8133 stellent   42u  IPv6 55860648       TCP l0305.abc,com:4445 (LISTEN)
[stellent@l0305 etc]$ kill -9 8133

and restart the server it works:

UCM Important Directories

New Fusion Middleware root for all apps
/u10/fmw
c:\oracle\fmw

Domain home (Example)
<fmw>/user_projects/domains/ucm_domain

TWO new UCM Homes (Example)
<domain-home>/ucm/cs/
contains configuration, custom components, vault, weblayout
<fmw>/Oracle_ECM/ucm/idc/
contains static resources, system components, patches, samples

Each “Server” has it own log file directory
example: <domain>/servers/UCM_server/logs/

Start Weblogic admin server
<fmw>/user_projects/domains/ucm_domain/startWebLogic.sh

Start Weblogic Node Manager:
<fmw>/wlserver_10.3/server/bin/startNodeManager.sh

Start MANAGED UCM from command line:
<fmw>/user_projects/domains/ucm_domain/bin/startManagedWebLogic.sh UCM_server http://localhost:7001

Stand-alone applications
<domain-home>/ucm/cs/bin/
Need to create a “Local” user through applets before using these

STARTING/STOPPING MANAGED UCM from NodeManager

Starting Node Manager on Server

Login to server with putty – Node Manager is there on each server.
Go to /WEBLOGIC/oracle/middleware/user_projects/nodemanager
Folder on the server is to be selected as per the last octet of server IP. 
Example abc.com or 10.68.138.62 is connected to node manager in s62
In this folder there is startNodeManagerSMF.sh execute this shell file to start the node manager.

Starting Admin Server with WLST 

Login to server with putty – Admin Server.
Go to /WEBLOGIC/oracle/middleware/wlserver_10.3/common/bin
Execute wlst.sh
Command Prompt for WLST  will come(It will take some time to get started)
For ECM Execute Command: 
nmConnect('weblogic','<ecm_weblogic_Password>','abc.com','5556','ecm4crm_domain',nmType='plain') – Wait for connect message to come
nmStart('UCM_admin') – Wait for Admin Server to start a message will come for the same
nmDisconnect()
exit()

Create Dispersion Rule  with Custom Date for default Storage Rule

Administration-->Providers-->DefaultFileStore-->Info-->Edit-->default storage-->Add Rule or Edit Rule

$#env.VaultDir$$dDocType$/$dDocAccount$/$DisperseOnYear$/$DisperseOnMonth$/$DisperseOnDay$/$dID$$ExtensionSeparator$$dExtension$

Update provider.hda with this information:

/WEBLOGIC/middleware/user_projects/domains/ecm4crm_domain/ucm/cs/data/providers/defaultfilestore/provider.hda

@ResultSet PathMetaData
6
FieldName
GenerationAlgorithm
RequiredForStorage
OverrideClientValue
Arguments
ArgumentFields
DisperseOnYear
idocscript

false
<$formatDateWithPattern(parseDate(dInDate), "yyyy")$>
dInDate
DisperseOnMonth
idocscript

false
<$formatDateWithPattern(parseDate(dInDate), "MM")$>
dInDate
DisperseOnDay
idocscript

false
<$formatDateWithPattern(parseDate(dInDate), "dd")$>
dInDate
dID

Connecting to DB from Server

cd /u01/app/oracle/product/11.2.0/client_1/bin
export PATH=$PATH:/u01/app/oracle/product/11.2.0/client_1/
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/client_1/
./sqlplus dev_acb/dev_acb@//dbcloud124-scan.db.gen.local:1521/abc.o.database

EXECUTE SCRIPT FILE in SQLPLUS

To execute a script file in SQLPlus, type @ and then the file name.

    SQL >  @{file}

For example, if your file was called script.sql, you'd type the following command at the SQL prompt:

    SQL >  @script.sql

The above command assumes that the file is in the current directory. (ie: the current directory is usually the directory that you were located in before you launched SQLPlus.)

If you need to execute a script file that is not in the current directory, you would type:

    SQL >  @{path}{file}

For example:

    SQL >  @/oracle/scripts/script.sql

Query to add constants and Variables to update


select '/mnt/groups/'|| r.dSecurityGroup||'/documents/'||r.dDocType||'/'||to_char(r.dindate,'yyyy/mm/dd')||'/'||d.xBatchId||'/'||r.dDocName||'.'||r.dWebExtension as WebPath  from revisions r, docmeta d where r.did=d.did and d.did in(select did from TestTable);

WEBLOGIC Address already in use


Also you may get an error like 'ERROR: transport error 202: bind failed: Address already in use'.
This is caused because 2 managed servers are using the same debugging port.
If this is the case then you can edit the setDomainEnv.sh file and turn debugging off.
Do this by searching for debugFlag="true" and set it to false, e.g. debugFlag="false".

/WEBLOGIC/oracle/middleware/user_projects/domains/mydomain/bin/setDomainEnv.sh

Connecting to Remote system (ftp box to local)

scp Set1_CEExport_Group3_1.xml weblogicdev@abc.com:/home/weblogicdev
scp log14.txt weblogicdev@abc.com:/home/weblogicdev

Change FileStore

https://blogs.oracle.com/ecmarch/entry/changes_to_file_store_provider

RIDC Service Examples

http://dhanunjay-talking2ucmridc.blogspot.nl/

Creating Profiles and Rules in UCM

http://redstack.wordpress.com/2009/06/03/creating-a-custom-profile-in-oracle-ucm/

Running Java from UNIX

export CLASSPATH=$CLASSPATH:/home/test/lib/commons-lang-2.4.jar:/home/test/lib/commons-logging-1.1.1.jar:/home/test/lib/commons-logging-api-1.1.1.jar:/home/test/lib/idcserver.jar:/home/test/lib/jaxen.jar:/home/test/lib/jdom.jar:/home/test/lib/log4j-1.2.15.jar:/home/test/lib/ojdbc5.jar:/home/test/lib/oracle.ucm.ridc-11.1.1.jar:/home/test/lib/resolver.jar:/home/test/lib/xerces.jar:

Used one class file by combing other two classes as one....

javac Import.java

java Import

Weblogic Terminology

Servers
a JVM running an instance of a WebLogic server, and its own configuration
sometimes referred to as an “instance”

Machine
a physical machine that is running one or more Servers

Admin Server
admin interface to stop/start instances, and configure WebLogic resources
use it to set configuration for multiple machines, multiple servers
configure services, like database pooling, and message queues

Managed Server
a WLS instance that can be controlled by the admin server
stop / start / configure
can run your managed server on the same instance as admin server
or, can run on a separate machine

Node Manager
tiny Java application, installed on every physical machine
admin server needs it to stop/start managed servers on remote machines
runs as a Windows Service, or a Unix daemon

Cluster
a group of multiple managed servers that are considered one logical unit
share the same data sources (database, configuration, files) 

Domain
collection of WebLogic machines, instances, and servers
has one and only one WebLogic Admin Server
pulls it all together!

Deployment
A JEE Application that is installed on this domain, and made available
Can “deploy” it to multiple “Servers”
UCM 11g is now 5 “deployments”:
UCM Core, UCM Help, Web Services, Native Web Services, UCM Admin Server

USER MANAGEMENT:
Entirely handled by Weblogic container security
no more UCM-specific security
can still have a web-server proxy in the front end

no more "sysadmin"
still created as local user, but password is secret and tough to change

The "weblogic" user is the new “sysadmin”

JPS / JAAS based security infrastructure
standard communication for external user directories
default JPS provider: user management in WebLogic
"Local" users no longer exist!
if you want to run the stand-alone applets, manually create a Local user
could be a problem migrating "External" or "Local" users

JPS role-mapping mechanism
JPS provider from UCM to Weblogic for authorization
LDAP providers still supported
will some day be 100% replaced by JPS providers
by default, a JPS Group maps directly to a UCM Role
any group that starts with an "@" symbol is an account
Use the standard naming conventions: "@account_rwda" 

Single Sign On now integrates with WebLogic, not UCM
does not support Windows Integrated Authentication out-of-the-box
must create a custom JAAS/GSSAPI security filter


CLUSTERING:

Uses some WebLogic infrastructure
still requires shared file system in 11g
however, new cluster node install is easier

Best practice for clustering:
clusters have same version of WLS, and identical hardware

shared disk subsystem: shared database, shared filesystem
why? multiple JVMs that all need to access the same data
at runtime, everything needs to get at the same bits

WebLogic operations control
monitor the cluster's performance, see if you need to add more

PERFORMANCE:

Overall in 11g performance is 2x to 4x improved
official numbers not yet released
Appears to be I/O limited

Where will the new performance problems be?
Database “batching”, Indexing, File I/O, Network I/O, Latency

The trouble with "jsessionid"
Makes using a reverse proxy significantly more difficult
Will need different techniques for high-performance web sites
Content Deliver Networks, Sprites, smarter caches

TROUBLESHOOTING:

Where are my logs?!?
<domain>/servers/UCM_server/logs/
Text files are always superior to a web interface for low-level debugging

Enable a tracing flag to get more log info

Web logs are still present for the “big” errors

ECID tracking number
track request over multiple applications
GuiView that tracks ECID in FMC