Search This Blog

Friday, May 1, 2015

Enabling and Disabling FND Debug from Backend


Basically Two reasons why we need to enable/disable FND debug from backend.
1.When trying to enable “FND: Debug Log Enabled”, in the below window, it might gray out and may not allow you to change it.
Capture

2. Sometimes it happens when you see something like “FND Debug Enabled, this might reduce the performance” on the Login Screen, that time it becomes difficult to disable it from front end, as you may not be able to navigate or open the profile option form.
——————————-  Come'on Lets play now  ——————————–

-------------------------------------------------------------------------------------------------------------------------------------------------------------------
To Enable FND DEBUG
-------------------------------------------------------------------------------------------------------------------------------------------------------------------

SQL> SELECT PROFILE_OPTION_ID,PROFILE_OPTION_NAME FROM FND_PROFILE_OPTIONS_VL
WHERE START_DATE_ACTIVE <= SYSDATE
and NVL(END_DATE_ACTIVE,SYSDATE) >= SYSDATE
and ( SITE_ENABLED_FLAG = 'Y' or APP_ENABLED_FLAG = 'Y'
or RESP_ENABLED_FLAG = 'Y' or USER_ENABLED_FLAG = 'Y'
or SERVER_ENABLED_FLAG = 'Y' or SERVERRESP_ENABLED_FLAG = 'Y'
 or ORG_ENABLED_FLAG = 'Y')
and ( UPPER(USER_PROFILE_OPTION_NAME) LIKE '%FND%DEBUG%'
and (USER_PROFILE_OPTION_NAME LIKE '%f%' or
USER_PROFILE_OPTION_NAME LIKE '%F%'))
order by user_profile_option_name;


PROFILE_OPTION_ID PROFILE_OPTION_NAME
—————– ———————————–
4176         AFLOG_ENABLED
3098       AFLOG_FILENAME
3099       AFLOG_LEVEL
8470       AFLOG_BUFFER_MODE
3100       AFLOG_MODULE
8468 DEBUG RULE THRESHOLD
6 rows selected.

-------------------------------------------------------------------------------------------------------------------------------------------------------------------
Note Down this Profile_option_id for “AFLOG_ENABLED”
Now Execute another sql which will let you know the Value of that PROFILE_OPTION
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
SQL> 
col profile_option_value for A20;
col profile_option_id for 999999999;
select PROFILE_OPTION_ID, PROFILE_OPTION_VALUE from FND_PROFILE_OPTION_VALUES
where profile_option_id in ('4176','3098','3099');
SQL>
--------------------------------------------------------------------------------------------------------------------------
Now Update the Status as follows:
--------------------------------------------------------------------------------------------------------------------------
SQL> update FND_PROFILE_OPTION_VALUESset PROFILE_OPTION_VALUE = 'Y' where PROFILE_OPTION_VALUE = 'N'and PROFILE_OPTION_ID = 4176;
SQL> Commit;
Commit complete.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
** To disable it, just set it to NO again  **
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
SELECT PROFILE_OPTION_ID,PROFILE_OPTION_NAME FROM FND_PROFILE_OPTIONS_VL
WHERE START_DATE_ACTIVE <= SYSDATE
and NVL(END_DATE_ACTIVE,SYSDATE) >= SYSDATE
and ( SITE_ENABLED_FLAG = 'Y' or APP_ENABLED_FLAG = 'Y'
or RESP_ENABLED_FLAG = 'Y' or USER_ENABLED_FLAG = 'Y'
or SERVER_ENABLED_FLAG = 'Y' or SERVERRESP_ENABLED_FLAG = 'Y'
or ORG_ENABLED_FLAG = 'Y')
and ( UPPER(USER_PROFILE_OPTION_NAME) LIKE '%FND%DEBUG%'
and (USER_PROFILE_OPTION_NAME LIKE '%f%' or USER_PROFILE_OPTION_NAME LIKE '%F%'))
order by user_profile_option_name

 PROFILE_OPTION_ID    PROFILE_OPTION_NAME
