Thursday, December 14, 2006

Cisco: User access from HTTP

When I try to configure the web access to my catalyst 2970 switch. After googling, I found the clue from here. I have to change the authentication method of the switch first, below is the step I use when connected to my switch using serial connection.

#enable
#config terminal
(config)#aaa new-model
(config)#aaa authentication login default local
(config)#aaa authorization exec local
(config)#username one privilege 15 password one
(config)#username three password three
(config)#username four privilege 7 password four
(config)#ip http server
(config)#ip http authentication aaa(config)#end
#end

and then I try to connect it through web.. and walaaa... :)

Wednesday, December 13, 2006

Citrix: Change the IP Address

In CITRIX environment, sometimes we have to change the ipaddress. After changing the windows ip-address, we alse have to update the citrix database. Base on the www.thin-world.com , we have to use the 'altaddr' command.

c:\>altaddr /SERVER:METAFRAME01 /SET 192.168.25.77

From the point we set the IP, Citrix will not search for the old IP.

Friday, November 17, 2006

Solaris: How to change the xserver color depth to 24

By default solaris 5.8 use 8-bit color depth. To change it to 24-bit, you have to update the file Xservers.

#vi /etc/dt/config/Xservers
:0 –nobanner –dev /dev/fb0 defclass TrueColor defdepth 24 –dev /dev/fb1 defclass TrueColor defdepth 24 –auth /var/dt/A:

Update the line with the bold section as seen above.

Wednesday, November 15, 2006

Oracle: When Windows XP's Firewall blocks Oracle connection

When client try to make connection to the listener (default using port 1521), the listener spawn new user-process. This user process use random port to handle the client's request. Mainly, oracle use two main program, which are " oracle.exe" for oracle-instance, and "tnslsnr.exe" for listener. We can check it through "Task Manager"
Windows firewall support port and program exception. We use both to make exception in Windows-Firewall.

From Control Panel --> Windows Firewall :
1. "Add Port" => 1521
2. "Add Program => browse to the ORACLE_HOME/bin for " oracle.exe" and "tnslsnr.exe"

Ok, now try to reconnect your client to the Oracle Server, and feel that your firewall configuration works... good luck!

Tuesday, November 14, 2006

Oracle: Rename the Oracle SID in Oracle 9i

Some of my fellows ask me how to change the oracle SID. For those who never done these steps see that this is a difficult thing, but it's quite simple though.

1. Login as sysdba
[ora9i@training01 ~]$ sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.4.0 - Production on Mon Nov 13 16:23:56 2006
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production 

2. Note the user dump directory
SQL> show parameter user_dump 
NAME                                 TYPE        VALUE
------------------------------------ -----------------------------------------
user_dump_dest                       string      /apps/ora9i/OraHome1/admin/ora
                                                 sid/udump
 

3. Switch logfile several times using the following command.
SQL> alter system switch logfile;
SQL> alter system switch logfile;
SQL> alter system switch logfile;

4. Create the basic SQL script for renaming the SID.
SQL> alter database backup controlfile to trace;
Database altered. 

5. Shutdown the database

SQL> shutdown
SQL> exit
 
6. Find the file created from step 4 in directory in step 2, and rename it to appropriate name.
[ora9i@training01 ~]$ cd /apps/ora9i/OraHome1/admin/orasid/udump
[ora9i@training01 ~]$ ls –ltr
-rw-r-----    1 ora9i    dba          1617 Nov  3 16:05 oldsid_ora_7120.trc
-rw-r-----    1 ora9i    dba          1617 Nov  3 16:08 oldsid_ora_7837.trc
-rw-r-----    1 ora9i    dba          1617 Nov  3 16:13 oldsid_ora_3482.trc
-rw-r-----    1 ora9i     dba          1616 Nov  3 16:16 oldsid_ora_4412.trc
-rw-r-----    1 ora9i    dba          1617 Nov   3 17:59 oldsid_ora_1818.trc
-rw-r-----    1 ora9i    dba          3284 Nov  6 11:31 oldsid_ora_1770.trc
-rw-r-----    1 ora9i    dba          7095 Nov 13 21:52 oldsid_ora_32410.trc
[ora9i@training01 ~]$ mv oldsid_ora_32410.trc renameorasid.sql

7. Delete unwanted lines and update as necessary, the result appears as below. Please notify the one in bold.

[ora9i@training01 ~]$ vi renameorasid.sql
CREATE CONTROLFILE set DATABASE "orasid" RESETLOGS  NOARCHIVELOG
--  SET STANDBY TO MAXIMIZE PERFORMANCE
   
MAXLOGFILES 5
   
MAXLOGMEMBERS 5
   
MAXDATAFILES 100
   
MAXINSTANCES 1
   
