Wednesday, November 21, 2007

Some Java OpenSource Projects

Everytime I need one or more Java packages or components, I always use sourceforge.net or freshmeat.net. Everyone know about this. This site is very useful for me either as system analyst or Java programmer.
Today, I have found a good site, i.e. Java Open Source, which provide a list of Java open source projects. May be you already know about this site, but for me I want to note at my blog to share with other.

Tuesday, October 09, 2007

SQL Tuning Advisor

This practice is based on http://www.oracle-base.com/articles/10g/AutomaticSQLTuning10g.php#sql_tuning_advisor.

SQL> conn / as sysdba
SQL> DECLARE
2 l_sql VARCHAR2(500);
3 l_sql_tune_task_id VARCHAR2(100);
4 BEGIN
5 l_sql := 'SELECT e.*, d.* ' ||
6 'FROM hr.employees e JOIN hr.departments d ON e.department_id = d.department_id ' ||
7 'WHERE NVL(employee_id, ''0'') = :empno';
8 l_sql_tune_task_id := DBMS_SQLTUNE.create_tuning_task (
9 sql_text => l_sql,
10 bind_list => sql_binds(anydata.ConvertNumber(100)),
11 scope => DBMS_SQLTUNE.scope_comprehensive,
12 time_limit => 60,
13 task_name => 'emp_dept_tuning_task',
14 description => 'Tuning task for an EMP to DEPT join query.');
15 DBMS_OUTPUT.put_line('l_sql_tune_task_id: ' || l_sql_tune_task_id);
16 END;
17 /

SQL> EXEC DBMS_STATS.delete_table_stats('HR', 'EMPLOYEES');

SQL> EXEC DBMS_SQLTUNE.execute_tuning_task(task_name => 'emp_dept_tuning_task');

In Enterprise Manager, click Advisor Central, you will see your sql tuning task completed. Click that name. In SQL Tuning result page, you can click View Recommendations button to view all of recommendations based on the query.

SQLAccess Advisor

SQL> conn / as sysdba
SQL> BEGIN
2 DBMS_ADVISOR.quick_tune(
3 advisor_name => DBMS_ADVISOR.SQLACCESS_ADVISOR,
4 task_name => 'test_quick_tune',
5 attr1 => 'SELECT * FROM hr.employees WHERE upper(last_name) = ''SMITH''');
6 END;
7 /

From Enterprise Manager, click Advisor Central. From the page, you can see test_quick_tune. Click that task name. In the page Result for Task, click the Recommendation tab. You will see a recommendation for tuning your index based on your query.

Using Segment Advisor

For each segment, Oracle will put a boundary (i.e. Highwater Mark) that will separate between used blocks and free blocks. Blocks below the high water mark (used blocks) have at least once contained data. This data might have been deleted. In normal DB operations, the high water mark only moves upwards, not downwards. If there is a lot of free space below the high water mark, one might consider to use alter table move statements. In another words, we have to shrink or compact the segment to move HWM downward. This condition will make full scan segment more faster.
We will try to use segment advisor to make our segment can be optimized based on the statistical data of our segment.

SQL> create table uji2 (id number(4), nilai varchar(1000));

Table created.

SQL> begin
2 for i in 1..10000 loop
3 insert into uji2 values (i, lpad('*', 1000, '*'));
4 end loop;
5 end;
6 /

PL/SQL procedure successfully completed.

SQL> update uji2 set data = null where mod(id, 5) = 0;

200 rows updated.

SQL> commit;

Commit complete.

