rasti.hil@hilandco.com +41 79 367-9677

PL/SQL delete cookie

CREATE OR REPLACE PROCEDURE COOKIE(name VARCHAR2 DEFAULT 'SSO_ID') IS
vblob BLOB;
buffer RAW(32000);
buffer_size INTEGER := 32000;
offset INTEGER := 1;
length NUMBER;
base64 VARCHAR2(2000):='R0lGODlhDQANAPcAAAAAAIAAAACAAICAAAAAgIAAgACAgMDAwICAgP8AAAD/AP//AAAA//8A/wD//////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAADQANAAAINAAfCBxIsKDBgwcZKCSAUCEDhg8YFFw40GHFhwUJSIyI0aDDjgY1gjxIACLCByZPqlwpMCAAOw==';

--grant execute on cookie to public;
--IMG SRC="'||wwctx_api.get_server_protocol ||'://'||v_host_portal||'/portal/pls/portal/portal_tools.cookie?name=portal" style="width: 0px; height: 0px;"
BEGIN


owa_util.mime_header('image/gif',FALSE);



owa_cookie.send( name => name,
value => '',
expires => TO_DATE('01-01-1990','mm-dd-yyyy'),
path => '/',
domain => NULL,
secure => NULL);



owa_util.http_header_close;

vblob:=UTL_ENCODE.BASE64_DECODE( UTL_RAW.CAST_TO_RAW(to_char(base64)) );


length := dbms_lob.getlength(vblob);

WHILE offset < length LOOP
dbms_lob.read(vblob, buffer_size, offset, buffer);
htp.prn(utl_raw.cast_to_varchar2(buffer));
offset := offset + buffer_size;
END LOOP;

EXCEPTION
WHEN OTHERS THEN
htp.p(sqlerrm);
END;
/

ORA-28002: the password will expire within 6 days

ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;

INS-32025 when trying to install examples

Today I come across the following situation:
I have installed Oracle 11g R2 EE on Win2008 and also want to install examples from Oracle but when I started the installer i get the following error:
INS-32025: The chosen installation conflicts with software already installed in the given Oracle home.

Solution I should use Oracle Universal Installer from db instalation and change the product.xml file path.
It looks like that the installer from examples is a little buggy :)

Oracle 11.2 ACL ( Portal, Orasso)

declare

vacl VARCHAR2(64):='allnetwork.xml';

TYPE t_principals IS TABLE OF VARCHAR2(256) ;

v_principals t_principals:=t_principals('ORASSO', 'PORTAL');

begin

begin

DBMS_NETWORK_ACL_ADMIN.DROP_ACL

(

acl => vacl

);

exception

when others then

null;

end;

dbms_network_acl_admin.create_acl(

acl => vacl,

description => 'Netzwerk-Connects fuer ALLE',

principal => 'PORTAL',

is_grant => true,

privilege => 'connect'

);

DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL (

acl =>vacl,

host => '*',

lower_port => 1,

upper_port => 65000);

commit;

FOR j IN v_principals.first..v_principals.last

LOOP

DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(acl => '/sys/acls/'||vacl,

principal => v_principals(j),

is_grant => true,

privilege => 'connect');

END LOOP;

commit;

/*

SELECT * FROM
dba_network_acls n ,
dba_network_acl_privileges p
WHERE N.ACLID=P.AC
LID;


begin
DBMS_NETWORK_ACL_ADMIN.DELETE_PRIVILEGE(acl => '/sys/acls/sso-permissions.xml',
principal => 'APEX_PUBLIC_USER',
is_grant => true,
privilege => 'connect');
end;


select utl_http.request('http://webcache:8093') from dual;

select httpuritype('http://webcache:8093').clob() from dual;

*/

end;

SSO Configurations steps after renaming Oracle DB which includes Oracle SSO 10.1.4.3.0

1.1
export all entries from
orclReferenceName=dbold, cn=IAS Infrastructure Databases, cn=IAS, cn=Products, cn=OracleContext
1.2
rename dbold to dbnew in export ldif
1.3
remove all authpas..
1.4
import dbnew ldif

2.1
export all entries from
cn=DBold, cn=OracleContext
2.2
rename dbold to dbnew in export ldif
2.3
remove all authpas..
2.4
import dbnew ldif

3.1
modify seelaso attribute in orclreplicaid=host_DBOLD, cn=replication configuration
from cn=DBOLD,cn=OracleContext to cn=DBNEW,cn=OracleContext