MAXLOGHISTORY 453
LOGFILE
 
GROUP 1 (
   
'/apps/ora9i/OraHome1/database/datafiles/orasid/logg1m1orasid.log',
   
'/apps/ora9i/OraHome1/database/datafiles/orasid/logg1m2 orasid.log'
 
) SIZE 8M,
 
GROUP 2 (
   
'/apps/ora9i/OraHome1/database/datafiles/orasid/logg2m1orasid.log',
   
'/apps/ora9i/OraHome1/database/datafiles/orasid/logg2m2orasid.log'
 
) SIZE 8M,
 
GROUP 3 (
   
'/apps/ora9i/OraHome1/database/datafiles/ orasid/logg3m1orasid.log',
   
'/apps/ora9i/OraHome1/database/datafiles/orasid/logg3m2orasid.log'
 
) SIZE 8M
-- STANDBY LOGFILE
DATAFILE
 
'/apps/ora9i/OraHome1/database/datafiles/orasid/systemorasid.dbf',
 
'/apps/ora9i/OraHome1/database/datafiles/ orasid/undoorasid.dbf',
 
'/apps/ora9i/OraHome1/database/datafiles/orasid/exampleorasid.dbf',
 
'/apps/ora9i/OraHome1/database/datafiles/ orasid/toolsorasid.dbf',
 
'/apps/ora9i/OraHome1/database/datafiles/orasid/userorasid.dbf'
CHARACTER SET US7ASCII
;
8. Create/move directories and rename the datafiles.

[ora9i@training01 ~]$ mkdir -p /apps/ora9i/OraHome1/admin/orasid
[ora9i@training01 ~]$ mkdir /apps/ora9i/OraHome1/admin/orasid /cdump
[ora9i@training01 ~]$ mkdir /apps/ora9i/OraHome1/admin/orasid/udump
[ora9i@training01 ~]$ mkdir /apps/ora9i/OraHome1/admin/orasid/bdump
[ora9i@training01 ~]$ cd /apps/ora9i/OraHome1/database/datafiles/
[ora9i@training01 ~]$ mv oldsid orasid
[ora9i@training01 ~]$ cd orasid
[ora9i@training01 ~]$ mv logg1m1oldsid.log logg1m1orasid.log
[ora9i@training01 ~]$ mv logg1m2oldsid.log logg1m2orasid.log
[ora9i@training01 ~]$ mv logg2m1oldsid.log logg2m1orasid.log
[ora9i@training01 ~]$ mv logg2m2oldsid .log logg2m2orasid.log
[ora9i@training01 ~]$ mv logg3m1oldsid.log logg3m1orasid.log
[ora9i@training01 ~]$ mv logg3m2oldsid.log logg3m2orasid .log
[ora9i@training01 ~]$ mv systemoldsid.dbf systemorasid.dbf
[ora9i@training01 ~]$ mv undooldsid.dbf undoorasid.dbf
[ora9i@training01 ~]$ mv example oldsid.dbf exampleorasid.dbf
[ora9i@training01 ~]$ mv toolsoldsid.dbf toolsorasid.dbf
[ora9i@training01 ~]$ mv useroldsid.dbf user orasid.dbf
[ora9i@training01 ~]$ mv tempoldsid.dbf temporasid.dbf

9. Update initialization parameter file

[ora9i@training01 ~]$ cd /apps/ora9i/OraHome1/dbs/
[ora9i@training01 ~]$ vi initorasid.ora
*.compatible='9.2.0.0.0'
*.control_files='/apps/ora9i/OraHome1/database/datafiles/orasid/control1orasid.ctl','/apps/ora9i/OraHome1/database/datafiles/ orasid/control2orasid.ctl','/apps/ora9i/OraHome1/database/datafiles/orasid/control3orasid.ctl'
*.core_dump_dest='/apps/ora9i/OraHome1/admin/orasid /cdump'
*.user_dump_dest='/apps/ora9i/OraHome1/admin/orasid/udump'
*.background_dump_dest='/apps/ora9i/OraHome1/admin/orasid/bdump'
*.db_block_size=8192
*.db_cache_size=134217728
*.db_domain=''
*.db_file_multiblock_read_count=32
*.db_files=1024
*.db_name='orasid'
*.dml_locks=500
*.fast_start_mttr_target=300
*.global_names=FALSE
*.instance_name=' orasid'
*.java_pool_size=52428800
*.job_queue_processes=2
*.log_buffer=1048576
*.max_dump_file_size='10240'
*.max_enabled_roles=48
*.open_cursors=400
*.os_authent_prefix=''
*.processes=150
*.remote_login_passwordfile='NONE'
*.remote_os_authent=TRUE
*.shared_pool_size=54525952
*.sort_area_size=524288
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS'
*.utl_file_dir='*'
9. Create password file 
[ora9i@training01 ~]$ cd /apps/ora9i/OraHome1/dbs/
[ora9i@training01 ~]$ orapwd file=orapw<NEWSID> password=o entries=10

