Friday, April 30, 2010
Wednesday, April 28, 2010
Change core file path for IBM HTTP Server 2.0.47
To change the default path where the core file is dumped for IBM HTTP Server 2.0.47 on AIX
1- Go to IBM HTTP server conf directory (ex: /usr/IBMIHS/conf)
2- Open httpd.conf
3- Edit the "CoreDumpDirectory" to the required directory (ex: CoreDumpDirectory "/usr/IBMIHS/corefiles")
1- Go to IBM HTTP server conf directory (ex: /usr/IBMIHS/conf)
2- Open httpd.conf
3- Edit the "CoreDumpDirectory" to the required directory (ex: CoreDumpDirectory "/usr/IBMIHS/corefiles")
Kill signal to dump core file
To kill a process and make it dump a core file, use the "6" signal
kill -6 PID
kill -6 PID
How to enable full core on AIX
1- To obtain full core files on AIX, set the following ulimit options:
ulimit -c unlimited turn on corefiles with unlimited size
ulimit -n unlimited allows an unlimited number of open file
descriptors
ulimit -d unlimited sets the user data limit to unlimited
ulimit -f unlimited sets the file limit to unlimited
You can display the current ulimit settings with:
ulimit -a
2- Set the following in smitty:
1. Start smitty as root
2. Go to System Environments -> Change/Show Characteristics of Operating System
3. Set the Enable full CORE dump option to TRUE
Alternatively, you can run chdev -l sys0 -a fullcore='true' as root.
You can check the setting with lsattr -D -c sys -a fullcore -H, which should produce output similar to this:
attribute deflt description user_settable
fullcore false Enable full CORE dump True
Reference: IBM Web Site, AIX Help
ulimit -c unlimited turn on corefiles with unlimited size
ulimit -n unlimited allows an unlimited number of open file
descriptors
ulimit -d unlimited sets the user data limit to unlimited
ulimit -f unlimited sets the file limit to unlimited
You can display the current ulimit settings with:
ulimit -a
2- Set the following in smitty:
1. Start smitty as root
2. Go to System Environments -> Change/Show Characteristics of Operating System
3. Set the Enable full CORE dump option to TRUE
Alternatively, you can run chdev -l sys0 -a fullcore='true' as root.
You can check the setting with lsattr -D -c sys -a fullcore -H, which should produce output similar to this:
attribute deflt description user_settable
fullcore false Enable full CORE dump True
Reference: IBM Web Site, AIX Help
Monday, April 26, 2010
Accesing Linux partitions (ext2/ext3) from Windows
If you need to gain read/write access for Linux partitions from windows box, http://www.fs-driver.org/ provides you with a simple program that enables you to gain read/write access to ext2/ext3 partitions.
Sunday, April 25, 2010
Easiest way to install programs in OpenSUSE
Go here : http://software.opensuse.org/search
in the search box write search key, and then on the list below, click "1-click install" button.
in the search box write search key, and then on the list below, click "1-click install" button.
Sunday, April 18, 2010
Add a job to crontab that runs every minute on AIX
- crontab -e
- 0-59 * * * * hobba
crontab -e: opens a text file (via vi) to add your job
0-59: is to run every minute
hobba: is the command to run, it's either a Unix command or a script
Setup Google Apps Custom Domain (e.g. @techienotes.info) on Empathy
Create a new Jabber account and enter the following details:
account : username@techienotes.info
encryption required TLS/ssl : (unmarked)
ignore ssl certificate error : (unmarked)
server : talk.google.com
port : 5222 (default)
use old ssl : (unmarked)
Source
account : username@techienotes.info
encryption required TLS/ssl : (unmarked)
ignore ssl certificate error : (unmarked)
server : talk.google.com
port : 5222 (default)
use old ssl : (unmarked)
Source
Saturday, April 17, 2010
Bash Script to run a sql file (Draft) - Part 1
#!/usr/bin/bash
# This script calls the Ad_1.sql script and spools the output with date stamp to a log file
# Update: You MUST add your environment variables one way or another, e.g. look below
export ORACLE_BASE=/oracle
export ORACLE_HOME=/oracle/OraHome_1
PATH=${PATH}:${ORACLE_HOME}/bin; export PATH
export LIBPATH=${LIBPATH}:${ORACLE_HOME}/lib32:${ORACLE_HOME}/lib
if [ ! -f lock ]; then
sqlplus -s user/password@sid << EOF
column dcol new_value mydate noprint
select sysdate dcol from dual;
spool log_ad_1_&mydate..log
@Ad_1.sql;
spool off
EOF
fi
where:
if [ ! -f lock ]: very useful statement, it checks whether a file named "lock" exists or not, if it doesn't exist, it will not execute the code block within.
sqlplus -s usr/passwod@sid: to run sqlplus commands as if I'm entering the commands manually, the -s flag lets sqlplus accept the standardin input until it finds the word "EOF"
Part 2 will be about adding the above script in crontab and executing it daily.
# This script calls the Ad_1.sql script and spools the output with date stamp to a log file
# Update: You MUST add your environment variables one way or another, e.g. look below
export ORACLE_BASE=/oracle
export ORACLE_HOME=/oracle/OraHome_1
PATH=${PATH}:${ORACLE_HOME}/bin; export PATH
export LIBPATH=${LIBPATH}:${ORACLE_HOME}/lib32:${ORACLE_HOME}/lib
if [ ! -f lock ]; then
sqlplus -s user/password@sid << EOF
column dcol new_value mydate noprint
select sysdate dcol from dual;
spool log_ad_1_&mydate..log
@Ad_1.sql;
spool off
EOF
fi
where:
if [ ! -f lock ]: very useful statement, it checks whether a file named "lock" exists or not, if it doesn't exist, it will not execute the code block within.
sqlplus -s usr/passwod@sid: to run sqlplus commands as if I'm entering the commands manually, the -s flag lets sqlplus accept the standardin input until it finds the word "EOF"
Part 2 will be about adding the above script in crontab and executing it daily.
Wednesday, April 14, 2010
Putting the Current Date in a Spool File Name in sqlplus
Using SYSDATE you can query the current date and put it in a substitution variable. The substitution variable can then be used in a SPOOL command:
column dcol new_value mydate noprint
select to_char(sysdate,'YYYYMMDD') dcol from dual;
spool &mydate.report.txt
-- my report goes here
select last_name from employees;
spool off
column dcol new_value mydate noprint
select to_char(sysdate,'YYYYMMDD') dcol from dual;
spool &mydate.report.txt
-- my report goes here
select last_name from employees;
spool off
Sunday, April 11, 2010
Some useful Google Chrome extensions that I use - Part 3
Well, this is the article number 200 in this blog, I'm so proud of this :)
- Copy Without Formatting: Enables you to copy text from any website without its formatting, very useful in some situations where you just need to extract the text without its specific font, color ...etc, I found it very useful in blogging, there is a similar addon for firefox that does the same exactly.
Unlock Oracle user and set FAILED_LOGIN_ATTEMPTS to unlimited
View Profile Assigned to a User:
SELECT PROFILE FROM DBA_USERS
WHERE USERNAME='SCOTT';
PROFILE
----------
DEFAULT
View Limits Set for the Profile:
SELECT RESOURCE_NAME, LIMIT FROM DBA_PROFILES
WHERE PROFILE='DEFAULT';
RESOURCE_NAME LIMIT
------------------------ -------------
COMPOSITE_LIMIT UNLIMITED
SESSIONS_PER_USER UNLIMITED
CPU_PER_SESSION UNLIMITED
CPU_PER_CALL UNLIMITED
LOGICAL_READS_PER_SESSION UNLIMITED
LOGICAL_READS_PER_CALL UNLIMITED
IDLE_TIME UNLIMITED
CONNECT_TIME UNLIMITED
PRIVATE_SGA UNLIMITED
FAILED_LOGIN_ATTEMPTS 10
PASSWORD_LIFE_TIME UNLIMITED
PASSWORD_REUSE_TIME UNLIMITED
PASSWORD_REUSE_MAX UNLIMITED
PASSWORD_VERIFY_ FUNCTION NULL
PASSWORD_LOCK_TIME UNLIMITED
PASSWORD_GRACE_TIME UNLIMITED
16 rows selected.
Alter FAILED_LOGIN_ATTEMPTS Parameter:
From the user's profile we can see that the FAILED_LOGIN_ATTEMPTS parameter is set to a value of 10. Now we run below command to make it UNLIMITED.
SQL> ALTER PROFILE DEFAULT LIMIT FAILED_LOGIN_ATTEMPTS UNLIMITED;
Profile altered.
Unlock the Account:
Finally we will unlock the account by running below command.
SQL> ALTER USER SCOTT ACCOUNT UNLOCK;
Update: You'd better NOT change the settings for the "DEFAULT" profile, create a new profile instead "create profile new_profile LIMIT bla bla bla"and then assign it to the given user "alter user olap profile new_profile"
Source
SELECT PROFILE FROM DBA_USERS
WHERE USERNAME='SCOTT';
PROFILE
----------
DEFAULT
View Limits Set for the Profile:
SELECT RESOURCE_NAME, LIMIT FROM DBA_PROFILES
WHERE PROFILE='DEFAULT';
RESOURCE_NAME LIMIT
------------------------ -------------
COMPOSITE_LIMIT UNLIMITED
SESSIONS_PER_USER UNLIMITED
CPU_PER_SESSION UNLIMITED
CPU_PER_CALL UNLIMITED
LOGICAL_READS_PER_SESSION UNLIMITED
LOGICAL_READS_PER_CALL UNLIMITED
IDLE_TIME UNLIMITED
CONNECT_TIME UNLIMITED
PRIVATE_SGA UNLIMITED
FAILED_LOGIN_ATTEMPTS 10
PASSWORD_LIFE_TIME UNLIMITED
PASSWORD_REUSE_TIME UNLIMITED
PASSWORD_REUSE_MAX UNLIMITED
PASSWORD_VERIFY_ FUNCTION NULL
PASSWORD_LOCK_TIME UNLIMITED
PASSWORD_GRACE_TIME UNLIMITED
16 rows selected.
Alter FAILED_LOGIN_ATTEMPTS Parameter:
From the user's profile we can see that the FAILED_LOGIN_ATTEMPTS parameter is set to a value of 10. Now we run below command to make it UNLIMITED.
SQL> ALTER PROFILE DEFAULT LIMIT FAILED_LOGIN_ATTEMPTS UNLIMITED;
Profile altered.
Unlock the Account:
Finally we will unlock the account by running below command.
SQL> ALTER USER SCOTT ACCOUNT UNLOCK;
Update: You'd better NOT change the settings for the "DEFAULT" profile, create a new profile instead "create profile new_profile LIMIT bla bla bla"and then assign it to the given user "alter user olap profile new_profile"
Source
Labels:
Account Locked,
FAILED_LOGIN_ATTEMPTS,
Oracle,
Profile,
UNLIMITED
Some useful Google Chrome extensions that I use - Part 2
- SmoothScroll: As the name indicates, it allows smooth scrolling of the web page, makes chrome more elegant :)
- MiddleButtonScroll: A feature that I really wanted and couldn't find at first on Chrome is the ability to click the middle mouse button and smoothly scroll upwards or downwards by just moving the mouse, this extension does exactly this!
- Stop Autoplay for YouTube: As the name indicates, whenever you open a youtube video, especially when opening many videos simultaneously in multiple tabs, it stops the video from auto-playing and guess what, it pre-buffers as well :), i.e. it starts loading the video as if you clicked the pause button.
- Webpage Screenshot: As the name indicates, it allows you to take screenshots of the webpages you browse, it can also add large pages - that require scrolling - in one screenshot.
Some useful Google Chrome extensions that I use - Part 1
- AdThwart: Blocks ads based on Firefox Adblock plus filter engine. I prefer this one to the others as it works exactly the same as Adblock plus on Firefox, and other seem buggy, up till now.
- Google Mail Checker Plus: Checks your Gmail, adds a little icon to the upper right corner of the browser and provides nice visual and sound effects to indicate any new incoming mails
- PanicButton: Don't get caught :)), a single click or a keyboard shortcut can hide all your tabs and can even password-protect them not to allow anyone to recover the ones you've hidden
Subscribe to:
Posts (Atom)