4.1
vi $ORACLE_HOME/config/ias.properties
change
InfrastructureDBCommonName=dbold
to
InfrastructureDBCommonName=dbnew

increase wls startup time on linux

export JAVA_HOME="/oracle/product/FM/jdk1.6.0_22"
vi $JAVA_HOME/jre/lib/security/java.security
Replace securerandom.source with
securerandom.source=file:/dev/./urandom

reset weblogic password

Backup the WLS Domain
cd $DOMAIN_HOME/..
tar –cvf $DOMAIN_HOME`date +%y%m%d`.tar $DOMAIN_HOME

mv $DOMAIN_HOME/security/DefaultAuthenticatorInit.ldift /tmp/

source /oracle/product/FM/user_projects/domains/PFRDDomain/bin/setDomainEnv.sh


Run the Java command:
java weblogic.security.utils.AdminAccount weblogic pwd $DOMAIN_HOME/security

ls –l $DOMAIN_HOME/security


Delete the contents inside the file [boot.properties] under
ls -l $DOMAIN_HOME/servers/AdminServer/security

Rename/delete the folder:
ls -l $DOMAIN_HOME/servers/AdminServer/data/ldap
rm $DOMAIN_HOME/servers/AdminServer/data/ldap
ls -l $DOMAIN_HOME/servers/AdminServer/data/ldap

DB Deregistration Operation

sqlplus "sys/password as sysdba"
execute dbms_ias_version.set_component_loading (
component_id=>'MRC',
component_name=>'Oracle Application Server Metadata Repository Version',
schema_name=>'SYS' );
execute dbms_ias_version.set_component_valid( component_id=>'MRC' );

Apache Redirect BaseUrl


RewriteEngine On
RweriteRule ^/$ /apex/f?p=1

Portal Konfiguration

cd %DOMAIN_HOME%\bin
notepad setDomainEnv.cmd
set EXT_PRE_CLASSPATH=%ORACLE_HOME%\jdbc\lib\ojdbc6.jar

cd $DOMAIN_HOME/bin
vi setDomainEnv.sh
EXT_PRE_CLASSPATH=$ORACLE_HOME/jdbc/lib/ojdbc6.jar


$ORACLE_HOME/common/bin/wlst.sh
connect('weblogic', 'pwd', 'localhost:7002')

listCred(map="oracle.portal.dads", key="/pls/portal")
listCred("WEBCACHE","/pfrd_inst/webcache1/INVALIDATION")


setPortalWebcacheConfig(dad_name='portal',host='oastest.net',inv_port='8093',inv_user='invalidator',inv_passwd='pwd')

setPortalOIDConfig(dad_name='portal',host='oastest.net',port='3060',protocol=false,admin_user='cn=orcladmin',admin_passwd='pwd')

BEGIN
DBMS_NETWORK_ACL_ADMIN.drop_ACL (
acl => 'portal-permissions.xml');
END;
/

BEGIN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL (
acl => 'portal-permissions.xml',
description => 'Network connection permission for dev11_portal',
principal => 'PORTAL',
is_grant => TRUE,
privilege => 'connect');
END;
/

BEGIN
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL (
acl => 'portal-permissions.xml',
host => '*',
lower_port => null,
upper_port => null);
END;
/
commit;
/

SELECT * FROM dba_network_acls


Listen 8110
NameVirtualHost *:8110


DocumentRoot F:\oracle\product\fm\pfrd\pfrd_inst\config\OHS\ohs1\htdocs
ServerName intranet
OssoConfigFile F:\oracle\product\fm\pfrd\pfrd_inst\config\OHS\ohs1\httpintranet.conf
OssoSecureCookies off

Flashback package body

declare 
vclob clob;
begin
for c1 in (select text
            from all_source as of timestamp
             to_timestamp('02-05-2011 12:51:00', 'DD-MM-YYYY HH24:MI:SS')
                 where name = 'PACKAGE NAME'
                   and type = 'PACKAGE BODY'
                   and owner = 'SCHEMA NAME')
    
    loop
     vclob :=vclob||c1.text;
    end loop;
    insert into tempTable (v_clob) values (vclob);
end ;

Start Stop Script Oracle Fusion Middleware

Start
#!/bin/bash
# Applicationserver Infrastructure start
#vi $DOMAIN_HOME/servers/AdminServer/security/boot.properties
#username=weblogic
#password=
#vi $DOMAIN_HOME/servers/wls_ods1/security/boot.properties
#username=weblogic
#password=



