use strict;
open TXT1, "1.txt" or die "$!";
open TXT2, "2.txt" or die "$!";
my %diff;
$diff{$_}=1 while ();
while(){
print unless $diff{$_};
}
close TXT2;
close TXT1;
Wednesday, October 31, 2007
PERL : diff two files
Remove ^M from files transferred from Windows to Linux
:%s/^M//g (to make the ^M -> CTRL+V then CTRL+M)
Friday, October 19, 2007
Oracle ODBC : Driver's SQLAllocHandle on SQL_HANDLE_ENV failed
Do the following to resolve the issue:
1. Select Administration Tools , Local Security Setting and Local Policy.
2. Then select "User Rights Assignment"
3. Double click on "Create Global Objects"
4. Select Add User or Group.
5. Make sure Object Types Group Box is checked.
6. Select Locations and highlight the name of the server you are working on (Not the Domain).
7. Enter "Remote Desktop Users" or "Everyone" (without the quotes) into the Object Names Box.
8. Select OK.
9. Add the same users to the group "Power User".
10. If this does not work, after step 8 a reboot may be required.
Tuesday, October 16, 2007
Oracle: Spooling Column of type Long
SQL> set trimspool on
SQL> set linesize 20000
SQL> set long 100000000
SQL> set longchunksize 2000
SQL> set pagesize 0
Thursday, October 4, 2007
Oracle : Support for Very Large Memory (VLM) Configurations
The requirements for taking advantage of this support are:
-
The computer on which Oracle Database is installed must have more than 4 GB of memory.
-
The operating system must be configured to take advantage of Physical Address Extensions (PAE) by adding the /PAE switch in
boot.ini. See Microsoft Knowledge Base article Q268363 for instructions on modifyingboot.inito enable PAE. -
It is advisable (though not necessary) to enable 4GT support by adding the /3GB parameter in
boot.ini. See Microsoft Knowledge Base article Q171793 for additional requirements and instructions on modifyingboot.inito enable 4GT. -
The user account under which Oracle Database runs (typically the LocalSystem account), must have the "Lock memory pages" Windows 2000 and Windows XP privilege.
-
USE_INDIRECT_DATA_BUFFERS=TRUEmust be present in the initialization parameter file for the database instance that will use VLM support. If this parameter is not set, then Oracle Database 10g Release 1 (10.1) behaves in exactly the same way as previous releases. -
Initialization parameters
DB_BLOCK_BUFFERSandDB_BLOCK_SIZEmust be set to values you have chosen for Oracle Database. - Registry parameter
AWE_WINDOW_MEMORYmust be created and set in the appropriate key for your Oracle home. This parameter is specified in bytes and has a default value of 1 GB.AWE_WINDOW_MEMORYtells Oracle Database how much of its 3 GB address space to reserve for mapping in database buffers. Once this parameter is set, Oracle Database can be started and will function exactly the same as before except that more database buffers are available to the instance. In addition, disk I/O may be reduced because more Oracle Database data blocks can be cached in the System Global Area (SGA).
- If
DB_BLOCK_SIZEis large, however, the defaultAWE_WINDOW_MEMORYvalue of 1 GB may not be sufficient to start the database.
http://download-west.oracle.com/docs/cd/B14117_01/win.101/b10113/architec.htm#sthref58
Tuesday, September 25, 2007
Reset OC4J Admin Password
oc4jadmin password using the following procedure while you are logged in as the user who installed the Oracle Application Server instance:-
Stop OC4J and the Application Server Control.
Enter the following command in the Oracle home of the application server instance:
(UNIX) ORACLE_HOME/opmn/bin/opmnctl stopproc ias-component=OC4J
(Windows) ORACLE_HOME\opmn\bin\opmnctl stopproc ias-component=OC4J -
Locate and open the following file in a text editor:
(UNIX)ORACLE_HOME/j2ee/home/config/system-jazn-data.xml
(Windows)ORACLE_HOME\j2ee\home\config\system-jazn-data.xml -
Locate the line that defines the credentials property for the oc4j
adminuser.The following example shows the section of
system-jazn-data.xmlwith the encryptedcredentialsentry in boldface type:
jazn.com
.
.oc4jadmin
OC4J Administrator
OC4J Administrator
{903}4L50lHJWIFGwLgHXTub7eYK9e0AnWLUH
Replace the existing encrypted password with the new password.
Be sure to prefix the password with an exclamation point (!). For example:
!mynewpassword123
Tuesday, September 18, 2007
ORA-27047: unable to read the header block of file
Following three actions can be taken to restore DB:
1. resize the database file in the source system and again take the cold backup. Resizing reformats the block header.
2. use the existing control files to startup the database and then resize the file.
3. If control files can not be reused, because of the change in file location where db files will be restored, just take the cold backup copy of only the resized file from the source system. replace the existing corrupt header file with the newly backup copy and create the control file.
revert back to the original corrupt header file and try to open db with the newly created control file. It will fail with checkpoint mismatch asking for some file needing recovery.
Give the command "recover database using backup control file". When asked for the achive logs, supply the redo log file (try with each of the log files), it will recover the DB.
