Saturday, March 13, 2010

oracle certification Administration-II exam can take before the course

oracle certification Administration-II exam can take before the course
--------------------------------------------------------------------

http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=151

Wednesday, March 10, 2010

Find quarter date with sql query

select add_months(to_date(to_char('0101'||to_char(:P_Date,'YYYY')),'ddmmyyyy'),to_char(:P_Date,'Q')*3)-1
from dual


select add_months(to_date(to_char('0101'||to_char(:P_Date,'YYYY')),'ddmmyyyy'),to_char(:P_Date,'Q')*3)-1
from(select sysdate from dba_objects
where rownum<=4)

select add_months(last_day(:ysdate),to_char(:ysdate,'Q')*3) as year_quarter
from dual;

oracle regular expression Pattern Description in 11g

Pattern Description

Anchoring Characters

Character Class

Desc

^

Anchor the expression to the start of a line

$

Anchor the expression to the end of a line


Equivalence Classes

Character Class

Desc

= =

Oracle supports the equivalence classes through the POSIX '[==]' syntax. A base letter and all of its accented versions constitute an equivalence class. For example, the equivalence class '[=a=]' matches ä and â. The equivalence classes are valid only inside the bracketed expression


Match Options

Character Class

Desc

c

Case sensitive matching

i

Case insensitive matching

m

Treat source string as multi-line activating Anchor chars

n

Allow the period (.) to match any newline character


Posix Characters

Character Class

Desc

[:alnum:]

Alphanumeric characters

[:alpha:]

Alphabetic characters

[:blank:]

Blank Space Characters

[:cntrl:]

Control characters (nonprinting)

[:digit:]

Numeric digits

[:graph:]

Any [:punct:], [:upper:], [:lower:], and [:digit:] chars

[:lower:]

Lowercase alphabetic characters

[:print:]

Printable characters

[:punct:]

Punctuation characters

[:space:]

Space characters (nonprinting), such as carriage return, newline, vertical tab, and form feed

[:upper:]

Uppercase alphabetic characters

[:xdigit:]

Hexidecimal characters


Quantifier Characters

Character Class

Desc

*

Match 0 or more times

?

Match 0 or 1 time

+

Match 1 or more times

{m}

Match exactly m times

{m,}

Match at least m times

{m, n}

Match at least m times but no more than n times

\n

Cause the previous expression to be repeated n times


Alternative Matching And Grouping Characters

Character Class

Desc

|

Separates alternates, often used with grouping operator ()

( )

Groups subexpression into a unit for alternations, for quantifiers, or for backreferencing (see "Backreferences" section)

[char]

Indicates a character list; most metacharacters inside a character list are understood as literals, with the exception of character classes, and the ^ and - metacharacters

n match parameter:
'c' = case sensitive
'i' = case insensitive search
'm' = treats the source string as multiple lines
'n' = allows the period (.) wild character to match newline
'x' = ignore whitespace characters

  1. REGEXP_COUNT

REGEXP_COUNT

Syntax

REGEXP_COUNT(source_string, pattern[[, start_position], [match_parameter]])

  1. REGEXP_INSTR

REGEXP_INSTR

Syntax

REGEXP_INSTR(source_string, pattern[[, start_position][, occurrence][, return_option][, match_parameter][, sub_expression]])

  1. REGEXP_LIKE

REGEXP_LIKE

Syntax

REGEXP_LIKE(source_string, pattern, match_parameter)

  1. REGEXP_REPLACE

REGEXP_REPLACE

Syntax

REGEXP_REPLACE(source_string, pattern,
replace_string, position, occurrence, match_parameter)

  1. REGEXP_SUBSTR

REGEXP_SUBSTR

Syntax

REGEXP_SUBSTR(source_string, pattern
[, position [, occurrence
[, match_parameter]]])

Oracle Application server 10g Configuration steps

AS Installment:

1. Install the Oracle Infrastructure.
2. Install the Oracle AS (Naming Convention First Infrastructure then AS)
3. Configure The AS
4. First configure the formsweb.cfg file (forms90/server/formsweb.cfg)