MW_HOME=/oracle/product/FM;export MW_HOME
DOMAIN_HOME=$MW_HOME/user_projects/domains/IDMDomain;export DOMAIN_HOME
INSTANCE_HOME=$MW_HOME/oid11inst;export INSTANCE_HOME
WL_HOME=$MW_HOME/wlserver_10.3;export WL_HOME
ORACLE_HOME=$MW_HOME/oid11;export ORACLE_HOME
ORACLE_INSTANCE=$INSTANCE_HOME;export ORACLE_INSTANCE
ADMIN_SERVER=t3://localhost:7001;export ADMIN_SERVER

$INSTANCE_HOME/bin/opmnctl startall

nohup $WL_HOME/server/bin/startNodeManager.sh >/dev/null 2>/dev/null &
nohup $DOMAIN_HOME/bin/startWebLogic.sh >/dev/null 2>/dev/null &
sleep 30
nohup $DOMAIN_HOME/bin/startManagedWebLogic.sh wls_ods1 $ADMIN_SERVER >/dev/null 2>/dev/null &
#sleep 120

# Applicationserver SSO start
#


ORACLE_SID=sso;export ORACLE_SID
ORAENV_ASK=NO;export ORAENV_ASK
. oraenv
$ORACLE_HOME/opmn/bin/opmnctl startall
emctl start iasconsole



# Applicationserver Middletier start
#
#vi $DOMAIN_HOME/servers/AdminServer/security/boot.properties
#username=weblogic
#password=
#vi $DOMAIN_HOME/servers/WLS_PORTAL/security/boot.properties
#username=weblogic
#password=
#vi $DOMAIN_HOME/servers/WLS_FORMS/security/boot.properties
#username=weblogic
#password=
#vi $DOMAIN_HOME/servers/WLS_REPORTS/security/boot.properties
#username=weblogic
#password=
#vi $DOMAIN_HOME/servers/WLS_DISCO/security/boot.properties
#username=weblogic
#password=

MW_HOME=/oracle/product/FM;export MW_HOME
DOMAIN_HOME=$MW_HOME/user_projects/domains/PFRDDomain;export DOMAIN_HOME
INSTANCE_HOME=$MW_HOME/pfrdinst_1;export INSTANCE_HOME
WL_HOME=$MW_HOME/wlserver_10.3;export WL_HOME
ORACLE_HOME=$MW_HOME/pfrd_1;export ORACLE_HOME
ORACLE_INSTANCE=$INSTANCE_HOME;export ORACLE_INSTANCE
ADMIN_SERVER=t3://localhost:7002;export ADMIN_SERVER
$INSTANCE_HOME/bin/opmnctl startall


nohup $DOMAIN_HOME/bin/startWebLogic.sh >/dev/null 2>/dev/null &

sleep 30
nohup $DOMAIN_HOME/bin/startManagedWebLogic.sh WLS_PORTAL $ADMIN_SERVER >/dev/null 2>/dev/null &
nohup $DOMAIN_HOME/bin/startManagedWebLogic.sh WLS_FORMS $ADMIN_SERVER >/dev/null 2>/dev/null &
nohup $DOMAIN_HOME/bin/startManagedWebLogic.sh WLS_REPORTS $ADMIN_SERVER >/dev/null 2>/dev/null &
nohup $DOMAIN_HOME/bin/startManagedWebLogic.sh WLS_DISCO $ADMIN_SERVER >/dev/null 2>/dev/null &
#sleep 120






#Start Agent
#
ORACLE_SID=A11;export ORACLE_SID
ORAENV_ASK=NO;export ORAENV_ASK
. oraenv
emctl start agent
unset ORAENV_ASK

stop
#!/bin/bash

# Applicationserver Middletier stop
#

MW_HOME=/oracle/product/FM;export MW_HOME
DOMAIN_HOME=$MW_HOME/user_projects/domains/PFRDDomain;export DOMAIN_HOME
INSTANCE_HOME=$MW_HOME/pfrdinst_1;export INSTANCE_HOME
WL_HOME=$MW_HOME/wlserver_10.3;export WL_HOME
ORACLE_HOME=$MW_HOME/pfrd_1;export ORACLE_HOME
ORACLE_INSTANCE=$INSTANCE_HOME;export ORACLE_INSTANCE
ADMIN_SERVER=t3://localhost:7002;export ADMIN_SERVER
$INSTANCE_HOME/bin/opmnctl stopall

