donderdag 26 januari 2012

Some deprecated commands clusterware 11.2 and their replacements



Deprecated command

11.2 replacement
crs_stat crsctl check cluster -all
crsctl stat res -t
crs_start crsctl start resource
crsctl start crs
crsctl start cluster
crs_stop crsctl stop resource
crsctl stop crs
crsctl stop cluster
crsctl check crsd crsctl check crs
crsctl check cssd crsctl check css
crsctl check evmd crsctl check evm
crsctl start resources crsctl start resource -all
crsctl stop resources crsctl stop resource -all

woensdag 12 januari 2011

Set Global User Inactivity Timeout (GITO) SSO

cd $ORACLE_HOME/sso/admin/plsql/sso

sqlplus orasso/xxxx@infra_db

SQL> @ssogito
=============================================
SSO Server Inactivity Timeout Configuration
=============================================
Timeout          : DISABLED
Cookie name      : OSSO_USER_CTX
Cookie domain    : .domain.com
Inactivity period: 15 minutes
Encryption key   : G2N3011T68FD152W
-------------------------------------------
To disable timeout set inactivity period
to 0, (zero)
Press return key twice if you do not want
to change timeout configuration.

PL/SQL procedure successfully completed.

Enter value for timeout_cookie_domain: .domain.com
Enter value for inactivity_period: 15
Timout                   : ENABLED
New timeout cookie domain: .domain.com
New inactivity period    : 15 minutes

PL/SQL procedure successfully completed.

No errors.

SQL>exit

Restart HTTP Server and SSO Server:

opmnctl restartproc process-type=OC4J_SECURITY
opmnctl restartproc process-type=HTTP_Server


Check "OssoIdleTimeout" parameter in mod_osso.conf on the MID TIERS.
To activate gito, the parameter must be set to "on".

vi $ORACLE_HOME/Apache/Apache/conf/mod_osso.conf


LoadModule osso_module libexec/mod_osso.so

<IfModule mod_osso.c>

   OssoIpCheck off
   OssoIdleTimeout on
#   OssoIdleTimeout off

...
..

</IfModule>


Restart the HTTP Server(s) of the MID TIER(S):


opmnctl restartproc process-type=HTTP_Server

maandag 3 januari 2011

Recreate EM Repository RDBMS 11g

db11genv-oracle@vm5oelr5 /u01/oracle/db/11.2.0/db_1/network/admin>

emca -config dbcontrol db -repos recreate

STARTED EMCA at Jan 3, 2011 1:53:51 PM
EM Configuration Assistant, Version 11.2.0.0.2 Production
Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Enter the following information:
Database SID: testdb11g
Listener port number: 1521
Listener ORACLE_HOME [ /u01/oracle/db/11.2.0/db_1 ]:
Password for SYS user: 
Password for DBSNMP user: 
Password for SYSMAN user: 
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
-----------------------------------------------------------------

You have specified the following settings

Database ORACLE_HOME ................ /u01/oracle/db/11.2.0/db_1

Local hostname ................ vm5oelr5
Listener ORACLE_HOME ................ /u01/oracle/db/11.2.0/db_1
Listener port number ................ 1521
Database SID ................ testdb11g
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............

-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Jan 3, 2011 1:54:12 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/oracle/cfgtoollogs/emca/testdb11g/emca_2011_01_03_13_53_51.log.
Jan 3, 2011 1:54:13 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Jan 3, 2011 1:57:00 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Jan 3, 2011 1:57:00 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Jan 3, 2011 2:03:27 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Jan 3, 2011 2:03:37 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Jan 3, 2011 2:05:09 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Jan 3, 2011 2:05:14 PM oracle.sysman.emcp.util.DBControlUtil configureSoftwareLib
INFO: Software library configured successfully.
Jan 3, 2011 2:05:14 PM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary
INFO: Deploying Provisioning archives ...
Jan 3, 2011 2:05:55 PM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary
INFO: Provisioning archives deployed successfully.
Jan 3, 2011 2:05:55 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Jan 3, 2011 2:06:43 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Jan 3, 2011 2:06:43 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Jan 3, 2011 2:08:22 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Jan 3, 2011 2:08:22 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://vm5oelr5:5500/em <<<<<<<<<<<
Jan 3, 2011 2:08:28 PM oracle.sysman.emcp.EMDBPostConfig invoke
WARNING:
************************  WARNING  ************************