Details (a):
[BEFTN]
form=D:\forms\LOGON.fmx usesdi=yes [Run form in the particular path and user]
userid=halim/halim@orcl [Connect database]
width=100% [Screen width]
height=100%[Screen height]
colorscheme=blue [ Screen default color select hear]
pageTitle=SOFTWARE:: DEVELOPED BY HALIM [internet Explorer title Customize hear ]
imagebase=codebase
archive_jini=f90all_jinit.jar,rolloverbutton.jar,getclientinfo.jar,infobutton.jar,images.jar [ Stored all jar file in the \forms90\java\
webUtilArchive=frmwebutil.jar,jacob.jar
baseHTMLjinitiator=webutiljini.htm
lookAndFeel=Oracle [Look and Flee for screen it should be two option one is oracle. Its default also and another is generic]
splashscreen=test.gif [use jar file that is store in the forms\java\images.jar. If u want to store another image in the jar then first u have to open jar file by using wingip.]
logo=test.gif gif [use jar file that is store in then forms\java\images.jar. If u want to store another image in the jar then first u have to open jar file by using wingip.]
separateFrame=false (Separate frame)

5 Configure the registry.dat (forms90\java\oracle\forms\registry\ registry.dat)


a. font
default.fontMap.appFontnames=BrowalliaUPC,CordiaUPC,C39P12DlTt,C39HrP24DlTt,Tahoma,Impact,Courier New,Courier,courier,System,Terminal,Fixed,Fixedsys,Times,Times New Roman,MS Sans Serif,Arial

default.fontMap.javaFontnames=BrowalliaUPC,CordiaUPC,C39P12DlTt,C39HrP24DlTt,Tahoma,Impact,MonoSpaced,MonoSpaced,MonoSpaced,Dialog,MonoSpaced,Dialog,Dialog,Serif,Serif,Dialog,SansSerif

b. lov
app.ui.lovButtons=true

c. required
app.ui.requiredFieldVA=true

Details (b): Configure the registry.dat (forms90\java\oracle\forms\registry\ registry.dat)
app.ui.lovButtons = true [ If u want to show lovbuttons then true. By default it is flase. ]


6 Configure the cgicmd.dat(\\Ris\c$\Oracle\Ora10gAS\reports\conf\ cgicmd.dat)
shis: userid=trama/ati@orcl server=rep_ris %*

cmd : rwserver –install server=rep_ris (Report server service creator)


7 For font Ambit and Subset (Location: d:\FRHome\tools\common90\unifont.ali)

[ PDF:Embed ]
"C39P12DlTt" = "V100013_.ttf"
"C39P24DlTt" = "V100014_.ttf"
"C39P12D|Tt" = "V100013_.ttf"
"C39P24D|Tt" = "V100014_.ttf"

[ PDF:Subset ]
"C39P12DlTt" = "V100013_.ttf"
"C39P24DlTt" = "V100014_.ttf"
"C39P12D|Tt" = "V100013_.ttf"
"C39P24D|Tt" = "V100014_.ttf"
"Tahoma" = "tahoma.ttf"
"BrowalliaUPC" = "BROWAU.TTF"
"CordiaUPC" = "CORDIAU.TTF"

8 Orarrp :Mone type
AddType application/x-orarrp-text rrpt
AddType application/x-orarrp-ps rrpp
AddType application/x-orarrp-pdf rrpa
AddType application/x-orarrp-rtf rrpr
AddType application/x-orarrp-ini rrpi
AddType application/x-orarrp-html rrph

See bmp picture::

9 Create DNS Alias

10 configure the index.html(Apache\Apache\htdocs\ index.html)

webutil configure in oracle application server 10g

Webutil:

1. choose two webutil jar file paste it forms90/java/.
2. allocate it formsweb.cfg file like web UtilArchive=frmwebutil.jar,jacob.jar.
baseHTMLjinitiator=webutiljini.htm
3. chose webutil.cfg and webutiljinit.htm file and pest it forms90/server/
4. copy webutil folder forms90/
5. configuration = foms90\server\webutil.cfg change :
transfer.database.enabled=TRUE
transfer.appsrv.workAreaRoot=c:\tmp
transfer.appsrv.write.1=c:\tmp
6. configuration = D:\ora10gdevsuite\forms90\server\default.env

classpath=-------; d:\ora10gdevsuite\jdk\jre\lib\rt.jar;d:\ora10gdevsuite\forms90\java\frmwebutil.jar

WEBUTIL_CONFIG=D:\ora10gdevsuite\forms90\server\webutil.cfg

for linux add == LD_ASSUME_KERNEL=2.4.19

7. configuration for DS = D:\ora10gdevsuite\j2ee\DevSuite\application-deployments\forms\forms90web\orion_web.xml
add virtual path like



For AS u have to do:\\Ris\c$\Oracle\Ora10gAS\forms90\server\forms90.conf

AliasMatch ^/forms90/webutil/(..*) "D:\FRHome/forms90/webutil/$1"

8. create a user and run webutil script then compile webutil.pll by this user to create webutil.plx file on forms90\

9. oracle home bin :::: D:\ora10gdevsuite\forms90\webutil\sign_webutil.bat ::::: jar path

Example : D:\FRHome\bin d:\FRHome\forms90\webutil\sign_webutil.bat D:\FRHome\forms90\java\jacob.jar and D:\FRHome\forms90\java\ frmwebutil.jar


(D:\ora10gdevsuite\jdk\bin\) for jarsigner and keytool)
run cmd
like := D:\ora10gdevsuite\jdk\bin\keytool
D:\ora10gdevsuite\jdk\bin\jarsigner