10. Update the environment file in ora9i home directory, and then relogin

[ora9i@training01 ~]$ cd ~
[ora9i@training01 ~]$ vi .login
setenv ORACLE_SID orasid
setenv ORACLE_OWNER ora9i
setenv ORACLE_BASE /apps/ora9i
setenv ORACLE_HOME ${ORACLE_BASE}/OraHome1

11. Running the script.
[ora9i@training01 ~]$ sqlplus "/ as sysdba"
SQL> startup nomount
SQL> @renameorasid.sql
SQL> recover database using backup controlfile;
SQL> alter database open resetlogs;  
SQL> alter database rename global_name to orasid;

12. Restart the database
[ora9i@training01 ~]$ sqlplus "/ as sysdba"
SQL> shutdown
SQL> startup

13. Setting up the client
[ora9i@training01 ~]$ cd /apps/ora9i/OraHome/network/admin
[ora9i@training01 ~]$ vi tnsadmin.ora
orasid
=
 
(DESCRIPTION =
   
(ADDRESS_LIST =
     
(ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521))
   
)
   
(CONNECT_DATA =
     
(SERVER = DEDICATED)
     
(SERVICE_NAME = orasid)
   
)
 
)

You see that the main steps are step 4 and 7, which create the script and rename.
Okay, you're now ready with your new name of the database instance. Good luck.

Monday, November 13, 2006

Linux: Make archive and compress it at once with tar

Many people who use unix system don't know that linux has more capability than solaris tar. One of the feature is tar in linux can also zip at the same time.

I thought this feature has well known, but many of my colleagues don't know it:( That's the reason why I'm posting this.

In unix (solaris, etc), you have to execute 2 command to do the command : 

#tar cvf bundle.tar filenameone.txt filenametwo.txt
#gzip bundle.tar


in linux, you could use the following command

#tar cvfz bundle.tar.gz filenameone.txt filenametwo.txt

Oil&Gas: How to read EBCDIC SEGY Header

SEGY type of file is a seismic file that use by Geophysicist & Geologist to help them to interpret the fault or horizon in earth subsurface. This type of file has a header in EBCDIC and binary format. Using UNIX / Linux, we could extract the EBCDIC information from the file.

The command to extract the header is:

#dd if=field.segy conv=ascii ibs=3200 count=1

Some text without carriage return will appear. You could format the output using the following command: 

#dd if=$1 conv=ascii ibs=3200 count=1 | awk 'BEGIN{RS="C[0-9 ][0-9]"}{printf "C%2d%s\n",NR,$0}'

Friday, November 10, 2006

Solaris: Restart inetd

After make changes to /etc/inetd.conf in Solaris 8, we have to restart the inet daemon with the following command :
 
#pkill -HUP inetd
 
The command will restart the inetd and reread the configuration.

Windows: Uninstall cluster service in Windows 2003 cluster

In Windows 2003 Server, the cluster service has been installed. The cluster service cannot be uninstall, but the cluster configuration can be reset. It will remove the node from cluster.

Type command below from command prompt :
 
c:\>cluster node nodename /forcecleanup

Wednesday, November 08, 2006

Windows: Send ctrl-alt-del in Remote Desktop environment

When we want to send ctrl-alt-del to remote machine through Remote Desktop Connection, we could use the Terminal Server shortcut keys to perform the same function.
 
ctrl-alt-end => the same function with ctrl-alt-del
 
If we type 'ctrl-alt-del', it will show local Task-Manager.

Monday, November 06, 2006

Linux: How to force FSCK

Sometimes when we run fsck on mounted filesystem shows warning messages. We could use
#shutdown -F now
#reboot
it will force shutdown, and will be start with fsck at the next reboot.

Thursday, November 02, 2006

Let me introduce myself


Today, I start my first posting in this blog. This blog is meant to be my professional blog, along with my other personal blog.

Before I continue, let me introduce myself. My full name is Ahmadsyah Alghozi Nugroho, but people use to call me Holly. I got my bachelor degree from Institut Teknologi Sepuluh Nopember (ITS) Surabaya majoring in Informatics Engineering. And I also have finished my master degree in Universitas Indonesia (UI) majoring in Finance Management.

My professional experiences in IT industry started before I graduated in 1999 when I joined IT Company as oracle programmer. I have been assigned as Database Administrator and Project Leader for supporting Oracle E-Business Finance, and Production systems ever since in major Oil and Gas Company. Right now I work for an oil and gas services company as IT Consultant.

Enough with my cha-cha-cha... now, start bloggingg..... :)