$DOMAIN_HOME/bin/stopManagedWebLogic.sh WLS_PORTAL $ADMIN_SERVER
#$DOMAIN_HOME/bin/stopManagedWebLogic.sh WLS_PORTAL $ADMIN_SERVER
$DOMAIN_HOME/bin/stopManagedWebLogic.sh WLS_FORMS $ADMIN_SERVER
$DOMAIN_HOME/bin/stopManagedWebLogic.sh WLS_REPORTS $ADMIN_SERVER
$DOMAIN_HOME/bin/stopManagedWebLogic.sh WLS_DISCO $ADMIN_SERVER

$DOMAIN_HOME/bin/stopWebLogic.sh
#sleep 120

ORACLE_SID=sso;export ORACLE_SID
ORAENV_ASK=NO;export ORAENV_ASK
. oraenv
$ORACLE_HOME/opmn/bin/opmnctl stopall
emctl stop iasconsole

# Applicationserver Infrastructure stop
#
MW_HOME=/oracle/product/FM;export MW_HOME
DOMAIN_HOME=$MW_HOME/user_projects/domains/IDMDomain;export DOMAIN_HOME
INSTANCE_HOME=$MW_HOME/oid11inst;export INSTANCE_HOME
WL_HOME=$MW_HOME/wlserver_10.3;export WL_HOME
ORACLE_HOME=$MW_HOME/oid11;export ORACLE_HOME
ORACLE_INSTANCE=$INSTANCE_HOME;export ORACLE_INSTANCE
ADMIN_SERVER=t3://localhost:7001;export ADMIN_SERVER

$INSTANCE_HOME/bin/opmnctl stopall

$DOMAIN_HOME/bin/stopManagedWebLogic.sh wls_ods1 $ADMIN_SERVER
$DOMAIN_HOME/bin/stopWebLogic.sh
#sleep 120

killall startNodeManager.sh


#Stop Agent
#
ORACLE_SID=A11;export ORACLE_SID
ORAENV_ASK=NO;export ORAENV_ASK
. oraenv
emctl stop agent
unset ORAENV_ASK

WLS as Windows Service

AdminServer
SETLOCAL
set DOMAIN_NAME=IDMDomain
set USERDOMAIN_HOME=F:\oracle\product\fm\idm\user_projects\domains\IDMDomain
set SERVER_NAME=AdminServer
set PRODUCTION_MODE=false
set JAVA_VENDOR=Sun
set JAVA_HOME=F:\oracle\product\fm\jdk
set MEM_ARGS=-Xms256m-Xmx512m
set WLS_USER=weblogic
set WLS_PW=
call "F:\oracle\product\fm\idm\user_projects\domains\IDMDomain\bin\setDomainEnv.cmd"
call "F:\oracle\product\fm\idm\wlserver_10.3\server\bin\installSvc.cmd"
ManagedServer
SETLOCAL
set DOMAIN_NAME=IDMDomain
set USERDOMAIN_HOME=F:\oracle\product\fm\idm\user_projects\domains\IDMDomain
set SERVER_NAME=wls_ods1
set PRODUCTION_MODE=false
set JAVA_VENDOR=Sun
set JAVA_HOME=F:\oracle\product\fm\jdk
set MEM_ARGS=-Xms256m-Xmx512m
set WLS_USER=weblogic
set WLS_PW=
set ADMIN_URL=http://localhost:7001
call "F:\oracle\product\fm\idm\user_projects\domains\IDMDomain\bin\setDomainEnv.cmd"
call "F:\oracle\product\fm\idm\wlserver_10.3\server\bin\installSvc.cmd"

WebDav in Windows 7

cmd

net use g: https://mediacenter.gmx.net password /user:mail@gmx.net

Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall the operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

To work around this issue, follow these steps:

1. Click Start, type regedit in the Start Search box, and then click regedit in the Programs list.
2. Locate and then right-click the following registry subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters
3. Point to New, and then click DWORD (32-bit) Value.
4. In the right pane, type BasicAuthLevel to name the new registry entry, and then press ENTER.
5. On the Edit menu, click Modify.
6. In the Value data box, type 2, and then click OK.

Note The mapping is as follows:
* 0 - Basic authentication disabled
* 1 - Basic authentication enabled for Secure Sockets Layer (SSL) shares only
* 2 or greater - Basic authentication enabled for SSL shares and for non-SSL shares
7. Restart the computer.

Source:http://support.microsoft.com/kb/928692/en