formsweb.cfg file configuration in application server 10g

for this:-

configure the formsweb.cfg file (forms90/server/formsweb.cfg)

like:-

[BEFTN]
form=D:\forms\LOGON.fmx usesdi=yes [Run form in the particular path and user]
userid=halim/halim@orcl [Connect database]
width=100% [Screen width]
height=100%[Screen height]
colorscheme=blue [ Screen default color select hear]
pageTitle=SOFTWARE:: DEVELOPED BY HALIM [internet Explorer title Customize hear ]
imagebase=codebase
archive_jini=f90all_jinit.jar,rolloverbutton.jar,getclientinfo.jar,infobutton.jar,images.jar [ Stored all jar file in the \forms90\java\
webUtilArchive=frmwebutil.jar,jacob.jar
baseHTMLjinitiator=webutiljini.htm
lookAndFeel=Oracle [Look and Flee for screen it should be two option one is oracle. Its default also and another is generic]
splashscreen=test.gif [use jar file that is store in the forms\java\images.jar. If u want to store another image in the jar then first u have to open jar file by using wingip.]
logo=test.gif gif [use jar file that is store in then forms\java\images.jar. If u want to store another image in the jar then first u have to open jar file by using wingip.]
separateFrame=false (Separate frame)


url:- http:\\10.11.201.2:1521\forms90\f90servlet?config=BEFTN

Configuring font in oracle application server 10g

For this:-

Configure the registry.dat (forms90\java\oracle\forms\registry\ registry.dat)

like:-
default.fontMap.appFontnames=BrowalliaUPC,CordiaUPC,C39P12DlTt,C39HrP24DlTt,Tahoma,Impact,Courier New,Courier,courier,System,Terminal,Fixed,Fixedsys,Times,Times New Roman,MS Sans Serif,Arial

default.fontMap.javaFontnames=BrowalliaUPC,CordiaUPC,C39P12DlTt,C39HrP24DlTt,Tahoma,Impact,MonoSpaced,MonoSpaced,MonoSpaced,Dialog,MonoSpaced,Dialog,Dialog,Serif,Serif,Dialog,SansSerif

Required field validation in oracle forms 10g

For this:-

Configure the registry.dat (forms90\java\oracle\forms\registry\ registry.dat)

app.ui.requiredFieldVA=true

show lov button in oracle forms developer 10g

For this:-

Configure the registry.dat (forms90\java\oracle\forms\registry\ registry.dat)

app.ui.lovButtons = true

[ If u want to show lovbuttons then true. By default it is flase. ]

Tuesday, March 9, 2010

Host Credentials failed in em

For this, the OS user must be in “log on as a batch job” and “log on as a service” in the local security police of the server.

To do this :-
Go to "Control Panel" -> "Administrative Tools" -> "Local Security Policy."
Within "Local Policies", go to user "Right Assignment."
Add the user to "Log on as a Batch Job." And "Log on as a service".

Diagnosing source....
===========================
ORACLE_HOME\hostname_sid\log directory message

RemoteOperationException: ERROR: Invalid username and/or password

If you want to do Operating System related work with Oracle Enterprise Manager (EM)
Especially in window environment, you must need Host credentials(username and password of the server not client).
When you enter username and password then it return the following message:-

“RemoteOperationException: ERROR: Invalid username and/or password”

Solution:-

For this, the OS user must be in “log on as a batch job” and “log on as a service” in the local security police of the server.

To do this :-
Go to "Control Panel" -> "Administrative Tools" -> "Local Security Policy."
Within "Local Policies", go to user "Right Assignment."
Add the user to "Log on as a Batch Job." And "Log on as a service".

Diagnosing source....
===========================
ORACLE_HOME\hostname_sid\log directory message