SQL> set autotrace traceonly
(if you have any problems with this command, please refer to http://www.samoratech.com/tips/swenableautotrace.htm)

SQL> select count(*) from uji2;
(Summary)

SQL> alter table uji2 enable row movement;

Table altered.

SQL> alter table uji2 shrink space;

Table altered.

SQL> select count(*) from uji2;
(Summary)

Based on our practice, you can see that after shrink space, the amount of blocks that was reading have decreased, because the HWM was downwarded.

Now, we will use Segment Advisor from Enterprise Manager to get an advice about our segment.

SQL> create table uji2 (id int, data char(1000));

Table created.

SQL> insert into uji2 select object_id, lpad('*', 1000, '*')
2 from all_objects;

SQL> update uji2 set data = null where mod(id, 5) = 0;

Go to Enterprise Manager, and click Performance tab. In bottom section, click Advisor Central, and then click Segment Advisor. In Segment Advisor page, click Schema Objects, and click Next. Click Add button to add our table, i.e. uji2.

Click Next, and you can click Submit button directly. Here is example of the result :
Click the name of latest Segment Advisor task. In the page of Segment Advisor task, click Recomendataion Details.


Now, you can click Shrink button to make segment compact.

Wednesday, September 26, 2007

Default Temporary Tablespace

When I was teaching about temporary tablespace, I forgot about how to know where is the default temporary tablespace that is used in current Oracle database? After surfed arround the digital world, I have found some articles that give me a new knowledge. Here are the practice :

prompt> sqlplus /nolog
SQL> conn / as sysdba
SQL> col property_value format a20
SQL> select property_name, property_value from database_properties;

From above query, we can get all of database properties include default_temp_tablespace. If you want to change the default temporary tablespace, you can take a little steps below (my assumption is your database use OMF):

SQL> conn / as sysdba
SQL> create temporary tablespace temp1 datafile 20M;
SQL> alter database default temporary tablespace temp1;
SQL> select property_value from database_properties where property_name = 'DEFAULT_TEMP_TABLESPACE';

If you want to know about the temporary status and space information, you can query with this:
select * from v$tempfile;

Another FGA

When I tried to find more new thing about FGA (Fine Grained Audit), I found a simple practice to define a simple auditing based on a condition for a table. Here are the steps:

prompt> sqlplus /nolog
SQL> conn / as sysdba
SQL> execute dbms_fga.add_policy('HR', 'EMPLOYEES', 'EMPDEPT_POLICY', 'department_id > 90');
SQL> analyze table hr.employees compute statistics;
SQL> conn hr/hr
SQL> select first_name from employees where department_id = 20;
SQL> select first_name from employees where department_id = 100;
SQL> select distinct deparment_id from employees;
SQL> conn / as sysdba
SQL> select timestamp#, obj$name, policyname, scn, lsqltext from fga_log$;
SQL> execute dbms_fga.drop_policy('HR', 'EMPLOYEES', 'EMPDEPT_POLICY');

Wednesday, August 22, 2007

Oracle for Beginner: A Simple Audit

$ sqlplus /nolog
SQL> conn / as sysdba
SQL> alter system set audit_trail=db scope=spfile;
SQL> shutdown immediate;
SQL> startup
SQL> conn / as sysdba
SQL> select name, value from v$parameter where name like 'audit%';
SQL> @$ORACLE_HOME/rdbms/admin/cataudit.sql
SQL> audit connect by budsus whenever not successful;
SQL> conn budsus/sdasdasd
SQL> conn budsus/xhsjd
SQL> conn / as sysdba
SQL> desc aud$;
SQL> select * from aud$;

SQL> grant select, insert, update on hr.departments to budsus;
SQL> Audit Update, Delete, Insert On hr.departments By Access Whenever Successful;
SQL> conn budsus/xxx
SQL> insert into hr.departments values (... ... );
SQL> conn / as sysdba
SQL> col comment$text format a20
SQL> select statement, timestamp#, userid, comment$text from aud$ where userid='BUDSUS'
SQL> select * from select * from dba_common_audit_trail;
SQL> noaudit update, delete, insert on hr.departments;

Saturday, August 18, 2007

Oracle for Beginner: Knowing your Linux Kernel Parameter for Oracle

If you want to know about how to install Oracle 10g on your Linux, there are some interesting articles that may be can help you to inform step by step installation. Here are some of those:
From those guides, before installation is started, there are some kernel parameters that have to be setup in /etc/sysctl.conf files. Here are from Oracle-Base:
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
fs.file-max = 65536
kernel.shm* are parameters that is used to configure shared memory in Linux. Shared memory is a system resource that is used for interprocess communication. With this technique, two or more processes share a single chunk of memory to communicate between them. Shared memory is allocated in segments.
  • shmall : define the maximum amount of shared memory that may be in use at any time on the system.
  • shmmax : define the maximum size of each shared memory segment (max. value is 4GB).
  • shmmni : define the maximum number of shared memory segments on the system.
Semaphore is an important mechanism for controlling access to resources. Oracle instance use semaphore to control access to shared memory. Here is the kernel parameter which is used to configure the semaphore:
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
  • semmsl: maximum number of semaphores per set.
  • semmns : total number of semaphores in the system.
  • semopm : maximum number of operations per semop call.
  • semmni : maximum number of semaphore sets.
fs.file-max is a file handle parameter that determines the maximum number of files that each process can open. Default value is 8192 and the maximum value is 65536.

For more information, please refer to puschtz and dba-oracle.com .

Monday, August 06, 2007

System 7 Simulation

If you want to look and try an old Mac Operating System, i.e. System 7, you can visit WebSE. This simulation is very good. They create it using Flash. Very Interactive. You have to try it.

My New Book


This month, my newest book has been released (in Bahasa Indonesia). In this book, I wrote about Oracle10g XE Database basic administration and talk about how to build an application to access Oracle10g XE Database in four computer languages, i.e. Java, PHP, Ruby on Rails and Oracle Application Express. In this book, I explained about how to build a program that access a BLOB data type in OracleXE database. For more detail, please visit beranda budsus.

Sunday, August 05, 2007

Oracle for Beginner: Create External Table

In Oracle 10g, there is a data pump module that handle almost moving data from database Oracle to another database or external storage. Except data pump, there is a oracle loader that can be used to create and access an external data file (csv) as a regular table. In this article we will try to create an external table with data pump and oracle loader. This is a very simple thing that you can do easily in Oracle 10g.

First, we will try to create external table with Oracle data pump module :

$ sqlplus /nolog
SQL> conn / as sysdba
SQL> create directory mylab as 'your/data/path';
SQL> create table dept(department_name)
2 organization external
3 (
4 type ORACLE_DATAPUMP
5 DEFAULT DIRECTORY mylab
6 LOCATION ('ware.exp')
7 )
8 AS select distinct department_name from hr.departments;

SQL> select * from dept;

Next, in same manner, we can access an external csv as a regular table in Oracle database using Oracle Loader:
  • Create a csv file. For example we will create kota.dat with the following values:
  • Jakarta,DKI
    Surabaya,Jawa Timur
    Semarang,Jawa Tengah
    Yogyakarta,DIY
    Malang,Jawa Timur
    Bandung,Jawa Barat

  • login to your database as sysdba, create a directory object as a map for your data directory, and create an external table:
$ sqlplus /nolog
SQL> conn / as sysdba
SQL> create directory mydata as 'your/data/path';
SQL> create table kota(kota varchar(50), propinsi varchar(50))
2 organization external
3 (type oracle_loader default directory mydata
4 access parameters
5 ( records delimited by newline
6 badfile mydata:'kota%a_%p.bad'
7 logfile mydata:'kota%a_%p.log'
8 fields terminated by ','
9 missing field values are null
10 (kota, propinsi)
11 )
12 location ('kota.dat') );

SQL> select * from kota;

I hope you can find a new experience with Oracle Database.

Fixing vmware-config on FC7

I just want to share about vmware-config (vmware player) error fixing when I tried to run it on my FC7 with kernel 2.6.22.1-41. This discussion is very helpful for me. I just want to rewrite again in my blog, so if I forget about this, I can just visit this my note.
  • download the patch from here.
  • follow these instructions :
    • cd /usr/lib/vmware/modules/source
    • cp vmnet.tar vmnet.tar.orig
    • tar xvpf vmnet.tar
    • zcat yourdownloaddir/patch-vmnet-for-linux-2.6.22.1.gz | patch -p4
    • rm vmnet.tar; tar cvf vmnet.tar vmnet-only
  • run /usr/bin/vmware-config.pl again. Now, I can configure my vmware network modul on vmware player clearly.
It's good thing that vmware-player can run very well on my FC7. Thanks.

Sunday, July 29, 2007

Oracle for Beginner: Fine Grained Access (FGA)

SQL> conn / as sydba
SQL> alter system set Event="28131 trace name context forever" scope=spfile;
SQL> shutdown immediate;
SQL> startup
SQL> conn / as sysdba
SQL> show parameter event;
SQL> create user test identified by oracle;
SQL> grant connect, resource, create any context, administer database trigger to test;
SQL> grant execute on dbms_rls to test;
SQL> conn test/oracle
SQL> create table manager(dep_id number(3) primary key, nama_manajer varchar(30));
SQL> create table karyawan(dep_id number(3), nama_kary varchar(30), primary key(dep_id, nama_kary) );
SQL> insert into manager values (10, 'BUDSUS');
SQL> insert into manager values (20, 'HR');
SQL> commit;
SQL> insert into karyawan values (10, 'ANI');
SQL> insert into karyawan values (10, 'WATI');
SQL> insert into karyawan values (20, 'ANTOK');
SQL> commit;
SQL> create table orders(id number(4) primary key, dep_id number(3), tgl date, karyawan varchar(30) default user);
SQL> insert into orders values (1, 10, '01-AUG-07', 'ANI');
SQL> insert into orders values (2, 10, '02-AUG-07', 'ANI');
SQL> insert into orders values (3, 10, '02-AUG-07', 'WATI');
SQL> insert into orders values (4, 20, '02-AUG-07', 'ANTOK');
SQL>

Here is the procedure that will be called when a user login to the database:

create or replace procedure set_testapp_role(
p_user varchar2 default sys_context('userenv', 'session_user')) is

--parameter berisi username,
--jika tidak diberikan, username akan diambil dari sys_context()
--yang mengembalikan user session saat ini

--v_ctx menyimpan nama application context.
v_ctx varchar2(16) := 'testapp_ctx';

v_is_manajer number;
v_dep_id number;
v_is_kary number;

begin
--set variabel application context "username" dengan user yang diberikan
dbms_session.set_context(v_ctx, 'username', p_user);

select count(*) into v_is_manajer from test.manajer where nama_manajer=p_user;
select count(*) into v_is_kary from test.karyawan where nama_kary=p_user;

--jika user adalah TEST,
-- maka beri role APP_OWNER.

if (p_user=sys_context('userenv','current_schema')) then
dbms_session.set_context(v_ctx,'rolename','APP_OWNER');
elsif (v_is_manajer=1) then
--jika user manajer, beri role APP_ADMIN dan ambil
--dep_id

select dep_id into v_dep_id from manajer where nama_manajer=p_user;

dbms_session.set_context(v_ctx,'rolename','APP_ADMIN');
dbms_session.set_context(v_ctx,'depid',v_dep_id);

elsif (v_is_kary=1) then
--jika user karyawan, beri role APP_USER
dbms_session.set_context(v_ctx,'rolename','APP_USER');
else
--jika user tidak berwewenang
dbms_session.set_context(v_ctx,'rolename','NOT_AUTHORIZED');
end if;
end;
/

We have to create a context to save some global variables :

create or replace context testapp_ctx using set_testapp_role;
/

We will call set_testapp_role procedure for each time a user login to database. To make that thing can run, we have to create a trigger that will be run for each time a login happened:

create or replace trigger test_logon_trigger after logon on database
begin
set_testapp_role;
end;
/

Here is a function that will return a condition string for a user session. It's mean, when a user is login to database and want to access ORDERS table, the system will make a restriction for each query from the active user:

create or replace function testapp_security_function (
p_schema varchar2, p_object varchar2) return varchar2 is
begin
if (sys_context('testapp_ctx','rolename')='APP_OWNER') then
--tidak ada kondisi yang diberkan
return '';

elsif (sys_context('testapp_ctx','rolename')='APP_ADMIN') then
--kondisi query dibatasi untuk data-data departemen dimana
--user sekarang sebagai manajernya (APP_ADMIN)
return 'dep_id=sys_context(''testapp_ctx'',''depid'')';

elsif ( sys_context('testapp_ctx','rolename')='APP_USER') then
--untuk role APP_USER
return 'karyawan=sys_context(''testapp_ctx'',''username'') and '||
'dep_id = (select dep_id from test.karyawan ' ||
'where nama_kary=sys_context(''testapp_ctx'',''username''))';

else
--untuk NOT_AUTHORIZED
return '1=2';
end if;
end;
/

Then, we add a new security policy to implement FGA :

declare
begin
DBMS_RLS.ADD_POLICY (
object_schema => 'TEST',
object_name => 'ORDERS', policy_name => 'TESTAPP_POLICY',
function_schema => 'TEST',
policy_function => 'TESTAPP_SECURITY_FUNCTION',
statement_types => 'SELECT,UPDATE,INSERT,DELETE',
update_check => TRUE,
enable => TRUE,
static_policy => FALSE);
end;
/

Let's try our FGA example:

SQL> conn / as sysdba
SQL> create user budsus identified by oracle;
SQL> grant connect to budsus;
SQL> create user ani identified by oracle;
SQL> grant connect to ani;
SQL> conn test/oracle
SQL> grant select, update, delete, insert on orders to budsus;
SQL> grant select, update, delete, insert on orders to ani;

SQL> conn ani/oracle
SQL> select * from test.orders;

ID DEP_ID TGL KARYAWAN
---------- ---------- --------- ------------------------------
1 10 01-AUG-07 ANI
2 10 02-AUG-07 ANI

SQL> insert into test.orders values (10,20,'03-AUG-07','ANI');
insert into test.orders values (10,20,'03-AUG-07','ANI')
*
ERROR at line 1:
ORA-28115: policy with check option violation
SQL> insert into test.orders values (10,10,'03-AUG-07','ANI');

1 row created.

SQL> conn budsus/oracle
Connected.
SQL> select * from test.orders;

ID DEP_ID TGL KARYAWAN
---------- ---------- --------- ------------------------------
1 10 01-AUG-07 ANI
2 10 02-AUG-07 ANI
3 10 02-AUG-07 WATI
10 10 03-AUG-07 ANI

Thursday, July 26, 2007

Oracle for Beginner: 'Snapshot too old' a simple practice

In Oracle, there is a undo tablespace (is controlled by undo_tablespace parameter) that is used by oracle to store old image of updated rows. With this tablespace, you can rollback to cancel the transaction. In a undo tablespace, there are some undo segments that is controlled by oracle automatically (it is recommended that undo_management init parameter has value AUTO). For each old row images will be retained at undo segment for 900 seconds (undo_retention parameter), after that the block for old images can be overwritten by another old row images. If the undo tablespace is too small to retain old row images, sometime you will get an error that will tell you about there is no enough space for undo data. Here is an example of that error:

ORA-30036: unable to extend segment by 8 in undo tablespace 'UNDOTBS_2'

The "snapshot too old" error can be happen if some old row images, that is used by another query for read consistency, have been overwritten. In this article, from another resources too, I would like to share about a simple practice to help us to understand about this error.

$ sqlplus /nolog
SQL> conn / as sysdba
SQL> create undo tablespace undotbs_2 datafile size 1M;

Tablespace created.

SQL> alter system set undo_tablespace='UNDOTBS_2';

System altered.

SQL> create user budsus identified by oracle quota 10M on users;
SQL> grant connect, create table, create any index to budsus;

Grant succeeded.
SQL> conn budsus/oracle
Connected.
SQL> create table siswa (id number(5), nama varchar(100));

SQL> create table dump(tmp varchar(100));

SQL> begin
2 for i in 1..5000 loop
3 insert into siswa values (i, 'siswa terbaru ' || i);
4 if mod(i, 100) = 0 then
5 insert into dump values ('teeeeeeeemmmmmmmmmppppppppp');
6 commit;
7 end if;
8 end loop;
9 commit;
10 end;

SQL> declare
2 cursor crs_siswa is select rowid, siswa.* from siswa where id < 250;
3 begin
4 for v_siswa in crs_siswa loop
5 update dump set tmp = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaa';
6 update dump set tmp = 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbb';
7 update dump set tmp = 'ccccccccccccccccccccccccccccc';
8 update siswa set nama = 'siswa terupdate ' || v_siswa.id where v_siswa.rowid = rowid;
9 commit;
10 end loop;
11 end;
12 /
...
ORA-01555: snapshot too old: rollback segment number 15 with name "_SYSSMU15$" too small

SQL> conn / as sysdba;
SQL> alter system set undo_tablespace='UNDOTBS1';
SQL> drop tablespace undotbs_2;
SQL> drop table siswa;
SQL> drop table dump;
SQL> quit

Thanks.

Wednesday, July 25, 2007

Language Translator Application

Altough this application is the old one (now with a good service), but this very helpful for me. I use gnome-translate that is created by Jean-Yves Lefort. Actually I use this application for make translation for a site from one language to other language. Sometime I use this to translate from English-Indonesia vice versa. Unfortunately, to use this application, we should have a Internet connection directly without proxy (based on my experience). Please visit GNOME Translate web site to get more information and more application from the Author.

Monday, July 23, 2007

Oracle for Beginner: Deferrable Constraint

In this article I describe a simple example of deferrable constraint. With this feature, we can make the validation of the constraint process deferred until a commit is done. Sometime we need this condition when we try to load data from external file to our table.

SQL> create table testing(nilai number(5) check ( nilai in (10, 20, 30) ) deferrable initially deferred );
SQL> alter session set constraint = deferred;
SQL> insert into testing values(100);
(there are no errors! why?)
SQL> insert into testing values(20);
SQL> commit;
(there is an error, because there is data 100 that is not invalid for our check constraint)
SQL> select * from testing;
SQL> alter session set constraint = immediate;
SQL> insert into testing values (100);
(immediately, oracle will check the new data with check constraint)
SQL> insert into testing values (10);
SQL> commit;

There is another ways to manage a constraint. We can change the status of constraint. There are for kind of status: enable (validate), enable novalidate, disable validate, disable (novalidate). In this moment, we will try to change status of our constraint in table TESTING:

SQL> desc user_constraints;
SQL> select constraint_name from user_constraints where table_name = 'TESTING';
(with this query, you can obtain the constraint name for TESTING table. Please note that constraint_name)
SQL> alter table testing modify constraint const_name disable;
SQL> insert into testing values(50);
(there are no problems, because constraint is disabled)
SQL> insert into testing values(30);
SQL> commit;
SQL> alter table testing modify constraint const_name enable novalidate;
(what happen? why? )
SQL> insert into testing values (50);
(why oracle give you an error?)
SQL> insert into testing values(20);
SQL> commit;

That's all for today. Thanks.

Sunday, July 22, 2007

Oracle for Beginner: Password Resource Management

Everytime a user account was created, Oracle will assign a profile for that user. The default profile is 'DEFAULT' if for that user was not specified the profile when was created. There are two kind of resouces that can be managed in a profile: Kernel Resouce and Password resource. Lets we try to do a simple exercise to manage password resource:

oracle$ sqlplus /nolog
SQL> conn / as sysdba
SQL> select profile from dba_profiles;
(you will see all of profile objects that have been created. There are two default profile objects, i.e. DEFAULT and MONITORING_PROFILE).
SQL> select * from dba_profiles where profile='DEFAULT' and resource_type='PASSWORD';

PROFILE RESOURCE_NAME RESOURCE LIMIT
-------------------- ------------------------- -------- --------------------
DEFAULT FAILED_LOGIN_ATTEMPTS PASSWORD 10
DEFAULT PASSWORD_LIFE_TIME PASSWORD UNLIMITED
DEFAULT PASSWORD_REUSE_TIME PASSWORD UNLIMITED
DEFAULT PASSWORD_REUSE_MAX PASSWORD UNLIMITED
DEFAULT PASSWORD_VERIFY_FUNCTION PASSWORD NULL
DEFAULT PASSWORD_LOCK_TIME PASSWORD UNLIMITED
DEFAULT PASSWORD_GRACE_TIME PASSWORD UNLIMITED

(with this query, we can obtain all of password resource parameter for profile DEFAULT)
SQL> @$ORACLE_HOME/rdbms/admin/utlpwdmg.sql
(this is a build-in script that will change password resource parameters in DEFAULT profile to make some tight restriction for password management. utlpwdmg.sql script will create a new stored function which is called verify_function, and then alter the DEFAULT profile)
SQL> select * from dba_profiles where profile='DEFAULT' and resource_type='PASSWORD';

PROFILE RESOURCE_NAME RESOURCE LIMIT
-------------------- ------------------------- -------- --------------------
DEFAULT FAILED_LOGIN_ATTEMPTS PASSWORD 3
DEFAULT PASSWORD_LIFE_TIME PASSWORD 60
DEFAULT PASSWORD_REUSE_TIME PASSWORD 1800
DEFAULT PASSWORD_REUSE_MAX PASSWORD UNLIMITED
DEFAULT PASSWORD_VERIFY_FUNCTION PASSWORD VERIFY_FUNCTION
DEFAULT PASSWORD_LOCK_TIME PASSWORD .0006
DEFAULT PASSWORD_GRACE_TIME PASSWORD 10


Now, the DEFAULT profile was changed. Try some practice below:
1. try to create a new user account.

SQL> conn / as sysdba
SQL> create user myuser identified by oracle;
(because the password_verify_function has been changed with verify_function, evertime new password want to save to oracle should consider some rules that already have defined by verify_function.)
SQL> create user myuser identified by oracle_2007;
(done!)
SQL> grant connect to myuser;
SQL>

2. try to login with invalid password for 3 times, and then login with valid password for last time:

SQL> conn myuser/gggg
SQL> conn myuser/rrrr
SQL> conn myuser/ttttt
SQL> conn myuser/oracle_2007
ERROR:
ORA-28000: the account is locked

(what happen? yes, your account is locked, because we have failed to login for 3 times (FAILED_LOGIN_ATTEMPTS). Now, we should wait for about 1 minute (1/1440) which is 1440 is number of minutes in a day, see PASSWORD_LOCK_TIME).
(after 1 minute, try to login again with correct password)
SQL> conn myuser/oracle_2007
Connected.


3. The parameter PASSWORD_LIFE_TIME is to determine the age of your password (in days). After the (PASSWORD_LIFE_TIME + 1)th day, you have PASSWORD_GRACE_TIME days to retain your old password. Now, we will try to change both parameters for short time, so you can try it immediately.
SQL> conn / as sysdba
SQL> alter profile default limit
PASSWORD_LIFE_TIME 5/1440
PASSWORD_GRACE_TIME 5/1440;
SQL> conn myuser/oracle_2007
(please wait for about 5 minutes)
SQL> conn myuser/oracle_2007
ERROR:
ORA-28002: the password will expire within 0 days

(please wait for about 5 minutes again)
SQL> conn myuser/oracle_2007
ERROR:
ORA-28001: the password has expired

Changing password for testing
New password:

(please give your new password with minimum 3 new character that different from the old one)
SQL> conn / as sysdba
SQL> alter profile default limit
PASSWORD_LIFE_TIME 60
PASSWORD_GRACE_TIME 10;


4. Between parameter PASSWORD_REUSE_TIME and PASSWORD_REUSE_MAX should be choosen only one. It's mean, if we mention a value for one parameter, the second parameter should have UNLIMITED value. Both parameters are used to determine how many times old passwords can be reuse again.

Thursday, July 19, 2007

Oracle for Beginner: Creating User Account

In Oracle, we can create an user account easily. Here are some examples that will show you how to create a new user account and grant some privileges to that user (as dba user):

$ sqlplus /nolog
SQL> conn / as sysdba
SQL> create user xxx identified by password_xxx;
SQL> grant connect to xxx ;
SQL> quit

(now, you can try to login as user xxx)
$ sqlplus xxx/password_xxx
(done user xxx login in! but you can't do anything except querying some dictionary view that already grant to you, like v$version, user_tables, user_indexes, etc.)
SQL> select * from v$version;
SQL> select table_name from user_tables;
(you also can change your password)
SQL> alter user xxx identified by oracle;
(but you can't do DDL or DML operation)
SQL> create table test(a number);
(error!)
SQL> exit

We will do a simple practice to make our user xxx can do DDL or DML operation on tablespace "operations" with space limitation . To do this, you should login again as DBA:

$ sqlplus /nolog
SQL> conn / as sysdba
SQL> create tablespace operations datafile size 5M;
SQL> alter user xxx default tablespace operations quota 2M on operations password expire;
(we want to change default tablespace from "users" to "operations" and make a space limitation for user xxx only for 2M. Option "password expire" is an option to force user xxx to change the password. Try to login as user xxx again)
SQL> grant create table, create any index, create sequence to xxx;
(as a dba, we grant some privileges for user xxx, so he/she can DDL and DML toward their own objects)
SQL> conn xxx/oracle
ERROR:
ORA-28001: the password has expired

Changing password for xxx
New password:
Retype new password:
Password changed
Connected.

SQL> create sequence seq_test;
SQL> create table test(id number(4) primary key, data varchar(40));
SQL> insert into test values(seq_test.next, 'test one');
SQL> commit;
SQL> select * from test;
SQL> drop table test purge;
SQL> exit

In unix/linux environment, if you want unix/linux user account can login to oracle which is the instance oracle is also running on the same machine, you can try with these a simple practice:

$ su -
password:
# adduser testing
# passwd testing
# exit

$ sqlplus /nolog
SQL> conn / as sysdba
SQL> show parameter os_authent_prefix;
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
os_authent_prefix string ops$

SQL> create user ops$testing identified by externally;
SQL> grant connect, resource to ops$testing;
SQL> quit
$ su - testing
password:
$ sqlplus /
SQL> show user;
ops$testing
(now you can login to your oracle with operating system user account)

Tuesday, July 17, 2007

Oracle for Beginner: Securing Roles

From this article, I want to share some commands that I have knew about Oracle10g. At this point, we will learn about how to make secure our roles, so every user that want to activate that roles should identifying with the password for each role. Here is an example to realize that:

$ sqlplus / as sysdba
SQL> create user test1 identified by oracle;
SQL> grant connect, create table to test1;
SQL> conn test1/oracle
SQL> create table test(name varchar(20));
SQL> conn / as sysdba
SQL> create role test_mgr identified by oracle;
SQL> grant insert, update, delete on test1.test to test_mgr;
SQL> create role test_qry;
SQL> grant select on test1.test to test_qry;
SQL> grant test_qry, test_mgr to budsus;
SQL> alter user budsus default role all except test_mgr;
SQL> conn budsus/oracle
SQL> select * from test1.test;
(no problem with this command, because you have test_qry role)
SQL> insert into test1.test values ('Testing 1');
(this command will generate an error, because your test_mgr is not default for your user account. In this context, you have to activate it first)
SQL> set role test_mgr identified by oracle;
(done! now you have object privileges for test1.test)
SQL> insert into test1.test values ('Testing 1');
(no problem)
SQL> commit;
SQL> select * from test1.test;
SQL> quit

Now, you can make secure for any roles that you want.

Friday, July 13, 2007

Setup ASM with Loopback device on FC6

First, this document is very helpfull for me:
Here are some steps that I was doing to try ASM on my notebook with Oracle10g R 2 on FC 6:
  • I create a disk image for 500M with this command (as root):
dd if=/dev/zero of=/disk2.img bs=516096c count=1000
dd if=/dev/zero of=/disk3.img bs=516096c count=1000

  • then i mount those disk image as local device, so that file will be threaded as phisycal disk
losetup /dev/loop0 /disk2.img
losetup /dev/loop1 /disk3.img


Note: if you want to detach loopback device from disk image, you can use this command:
losetup -d /dev/loop?
  • We should configure and run CSS (Cluster Synchronization Service) before configure ASM
$ORACLE_HOME/bin/localconfig add

that command will create init.cssd service in /etc/init.d and /etc/oracle directory store some information and location to store any information from cssd service.
You can call CSS service with this command:

/etc/init.d/init.cssd start
  • download the latest ASMlib source from OracleASM project. (please read some discussion at this). In that directory, there is no configure script, so I download ASMLib kernel module (oracleasm-2.0.3.tar.gz) and use configure script from that. The compilation is success. After make install, we will get /etc/init.d/oracleasm service script.
  • now, I have to make oracleasm kernel module is launched safely.
/etc/init.d/oracleasm configure
Default user to own the driver interface []: oracle
Default group to own the driver interface []: oinstall
Start Oracle ASM library driver on boot (y/n) [y]: n
Fix permissions of Oracle ASM disks on boot (y/n) [y]:
Writing Oracle ASM library driver configuration: [ OK ]
Unmounting ASMlib driver filesystem: [ OK ]
  • in my case, kernel module oracleasm can't be found by modprobe -r oracleasm, so, I try to call with
insmod /lib/module/{kernel_version}/extra/oracleasm.ko

I changed modprobe -s "$MODNAME" command with insmod command like above.
  • To make our local loopback disk become ASM disk, I have to make ASM disk with /etc/init.d/oracleasm createdisk command :

/etc/init.d/oracleasm createdisk ASMD0 /dev/loop0
/etc/init.d/oracleasm createdisk ASMD1 /dev/loop1

With those command, there are trow ASMD* disk that will create in my /dev/oracleasm/disks. I can check with this command:
/etc/init.d/oracleasm listdisks
ASMD0
ASMD1

  • Based on dizwell.com blog, I should prepare ASM instance with these commands:
as oracle user, I create /tmp/init+ASM.ora that have some parameters declaration like these:
INSTANCE_TYPE=ASM
DB_UNIQUE_NAME=+ASM

LARGE_POOL_SIZE=8M


$ export ORACLE_SID=+ASM
$ sqlplus / as sysdba
SQL> create spfile from pfile='/tmp/init+ASM.ora';
SQL> startup nomount;
SQL> alter system set ASM_DISKSTRING=''/dev/oracleasm/disks/*';
SQL> shutdown;

  • now, I will configure ASM with dbca. I choose Configure Automatic Storage Management, and give the group disk with DGROUP1 and choose all of ASMD* as the members.

  • Now, with dbca I can create a new database which is using ASM as the database storage.
This is my first experience using ASM with loopback device as 'phisical' storage for Oracle. I still need to learn more about Oracle RAC. I have blogroll that may be can help you too to learn about OracleRAC. If you have any other great tutorial about this, please share with me. Thanks.

Wednesday, July 11, 2007

leech with wget

This afternoon, I tried to make duplication from a http server to my external harddrive using wget. I want to make a note at my blog, so everytime when I forget about the command, this note can help me. Here is my sintax for wget to get all of contents from a directory in a server recursively, including the structure of directories.

wget -rv -l 10 -t0 -I start_of_remote_directory http://host_name

Option -r is used to download all of content recursively. If you want to make more deep for the level of directory, you can specify in the -l option.
There are many ways to do like that, one project that may be appropriate for you is Leech based on PHP. I was used this tools, but I change it only with wget.
In another case, if you have a html file that contain all links that you want to download, you can use this command:

wget -rv --user-agent="you user agent" -i file.html -F

In some cases, some web servers has configured to received only known user agent. For this condition, you can pass most famous user agent, like : "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.10) Gecko/20070510 Fedora/1.5.0.10-6.fc6 Firefox/1.5.0.10".

Saturday, July 07, 2007

Windows XP Pro on VMWare Player

I tried to install VMWare Player on my FC6 with kernel 2.6.20-1.2962.fc6. After I regitered, I downloaded the file, and installed with this command :

rpm -ivh VMware-player-2.0.0-45731.i386.rpm

after that, I tried to run vmware-config.pl as root. But I got some big errors. Based on those errors, I have to install kernel source development. The important think to install kernel source is the compatibility of machine should be same with the kernel. You can query with rpm command like this :

rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n" | grep kernel

I got the package name of kernel : kernel-2.6.20-1.2962.fc6.i586. With this information, I should download kernel-devel-2.6.20-1.2962.fc6.i586. After this installation, I can run vmware-config.pl successfully.

After this installation, I have tried to run minix and haiku with VMWare Player. You can download those vmdk and vmx from Virtual Appliance (http://www.vmware.com/info?id=177).

To get more experiences for using VMWare player, I tried to install Windows XP Prof SP2 in VMWare Player too. These sites are very helpfull for me : http://www.ffnn.nl/pages/articles/linux/vmware-player-image-creation.php. I use image file 20 GB (store at my ntfs partition) and modify template-windows.vmx (is saved on my ext3 home) like this:

#!/usr/bin/vmware
displayName = "Windows"
guestOS = "winxppro"

memsize = "192"
ide0:0.fileName = "/media/BUDSUSOTHIE/winXPSP2/20GB.vmdk"
ide1:0.fileName = "auto detect"

# DEFAULT SETTINGS UNDER THIS LINE
config.version = "8"
virtualHW.version = "3"

MemAllowAutoScaleDown = "FALSE"
MemTrimRate = "-1"

uuid.location = "56 4d 07 13 a0 34 45 9d-d8 48 18 f5 99 4b 9a ef"
uuid.bios = "56 4d 07 13 a0 34 45 9d-d8 48 18 f5 99 4b 9a ef"

uuid.action = "create"
checkpoint.vmState = ""

ethernet0.present = "TRUE"
ethernet0.connectionType = "nat"
ethernet0.addressType = "generated"
ethernet0.generatedAddress = "00:0c:29:4b:9a:ef"
ethernet0.generatedAddressOffset = "0"

usb.present = "FALSE"
sound.present = "TRUE"
sound.virtualDev = "es1371"

scsi0.present = "FALSE"
scsi0:0.present = "FALSE"
scsi0:1.present = "FALSE"

floppy0.present = "FALSE"

ide0:1.present = "FALSE"
ide1:1.present = "FALSE"

ide0:0.present = "TRUE"
ide0:0.deviceType = "disk"
ide0:0.startConnected = "TRUE"

ide1:0.present = "TRUE"
ide1:0.deviceType = "cdrom-raw"
ide1:0.autodetect = "TRUE"
ide1:0.startConnected = "TRUE"

ide0:0.redo = ""

extendedConfigFile = "template-windows.vmxf"
virtualHW.productCompatibility = "hosted"
tools.upgrade.policy = "manual"

isolation.tools.hgfs.disable = "TRUE"

usb.autoConnect.device0 = ""

Here are some snapshot of my vmware player window for Windows XP setup and Haiku :

I've tried to run ReactOS image with QEMU. Here are some "little" steps that I do :
  • run echo 1024 > /proc/sys/dev/rtc/max-user-freq as root
  • in my machine, qemu was told me to have 256 MB minimum for /dev/shm, because i have only 248 MB. QEMU told me to do this:
    • umount /dev/shm
    • mount -t tmpfs -o size=272m none /dev/shm
  • run qemu with this command:
qemu -serial stdio -boot c -hda /media/BUDSUSOTHIE/ReactOS-0.3.1/ReactOS-0.3.1.img -m 256 -localtime

Here is a snapshot for running ReactOS under QEMU :

This is one of good tutorial about VMware Player.

Thursday, June 28, 2007

Operating System Study from free OS

As long as I know, there are some famous operating system that already run on your machine. I think from all those operating system most of us still familiar with only about one or three of theme, i.e. MS Windows (and all versions), Linux (and all ditros), Mac X OS (and all versions), BSD and Unix. Sometime when we was asked to choose one of those operating system, most of us will make decision to choose an easiest and most popular operating system, although we should buy it. Some of us have a argument to choose free and open source operating system. Actually, I prefer to open source operating system, because with those open source OS we can deploy and make modification to meet our requirements. But, how about if we be bored by those famous operating system? When I tried to search from Sourceforge.net with keyword (+"Operating System"), I found some interested another free operating system. If you want not to install those alternative free operating system, you can use QEMU to run it. I have tried to run ReactOS (Windows like) on QEMU, although was ran slowly.
Based on those fact, I am wondering about how to use those alternative free and opensource operating system for use Operating System subject in undergraduate program. It will make more interesting subject if we can teach students about operating system design and algorithm based on those alternative OS as case study.
Here are some alternative free OS that I have found :
  • ReactOS. This is a Windows OS like. I use it on my FC 6 with QEMU. "ReactOS aims to achieve complete binary compatibility with both applications and device drivers meant for NT and XP operating systems, by using a similar architecture and providing a complete and equivalent public interface."
  • Haiku. If you want to know about BeOS, you can to run this operating system. If you want to run it on VMWare Player, you can download the Haiku test image that already provide at their site.
  • eyeOS. This is a Web based operating system. Very interesting for all of you which want to learn about operating system design. eyeOS using AJAX technology, so you can develop any AJAX application on it.
  • Syllable. This operating system is a AtheOS clone. "The goal of Syllable is to create a reliable and easy-to-use open source operating system for the home and small office user."
  • AROS. This OS is developed to achieve compatibility with AmigoOS.
  • TinyOS. If you want to develop an embedded wireless sensor device, this open source OS may be can help you.
  • Contiki. This is another opensource OS that was developed for embedded device. "Contiki is designed for embedded systems with small amounts of memory. A typical Contiki configuration is 2 kilobytes of RAM and 40 kilobytes of ROM."
  • MenuetOS. This operating system can only be ran only at x86 machine, either 32 bit or 64 bit. Nevertheless, this OS is very light.

Tuesday, June 26, 2007

S60 3rd Free Apps (again)

For a couple days, I still try to find more free application for S60 3rd. For today, I have found another web site and applications :
  • DivX Palyer. You can play movies on your mobile phone.
  • W/igo. If you want to make your mobile phone (with camera) to become a web cam, you can try this application. Very nice.
  • S60 Ruby. This is a Ruby interpreter that can be ran at Symbian S60 3rd. Although it doesn't have enough libraries, like PythonS60, but with this interpreter you can learn and create a small application with Ruby on your mobile phone. If you want to install it, you should create a signature for S60 Ruby application. Please refer to this information from mobile9 forum.
  • Symbian-freeware. You can download many freeware applications from this good maintenance site.
  • Series60v3.com. If you could not buy any commercial applications for your mobile phone, this site will help you :D.

Friday, June 22, 2007

SMESH SYSTEM mesh network for SME in Indonesia

I was just wondering to develop a mess wireless network infrastructure for small medium enterprise in Indonesia. This system will provide a main function to support their financial information system, groupware between sme, and give to them a direct communication with buyer. My idea is like this:
  • We will develop an embedded wireless with mess wireless network protocol. I called this device as SMESH SYSTEM. In this embedded device, we will install small damn Linux with lighthttpd, sqlite, a light server side script like bash shell cgi script, and all other programs that will support communication and sharing information system. For each SME site, they will only provide keyboard, mouse and monitor. We should provide this technology cheaply.
  • After each sme have this SMESH SYSTEM, we can develop an internet gateway locally. With this infrastructure, each sme will connect directly to the Internet. If they can use the Internet technology, this is a big step for the next step.
  • For next development plan, we can develop many systems that should be support sme to promote and sell their services or products.

I need any big pictures and suggestion from all of you to realize this idea. Thanks.

Monday, June 18, 2007

Freeware Mobile Application for my n73 S60 3rd

I have upgraded my mobile phone to N73 with Symbian S60 3rd (V3.0704.1.0.1). I found many new experiences with this phone. I was not satisfied with default applications in that phone, specially for supporting IP based communication, so I tried to search some new freeware mobile applications for N73. I found some new freeware applications that already I used in my phone:
  • Opera Mini. This is a great web browser from Opera which supports WAP 2.0.
  • ScreenSnap60. If you want to capture your symbian s60 screen and save it in some picture formats, this is an application that will fulfill your needs.
  • Python for S60. Python is a famous script language in many platforms, including on Symbian S60 3rd. There are many features that support your mobile application development, like SMS, GPRS, PIM, etc.
  • fring. I was so exciting with this application. I can talk with my friend more cheaper than if you use legacy voice communication (I mean with GSM communication), because with Fring you will use GPRS/EDGE/HSDPA as an infrastructure for IP based communication. Moreover, you still can chat with your Google Account, MSN Account, Skype Account or SIP. If you want to use fring, you have to register first at fring.com.
  • S60Bible. Thanks to Yohanes Nugroho to give us this great application, so I can read bible anytime and anywhere.
  • Gmail for mobile. With this application, I can check, compose, reply, and manage my inbox at GMail everyday. Very usefull and simple application.
  • Google Map. From your mobile phone, you can use opera mini to start downloading GMap for mobile. For my region, Yogyakarta, the map is not detail, but overall this application give me an abstraction about the location.
  • Mobile GMaps, is like Google Map, but with this application you can request for mapping from Google Map, or Yahoo map, with or withour GPS.
  • Playtxt. This is a J2ME application that you can use it for internet messaging with Y!, GTalk, MSN, Jabber, etc.
  • Y-Browser. If you want to manage your detail file system in your Symbian, this application will help you. It's like a File Explorer in you Windows or Gnome/KDE.
If you have any other applications for S60, please share with us. Thanks.

Friday, June 08, 2007

Tutorial Videos

For some reasons, I need to look any tutorial video to help me know and understand about something, specially about programming. The big resource that provide any videos is YuTube.com and I believe that all of you already knew about that. I have found another web site that provide many videos tutorial about programming, i.e. ShowMeDo. You can learn many cheat and tips about programming at there. Very interesting. You can download all of those videos free. Another an interesting video services is Video Google. This is an example video about Advanced Topics in Programming Languages Series.

For additional information, Java is number one programming language, and Ruby is number 10 based on TIOBE Programming Community Index. Great! I like Java and Ruby (although still learn by self). Programming is a one of most beautiful skill. I love it.

Wednesday, June 06, 2007

reCAPTCHA

I got this from my best friend. With this captcha, we can get more secure for our web site and our email if we want to display it on our web site. For example, I can display my email like this:


b...@gmail.com

I still learn more about this technology, so may be we can discuss in our community to make this technology more easier to implement.

Sunday, May 27, 2007

what will you do if you was bored with your job?

That is a general question for us, specially for whom as a IT worker. If there are any polling about that question, there will be hundred ways to make you refresh in your job. But the importing thing is we should ask for our self are the ways that we choose can make our body and soul refresh again? Sometime when we choose playing game as a choice, we was not get a relax situation, but might be give you more stressing condition. For my self, I will choose to talk with my colleages about any topic, but not about jobs. It will give me a relax condition. How about you? :D

Wednesday, May 23, 2007

Ruby On Rails Workshop

As my commitment about Ruby and Ruby on Rails, I have delivered "Ruby on Rails in Short Time" workshop for students at 21 - 22 May 2007. In those workshop, I delivered about Ruby programming basic and Ruby On Rails to create a very simple blog. The material of this workshop available at Thinkruby.org Repository in BAHASA Indonesia ("Cara mudah membuat aplikasi web dengan Ruby on Rails"). I will translate it to English version soon.

Friday, May 11, 2007

Dublin Core in my blog

I have added Dublin Core metadata in my blogger template. I used DC-dot utility that is maintained by Andy Powell from UKOLN, University of Bath. This is a very simple tool but cand help us to define a metadata for our web site with Dublin Core format.
Actually, I am interested in metadata, web and data indexing , text mining, and social networking, and I want to combine those concept to become a one integrated system, but I still don't have any good ideas to realize that system yet. Thinking... thinkingg... research ... reading...

Thursday, May 10, 2007

Technorati

Today, I have joined on Technorati.com community. You can visit my profile and my favorite blogs at here. I still learn about blog-tag and social networking. This is a new knowledge for me, and I want to develop a small system that can analyst any Indonesian blog whether has a blog-tag or not, and then draw a social network graph based on the relation of blog-tag. Please read the exciting idea about blog-tag game from Jeff Pulver Blog.

Saturday, April 28, 2007

Some .NET IDEs

I just started to use VB.NET as my computer language to develop any Windows applications based on .NET framework. Before VB.NET, I use VB 6 to develop some special applications. I decided to use VB.NET Express Edition from Microsoft as my .NET IDE on my Windows. This is a good IDE, but I want to find any alternative open source .NET IDEs.
I found MonoDevelop and SharpDevelop. MonoDevelop is a cross platform .NET IDE that can be runned on Linux, MacOS, Windows, Salaris, and Unix. I have tried MonoDevelop on my fedora core 6 to create a simple application with VB.NET language. It will be a good alternative IDE. With Mono, your applications can be runned on those platforms which supported by Mono. You can think this like java virtual machine. Another alternative is SharpDevelop. This IDE can be runned only on Windows. So, this is my recommendation, if you want to focus for developing any applications only for Windows, Visual Studio 2005 Express Edition is better, but if you want to develop any cross platforms using .NET framework, you can use MonoDevelop.

Friday, April 27, 2007

AIGLX+Beryl on my FC6

Finnally, I have AIGLX + Beryl in my Fedora Core 6 (updated from 5). Very owesome, great, very smooth, and more...I am very happy with it. Before this successfull configuration, I have tried many trial and errors configuration of xorg.conf for my Intel 82852/855GM VGA Card. My experiments were based on some forums and blogs that already mentions about how to install and setup AIGLX + Beryl. As already we know, Xorg version 7.1 from Fedora Core 6 had already embedded AIGLX module in that X Windows. We can configure easily our Xorg to enable AIGLX. With AIGLX, we can rendering our X Windows with 3D capabilities. Based on AIGLX module, we can choose one of the 3D Window Managers, like compiz or beryl (as i know).
Here I want to share my xorg.conf, I hope some of you can use this configuration on your xorg machine.

Section "ServerLayout"
Identifier "single head configuration"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Synaptics" "AlwaysCore"
Option "Clone" "off"
Option "Xinerama" "off"
Option "AIGLX" "true"
EndSection
...
Section "Module"
Load "dbe"
Load "fbdevhw"
Load "glx"
Load "record"
Load "freetype"
Load "type1"
Load "synaptics"
Load "extmod"
Load "dri"
EndSection

Section "DRI"
Group 0
Mode 0666
EndSection

Section "Device"
Identifier "Videocard0"
Driver "i810"
VendorName "Videocard vendor"
BoardName "Intel 852"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 16
...
EndSection

Section "Extensions"
Option "Composite" "Enable"
EndSection

Thursday, April 12, 2007

Janjiku v 0.1

I have developed an example of MIDlet suite that used RMS to store some data in mobile phone. This application is a simple one. The purpose of this development is to give an example application to my students whose take a subject about Wireless Programming with MIDP. I use NetBeans 5.5 Mobility Pack to develop this application. With this IDE, we can develop a MIDlet very easy because there are MIDP Flow Designer which is with this Flow Designer you can design the interaction flow between your MIDP screen in your application.
I called this application as a Janjiku, and altough I did'nt use a software version control, i will give this application with 0.1 beta version :D. With this application, you can manage your appointment data. I have planning to develop this application in next version. Here are some TODO lists for my Janjiku :
* the application should be have alarm system based on the appointments
* you can save some pictures related to your appointments
* .....etc...etc...etc... :D

I have tested this application in my Nokia 6600. If you want, you can test this application on your mobile phone (supported MIDP 2.0, CLDC 1.0) too, and please give me your comments. You can download this application from http://lecturer.ukdw.ac.id/budsus/janjiku.zip, or you can visit Janjiku at freshmeat.net page.


Tuesday, March 27, 2007

updated to fc6

I have been updated my fedora successfully, from FC5 (updated) to FC6. But I had some problems after installation. First, my JDK 6 automatically deinstalled by FC6 update process, and replaced by java-gjc-1.4.2. Second, my MonoDevelop, gambas could not be executed. About this one, I should deinstalled manually, and then installed again. But overall, FC6 is very great. I love fedora...:D

Saturday, March 17, 2007

My Commitment to Ruby/RoR

The Open Source Software development in Indonesia could be said very stimulating. Many Open Source communities were formed, including the Alumnus's community CICC Indonesia. I have begun to enter in the OSS world since 1998, and I began the OSS movement in the university where I teach in 1999. My students really were attracted by OSS, specially the programming. With the new expertise in Ruby programming and Ruby on Rail, in the near future I plan to continue holding several workshops in several cities to introduce Linux and Open Source Software to Small Business Enterprise to high school teachers and students. As a lecturer, I am eager to teach Ruby on Rail as a subject for Agile Approach for Web Application Framework. That will be an amazing subject for the students.
Also, I wonder if we are able to start a Ruby project together with these Ruby Class participants. This project will produce various tutorials, the example of the program, the video, etc. against Ruby and Ruby on Rail that will be available in various languages in Asia. With this project, it was expected to be able to be made also as the place to share knowledge and the experience towards the utilization of the programming language open source based in Asia (my hope!).
I was also preparing a book about the programming script in Linux that eventually will put Ruby as one chapter especially. I planned also to write Ruby on Rails book after the book one. With this book, I hoped could help to spread Ruby and Ruby on Rail in Indonesia.

Friday, March 16, 2007

thinkruby.org

Already almost this one week, I and several friends from Thailand, India and Japan tried to formulate one
web site about Ruby and Ruby on Rail that will have a function of as a sharing experience and tutorial about the programming of Ruby/RoR media.
Our discussions could be monitored at Scratchpad.wikia.com.

Thursday, March 15, 2007

Datamining.typepad.com

I found a very rich information blog that was created by Matthew Hurst, a Scientist at Microsoft's Live Labs. I like this blog because I can get many knowledge about Data Mining and Text mining. You can visit this blog at http://datamining.typepad.com/. Happy surfing!

Open Document Format War

This is a good time for me to write again in my blog. Today I read the news about ODF-OOXML that was issued together by Novell and Microsoft. OOXML (Open Office XML) was the product from Novell and Microsoft, whereas ODF (OpenDocument Format) from the OpenOffice community. The two fortifications also issued each other converter for the two formats. Novell officials said late last year that they planned to create a version of OpenOffice that would include Office Open XML (OOXML) file-format compatibility. The other side, Sun was releasing a plug-in for Microsoft Office 2003 that will allow two-way compatibility with the OpenDocument Format, the company announced on Wednesday. This that made confused the user. Why must make separately the format for the document be open?