—————–    ——————-
4176       AFLOG_ENABLED3098       AFLOG_FILENAME3099       AFLOG_LEVEL8479       AFLOG_BUFFER_MODE3100       AFLOG_MODULE8465       DEBUG RULE THRESHOLD

select PROFILE_OPTION_ID, PROFILE_OPTION_VALUE from FND_PROFILE_OPTION_VALUES
where profile_option_id in ('4176','3098','3099');
PROFILE_OPTION_ID PROFILE_OP
—————– ———-
3099       1
4176       Y
3098       NULL
SQL> update FND_PROFILE_OPTION_VALUESset PROFILE_OPTION_VALUE = 'N'where PROFILE_OPTION_VALUE = 'Y'and PROFILE_OPTION_ID = 4176;  => AFLOG_ENABLED will show ‘N’ now

I Hope this will definitely help you !!!
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
-v3nom
-------------------------------------------------------------------------------------------------------------------------------------------------------------------

Sunday, April 26, 2015

VI editor Tips and Tricks

vi editor in Linux is the best tool to create / edit a file. It has got more functions then any other Linux Editor (if you don't have access to GUI).
I am trying to keep this post as simple as I can. If you have any doubt or queries please ask.
In this post we will cover some exciting tricks and methods which I bet will be quite effective. 
I have categorized them in the following topics.
Now lets check them one by one.

---------------------------------------------------------------------------------------------------------------------
changing text
ccchange a line
Cchange from current cursor position to the end-of-line
cwchange from current cursor position to the end of the word
Jjoins the next line to the current line (inserts a space between the two)
gJjoins the next line to the current line (without a space)
:12,24jjoin lines 12 thru 24, leaving a space between each line.
~switch lower and upper cases
rreplace the current character with the next character typed
4rxreplace next four characters with "x"
Roverwrite until <esc>
ssubstitute the current character and go into insert mode. Same as "rxi <ESC>"
Ssubstitute the current line, erase it, and go into insert mode, starting at the indentation of the line. Same as "cc"
>>shift current line forward
3>>shift three lines forward
>%shift all lines until a matching brace or parenthesis
>}shift to the end of the paragraph
>'mshift to the marked line
<<shift current line backward
vEUchange from here to end of word to uppercase
vEuchange from here to end of word to lowercase

--------------------------------------------------------------------------------------------------------------------
copying and pasting (We call yanking for Copying anything in Linux)
ylyank (copy) current character
ynyank n characters
ywyank the current word
yyyank the current line
Yyank a line, same as "yy"
nyyyank n lines of text
y$yank to end of line
y)yank to the end of the sentence
y'xyank from current line to the mark x (use mx to mark as x)
y/wordyank from current position to "word"
"ay'myank from here to the mark. Place this into the named buffer "a". This will also allow one to switch files using the ":e fn" or ":n fn" command and then place the buffer back.
"ayyyank current line into buffer a.
"a3Yyank three lines, place into buffer "a"
"A3Yappend 3 lines, place into "a". This allows one to build up a buffer.
"appaste the contents of "a" back, below current line.
"zyy
@z
"zyy places the highlighted text into buffer z@z will run the contents of buffer z. This allows a search pattern to be written in the document and then reused.
ppaste to the right of the cursor
Ppaste to the left of the cursor
---------------------------------------------------------------------------------------------------------------------
deleting
xdelete the character under the cursor
dddelete the current line
d^delete from current cursor position to the beginning of the line
d$delete from current cursor position to the end of the line
dwdelete from current cursor position to the end of the word
d3wdelete three words
3dddelete three lines
d/worddelete until you find word
dfxdelete from here until the character "x"
Ddelete everything to the end of the current line (same as d$)
3dddelete everything to the end of the current line and the following 2 lines
uundo deletion
Uundo the line you just changed