Management Repository has been placed in secure mode wherein Enterprise Manager data will be encrypted.  The encryption key has been placed in the file: /u01/oracle/db/11.2.0/db_1/vm5oelr5_testdb11g/sysman/config/emkey.ora.   Please ensure this file is backed up as the encrypted data will become unusable if this file is lost.

***********************************************************
Enterprise Manager configuration completed successfully
FINISHED EMCA at Jan 3, 2011 2:08:28 PM
db11genv-oracle@vm5oelr5 /u01/oracle/db/11.2.0/db_1/network/admin>

woensdag 22 december 2010

OAS: show oc4j memory usage with opmnctl (10.1.3)

opmnctl status -fmt cmp%mem%hpz%pme%sme

Processes in Instance: test_instance
--------------+---------+----------+---------+--------
ias-component | memused | heapsize | privmem | shrdmem
--------------+---------+----------+---------+--------
ASG | N/A | N/A | N/A | N/A
OC4JGroup:coreman_group | 220960 | 0 | 205928 | 15032
OC4JGroup:esbdt_group | 396560 | 0 | 380888 | 15672
OC4JGroup:soa_group | 1555096 | 0 | 1510424 | 44672
OC4JGroup:default_group | 185420 | 0 | 170472 | 14948
HTTP_Server | 1035640 | 0 | 1024396 | 11244

dinsdag 14 december 2010

rdbms: trace session with logon trigger

Just a simple logon trigger to trace an user session:


create or replace trigger set_session_trace after logon on database
begin
if user ='$USER' then
  execute immediate 'alter session set timed_statistics = true';
  execute immediate 'alter session set max_dump_file_size = unlimited';
  execute immediate 'alter session set tracefile_identifier = ''trace_session_$USER''';
  execute immediate 'alter session set events ''10046 trace name context forever, level 12'' ';
end if;
end;
/


$USER: username

Trace levels (10046):

0: Turn off
1: Basic sql trace ( equal to alter session set sql_trace=true )
4: Level 1 plus bind variables
8: Level 1 plus wait events
12: Level 1 plus bind variables and wait event information

woensdag 8 december 2010

OID: Failed to start OID

Oracle OID failed to start

Check $INFRA_HOME/ldap/log/oidmon.log:

2010/12/08:11:42:51 * [oidmon]: Unable to connect to database,
            will retry again after 20 sec
2010/12/08:11:43:11 * Connecting to database, connect string is infra
2010/12/08:11:43:11 * [gsdsiConnect] ORA-1017, ORA-01017: invalid username/password; logon denied

Problem: ODS password in infra instance wallet file differs from ODS password in INFRA database.

Solution: Recreate wallet file (password):

cd $INFRA_HOME/ldap/admin

oidpasswd connect=oaiinfra create_wallet=true
password: xxxx

infra = connect string infra database (mdr)
password = ODS password

maandag 6 december 2010

SSO: Internal Server Error 500, Partner application configuration not found

In INFRA_HOME/sso/log/ssoServer.log


Mon Dec 06 12:31:12 CET 2010 [DEBUG] AJPRequestHandler-ApplicationServerThread-9 exception before getAuthLevel
oracle.security.sso.server.conf.ConfigurationException: Partner application configuration not found:7AD3DE1B
        at oracle.security.sso.server.conf.DatabaseConfigReader.getPartnerConfiguration(DatabaseConfigReader.java:134)
        at oracle.security.sso.server.auth.AuthDirector.getAuthLevel(AuthDirector.java:181)
        at oracle.security.sso.server.ui.SSOLoginServlet.doPost(SSOLoginServlet.java:345)
        at oracle.security.sso.server.ui.SSOLoginServlet.doGet(SSOLoginServlet.java:307)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:835)
        at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:341)
        at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:852)
        at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:231)
        at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:136)
        at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
        at java.lang.Thread.run(Thread.java:534)




Reregister Partner Application:

$ORACLE_HOME/sso/bin/ssoreg.sh -oracle_home_path $ORACLE_HOME -site_name mijn_site -config_mod_osso TRUE -mod_osso_url
https://mysite.tst.nl -virtualhost -config_file $INFRA_HOME/Apache/Apache/conf/osso/osso_mysite.conf -remote_midtier -admin_info cn=orcladmin

Check INFRA Database :

select SITE_TOKEN,SITE_ID,SITE_NAME,START_DATE from orasso.wwsso_papp_configuration_inf_t ;

Restart INFRA Tier and MID Tier

opmnctl shutdown && opmnctl startall