---------------------------------------------------------------------------------------------------------------------
inserting
iinsert at the current character
Iinsert at the beginning of the current line
20i- <ESC>insert 20 dashes (-)
aappend to the right of the current character
Aappend at the end of the current line
oinsert a new line immediately following the current line
Oinsert a new line immediately before the current line

---------------------------------------------------------------------------------------------------------------------
moving
hmove the cursor one character to the left
jmove the cursor one character down
kmove the cursor one character up
lmove the cursor one character to the right
0move cursor to the beginning of the current line
$move cursor to the end of the current line
wmove cursor forward a word
3wmove cursor forward three words
Wmove cursor forward, ignoring punctuation
bmove cursor back a word
Bmove cursor back a word, ignoring punctuation
emove cursor to the end of the word
Emove cursor to the end of the word, ignoring punctuation
Gmove cursor to the last line of the file
nGmove cursor to the beginning of line n
1Gmove to the first line of a file
n|moves the cursor to the beginning of column n
ffind a character in the line, forward
fafind the character "a" in the line, forward
2fafind the second occurrence of "a" in the line, forward
Ffind a character in the line, backward
Fzfind the character "z" in the line, backward
tfind up to a character in the line, forward
)jump to the next sentence
}jump to the next paragraph
]jump to the next section
%find matching brace or parenthesis
^bscroll backwards one page. A count scrolls that many pages
^fscroll forwards one page. A count scrolls that many pages
^uscroll up half a screen
^dscroll down half a screen
z <enter>put current line at top of screen
z.put current line at middle of screen
z-put current line at bottom of screen
mstart a mark, the next character is the name, any character from a-z
mamark this spot with the character "a"
'areturn to the line marked "a"
`areturn to the character marked "a"
''return to previous line (auto-mark)
``return to previous character (auto-mark)
---------------------------------------------------------------------------------------------------------------------
search and replace
/wordsearch forward for word
?wordsearch backward for word
?word?z.
search forward for word, put line at the middle of screen
njump forward to next occurance of word
Njump backward to next occurance of word
*search forward for word under cursor (vim)
#search backward for word under cursor (vim)
g*search forward for word under cursor (partial match) (vim)
g#search backward for word under cursor (partial match) (vim)
:nohstop highlighting the word that was searched for
:s/old/new/replaces first occurence of old with new on current line
:s/old/new/gglobally replaces old with new on current line
:%s/old/new/gglobally replaces old with new on all lines
:s/old/new/gcconfirms replacements
:%s/^V^M//gglobally remove DOS carriage returns
:%s/,/^V^M/gglobally replace commas with newlines (yes, I know this looks like it would insert DOS carriage returns, but it only inserts the newlines on Unix)
:%s/\s*$//strip blanks from end of lines
:%s/^.\{30}//remove the first 30 characters from each line
:%s/[ ^I]*$/!dremove trailing whitespace (where ^I is produced by pressing the tab key)
:%s/.*/\L&/convert the entire file to lowercase.
:s/.*/\u&/convert the first character of line to uppercase.
:%s/\<./\u&/gconvert the first character of each word to uppercase
\< matches the start of a word;
. therefore matches the first character of a word;
\u tells Vi(m) to uppercase the next character in the substitution string;
& means substitute whatever was matched on the lhs;
:s/book{./\L&/convert the first character after the { to lowercase.
:'x,.s/\([a-z]\)=/\1 =/replace any lowercase character in the alphabet followed by an equal sign with the same character followed by a space and an equal sign, e.g., book= >> book =
::%s/\(That\) or \(this\)/\2 or \1/change "that or this" to "this or that"
::%s/\(^\\foilhead{\(.*\)}\)/
%\1^M\\section{\2}/
comment out each line beginning with '\foilhead' and replace with a line beginning with '\section'; note the nested backreferences for keeping the rest of the line the same
::%s/\(.*\)/<a href="\1">\1<\/a>/add HTML tags for references to files
:s/ \(\d\{1,2}\)\.\(\d\{1,2}\)\(.*\)/<a href="\1-\2.sh">\1.\2\3<\/a>change a line of the form
       1.1 Accessing Substring
to
       <a href="1-1.sh">1.1 Accessing Substrings</a>
:'x,.s:^\([^ ]\+\) \(.*\):
<\1>\1 \2<\/\1><br>:
change a line of the form
       KBD used for text to be typed by the user
to
       <KBD>KBD used for text to be typed by the user</KBD><br>
Colons are used here instead of the usual slashes for separating the 'find' and 'replace' parts. The part ^\([^ ]\+\) finds all of the characters up to the first space and saves them for use in the 'replace' part as \1.
:'x,.s/^/#/insert a pound sign (#) at the beginning of the line from the line marked with mx to the current line
:%s/word1\nword2//remove word1 from the end of a line and word2 from the beginning of the next line; \n represents the newline between the two
:&repeat previous substitution
:<up arrow>recall : history
:g/string/ddeletes every line that contains string
:g/\.c/+|s/^/\.cc/look for all ".c" commands, jump to next line, substitute the beginning of line with ".cc".
:g/^\..*/|s//\U&/convert all characters at beginning of line that start with a "." to upper case.
:v/string/ddeletes every line that does not contain string
:g/.*/m0This will reverse the order of the lines in the current file. m0 is the ex command to move the line to line 0.
:v/./d or :g/^$/dRemove all blank lines.
:g/^\s*$/dRemoves all lines that only have whitespace.
:v/./.,/./-1joinReplaces multiple blank lines with just one blank line.

---------------------------------------------------------------------------------------------------------------------
options
:se aiautoindent (unset with :se noai)
:se ff=unixset fileformat to unix
:se icignore case when searching.
:se listdisplay tabs and carriage returns
:se nudisplay line numbers in the file. They are not actually in the file. (unset with :se nonu)
:se smshow matching brace or parenthesis while inserting
:se smddisplay the mode
:se sw=2set shifting to 2 spaces
:se tabstop=4set tabs to 4 spaces
^^Dturn off autoindent for current line, resume same place for the next line (up carrot and control-D)
0^Dreset the autoindent, start at the left margin

---------------------------------------------------------------------------------------------------------------------
external commands
!cmdexecute an external program
!!cmdexecute an external program, replacing the output with the results
!$send from here to the end-of-line
!Lsend from here to the last line of screen
!23Gsend from here to line 23
!/wordsend from here until you find "word"
!)send from here until the next sentence
!}send from here until the next paragraph
!!dateadds the date
!!cut -c41-cut the first 40 characters from a file
3!!sortsend three lines to sort, and return the output
!Grevsend from here to the end of file to the "rev" command; the results will reverse the characters in each line
!}sortsends from the current line until the first blank line to sort
:'x,.!sortwill sort from the line marked with mx to the current line
:r !llread the output of an "ll" command, and put it after the current line.
:'t,'b !spellcheck spelling from mark t to mark b
:'t,. !awk '{print $3 " " $2 " " $1}'reverse the order of three columns
:%! sed Gdouble space the entire file.
:1,5! sed Gdouble space the lines from 1-5
:'x,.!sed '/^$/d'remove the blank lines from mark x to the current line

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

miscellaneous

^ggive file name, status, current line number and relative position
^lrefresh the screen (sometimes `^P' or `^R')
^vvisual mode. in Windows, Ctrl-v is mapped to paste text. Use Ctrl-q instead (vim)
.repeat latest command
&repeat latest `ex' substitute command, e.g. :s/wrong/good/
:ab lg longercreate an abbreviation. Whenever lg is typed, it will be replaced with longer.
vi +/string filenamestart vi, jumping to the first occurrence of string
vi -r filenamerecovers an open file after a crash
vi `cat somefile`open a list of files that are in the file somefile
:r filenameinsert file filename, placing its contents after current line
:1,4w filenamewrite lines 1 through 4 to filename
:e filenameedit filename
:f filenamechange current file name to filename
:nedit next file
:shcall up the shell, run commands until a ^d (CONTROL-d), then return to editing
:viVI MODE. Used if "Q" is pressed, or called up ex, and now wish to use the visual mode
In Insert mode, press the Ctrl-p or Ctrl-n key to complete part of a word that has been typed. This is useful for entering function names.
:<up arrow>recall : history
----------------------------------------------------------------------------------------------------------------------
References:
  1. vi Fast Reference Guide — the motherload of vi commands
  2. Vim documentation: starting
  3. Vi IMproved — VIM
  4. Best of VIM Tips
----------------------------------------------------------------------------------------------------------------------


Sunday, January 4, 2015

Commitment towards the Life...! The Work-life balance.

Today's post is about the life a DBA and every other person must commit to.

From my past experiences I can say that, the life of a DBA can be very enjoyable one, if we follow some rules and be under our boundaries.
To be something, you have to keep hold on somethings, you have to keep somethings ON HOLD until you achieve your desired goal. You may need to work hard, or work smart to deal with your personal and professional life. One of my friend Aniket (Professional Network Engg.), his experiences and my thoughts helped me to come up with some of these points. So lets get started with these points.

These are the  Points we shall always keep in Mind while working:

1. Self Confidence

    Its the term what everyone writes in his/her resume. But the fact is only 20% people follow this rule sincerely. When it comes to compromise the work with your personal life, most people go with the flow of their personal matters. Personal matters drives you, but also they affect your professional life and your career growth.
   What I say is just not to commit anything in your personal life unless you achieve your professional goal what you desire for. And that will absolutely make you achieve your professional goal, and I bet it will make you work for your personal goal. So just SHOW confidence while you are working. Always achieve whatever comes in your way.


2. Be Ambitious

     Always try to do something more. What so ever you can do, to make it better!
Try to excel in your field. This statement is small, but when it comes to your work, you may think of lot many things and ultimately you see a bigger problem, as your field is vast.
So now what I suggest is, to start with you current task, and keep on digging it up. FULL STOP. Just keep on digging the enhancement you can make. I know it may take time, but you will get atleast an hour to think about it apart from your regular routine, and if not, just spend 10 Mins to think about it, just jot down every single possibility you can come up with.

One of the Saying, that keeps me motivated is "Try to break your own record everyday". I personally follow this.


3. Self Respect

    This term can be taken it two ways, one which will led you to right way, and another that will led to be arrogant and selfish.

I would say, that you must keep your ego aside if and only if you want to be successful. Now, lets come to the point.

Self Respect, to respect ourselves. To respect what you do, To respect what you did, and to respect what you can/will do.

Be responsible for your deeds,  Whatever decision you make, just make sure, that it will be true in all the cases. And its NOT BAD if you are proved wrong in some of them, just correct them and make changes. Don't be shy, just be confident.


4. Take Opinion

    It is always advisable to take opinion from your seniors, even if you think he is not correct. Just take opinion. Then research and act upon.
If it feels like you are asking something stupid, still ask, ASK FOR MORE. And you may get something extra out of it.
Whatever the front personal think about that topic, you will get a view. Take opinions and make your decisions wisely.


5. Believe in Yourself.

  Every human in this world, is here because he is important to play his/her role. You can be right or wrong for every individual. It always depends upon the perspective you hold. If you are low to take it, then you will lose, and if you are confident then you will achieve it.

This point is most important and dependent upon all the points stated above. While making decisions, always think in both ways, about its adverse and its positive effects.
If you master you technology, and above given points of life. You will certainly make decision which will be good for you, and for your surrounding.
And everyone looks for a better environment to work in. So why not make one. Make it yourself.



That's all for today.
The Better You, the Better will be your environment.
-V3nom