Centos 5 wireless problem SIOCSIFFLAGS: No such file or directory

0. Connect as a root user.

1. First of all determine which wireless card you have:

/sbin/lspci | grep Wireless

My output is :

02:00.0 Network controller: Intel Corporation PRO/Wireless5100 ANG…

1.Download firmware from here.(This is for 5100,5300 and 5350 (iwlang))

2. Install downloaded package:

rpm -Uvh iwl5000-firmware-8.24.2.12-1.elrepo.noarch.rpm

3. Reload iwlagn module

modprobe -r iwlagn;
modprobe iwlagn

4. Start wlan0

ifconfig wlan0 up

5. Enable Network Manager:

chkconfig NetworkManager on
service NetworkManager start

That’s all!

User’s $HOME/.dmrc file is being ignored…(ERROR)

After changing my user’s home directory each logging to the computer was arising the following warning:

“User’s $HOME/.dmrc file is being ignored. This prevents the default session and language from being saved. File should be owned by user and have 644 permission. User $HOME directory must be owned by user and not writable by other users”

I solved it by the following way:

--Connect by your user.

chmod 644 ~/.dmrc
chown your_user_name ~/.dmrc
chmod 700 ~
chown your_user_name ~

Log out then Log in again…It should solve.

How to root HTC sensation(Windows Users)

1. Plug in your HTC to PC.

2. Go to the Settings->Applications->Development and check the box for USB debugging in your HTC.

3. Download All installation things from here. and HTC driver from here.

4. Run HTCDriver3.0.0.007.exe, and install it(This is HTC driver installation).

5. You should see the following in Device Manager list:

Android USB Devices Device ManagerPicture 1

6. Copy PG58IMG.zip and paste it in the root folder of sdcard.

7. Turn off HTC-> Pull the battery off-> Put the battery back-> Press Down Volume key,hold it-> Press down the Power button key…

There will appear the following question:

Do you want to start update?

Press volume up key(means yes)

Press power button to reboot.

8. Run CMD, change path to the downloaded file, and run the following(Note HTC should be plugged into the PC, in Charge Only mode):

> adb devices

My output is

List of devices attached
HT15NV815414    device

9. Go to www.Revolutionary.io  Click Download for Windows(revolutionary file will be downloaded).

Fill the form on that site, like that:

Revolutionary utility gain beta keyPicture 2

Click Generate key button. Copy and save you beta key.

HBOOT version can be seen if you turn off HTC, pull the battery off, then pull it back, Press Down Volume key and hold it, then press the power button. You should see the screen like that:

HTC Sensation HBOOT versionPicture 3

 

There is S-OFF because I have already done these steps. You should have S-ON, now.

10. Return to our CMD(You are in the download file) and run revolutionary.exe

It will ask you the beta key. Enter the previously gained key from www.Revolutionary.io site.

The process should start, it will reboot you device several times and you should see S-OFF instead of S-ON on your HTC screen(picture 3).

Type Y value for the question and press ENTER.

11. Delete PG58IMG.zip  from your sdcard. And copy su-2.3.6.3-efgh-signed.zip file into sdcard root directory.

Power off HTC, pull the battery off, then put it back, Press Down Volume key and hold it, then press the power button.

You should see the Picture 3.

Press down volume key and chose RECOVERY, press the power button.

It should show the list.

Choose

-install zip from sdcard

then

-choose zip from sdcard

and choose:

-su-2.3.6.3-efgh-signed.zip

then

-Yes – Install su-2.3.6.3-efgh-signed.zip

It may show that the installation was aborted. Ignore it and repeat the steps from choosing zip file from sdcard.

Then Go Back and choose:

-reboot system now

That is all…

Oracle Streams Replication

In my previous posts I discussed Oracle Advanced Replication…But this method is error-prone.
I do not recommend it to use, because it works fine only for DML operations on less than 100 transactions and there is other limitations also, if you wonder to better understand how can it be configured click here.

Because of that, I started to find another method of replication…and here it is.

So let’s start…

Database 1—–ORCL

Database 2—–TEST

First of all, you should activate archive logging for each of the databases, if you don’t remember how to do this click here.

Step 1: Create stream administration user in both databases.

———————————-ORCL———————————-

SQL> connect sys/pass@orcl as sysdba
SQL> create user streamadmin identified by streamadmin default tablespace users;

———————————-TEST———————————-

SQL> connect sys/pass@test as sysdba
SQL> create user streamadmin identified by streamadmin default tablespace users;


Step 2: Grant required privileges to the user streamadmin.

———————————-ORCL———————————-

SQL> grant dba,select_catalog_role to streamadmin;
SQL> exec dbms_streams_auth.grant_admin_privilege('streamadmin',true);

———————————-TEST———————————-

SQL> grant dba,select_catalog_role to streamadmin;
SQL> exec dbms_streams_auth.grant_admin_privilege('streamadmin',true);

Step 3: Check database parameters required for setting up stream replication.

In this section everyone writes to set GLOBAL_NAMES parameter to TRUE, but I am not using it.

SQL> show parameter job_queue_processes

NAME                 TYPE    VALUE
-------------------- ------- ------
job_queue_processes  integer 10

SQL> show parameter db_recovery_file_dest_size

NAME                       TYPE        VALUE
-------------------------- ----------- -----
db_recovery_file_dest_size big integer 2G

SQL> show parameter db_recovery_file_dest

NAME                  TYPE   VALUE
--------------------- ------ ------------------------------------------------
db_recovery_file_dest string /u0/app/oracle/product/10.2.0/flash_recovery_area

Step 5: Enable supplemental logging on the COUNTRIES table on both of the databases.

———————————-ORCL———————————-

SQL> alter table hr.countries add supplemental log data (all) columns;

———————————-TEST———————————-

SQL> alter table hr.countries add supplemental log data (all) columns;

Step 6: Create Database Links between the stream administrator users in each of the databases.

———————————-ORCL———————————-

SQL> connect streamadmin/streamadmin@ORCL
SQL> create database link test connect to streamadmin identified by streamadmin using 'test';

———————————-TEST———————————-

SQL> connect streamadmin/streamadmin@TEST
SQL> create database link orcl connect to streamadmin identified by streamadmin using 'orcl';

Step 7: Create Stream Queues under the streamadmin user to apply and capture the database changes that should be replicated.

———————————-ORCL———————————-

SQL> show user
User is "streamadmin"
SQL> exec dbms_streams_adm.set_up_queue(queue_table => 'apply_q', queue_name => 'apply_q', queue_user => 'streamadmin');
SQL> exec dbms_streams_adm.set_up_queue(queue_table => 'capture_q',queue_name => 'capture_q',queue_user => 'streamadmin');

———————————-TEST———————————-

SQL> show user
User is "streamadmin"
SQL> exec dbms_streams_adm.set_up_queue(queue_table => 'apply_q', queue_name => 'apply_q', queue_user => 'streamadmin');
SQL> exec dbms_streams_adm.set_up_queue(queue_table => 'capture_q',queue_name => 'capture_q',queue_user => 'streamadmin');

step 8: Setup data capture on both of the databases:

———————————-ORCL———————————-

SQL> BEGIN
  dbms_streams_adm.add_table_rules
  (table_name     => 'HR.COUNTRIES'
  ,streams_type   => 'CAPTURE'
  ,streams_name   => 'CAPTURE_STREAM'
  ,queue_name     => 'CAPTURE_Q'
  ,include_dml    => TRUE
  ,include_ddl    => TRUE
  ,inclusion_rule => TRUE
  );
END;
/

———————————-TEST———————————-

BEGIN
  dbms_streams_adm.add_table_rules
  (table_name     => 'HR.COUNTRIES'
  ,streams_type   => 'CAPTURE'
  ,streams_name   => 'CAPTURE_STREAM'
  ,queue_name     => 'CAPTURE_Q'
  ,include_dml    => TRUE
  ,include_ddl    => TRUE
  ,inclusion_rule => TRUE
  );
END;
/

Step 9: Setup data apply on both of the databases:

———————————-ORCL———————————-

BEGIN
  DBMS_STREAMS_ADM.add_table_rules (
  TABLE_NAME      => 'HR.COUNTRIES',
  STREAMS_TYPE    => 'APPLY',
  STREAMS_NAME    => 'APPLY_STREAM',
  QUEUE_NAME      => 'APPLY_Q',
  INCLUDE_DML     => TRUE,
  INCLUDE_DDL     => TRUE,
  SOURCE_DATABASE => 'TEST'
  );
END;
/

———————————-TEST———————————-

BEGIN
  DBMS_STREAMS_ADM.add_table_rules (
  TABLE_NAME      => 'HR.COUNTRIES',
  STREAMS_TYPE    => 'APPLY',
  STREAMS_NAME    => 'APPLY_STREAM',
  QUEUE_NAME      => 'APPLY_Q',
  INCLUDE_DML     => TRUE,
  INCLUDE_DDL     => TRUE,
  SOURCE_DATABASE => 'ORCL'
  );
END;
/

Step 10: Setup propagation process on both of the databases:

It is basically setting up relationship between the capture processes on one database and apply process on the other database.

———————————-ORCL———————————-

BEGIN
  DBMS_STREAMS_ADM.ADD_TABLE_PROPAGATION_RULES(
  TABLE_NAME             => 'HR.COUNTRIES',
  STREAMS_NAME           => 'ORCL_TO_TEST',
  SOURCE_QUEUE_NAME      =>'CAPTURE_Q',
  DESTINATION_QUEUE_NAME => 'APPLY_Q@TEST',
  INCLUDE_DML            => TRUE,
  INCLUDE_DDL            => TRUE,
  SOURCE_DATABASE        => 'ORCL');
END;
/

———————————-TEST———————————-

BEGIN
  DBMS_STREAMS_ADM.add_table_propagation_rules(
  TABLE_NAME             => 'HR.COUNTRIES',
  STREAMS_NAME           => 'TEST_TO_ORCL',
  SOURCE_QUEUE_NAME      =>'CAPTURE_Q',
  DESTINATION_QUEUE_NAME => 'APPLY_Q@ORCL',
  INCLUDE_DML            => TRUE,
  INCLUDE_DDL            => TRUE,
  SOURCE_DATABASE        => 'TEST'
  );
END;
/

Step 11: Setup schema instantiation SCN on both of the databases.

———————————-ORCL———————————-

DECLARE
iscn NUMBER;
BEGIN
     iscn := dbms_flashback.get_system_change_number();

     dbms_apply_adm.set_table_instantiation_scn@TEST(
     source_object_name    => 'HR.COUNTRIES'
     ,source_database_name => 'ORCL'
     ,instantiation_scn    => ISCN);
END;
/

———————————-TEST———————————-

DECLARE
iscn NUMBER;
BEGIN
     iscn := dbms_flashback.get_system_change_number();

     dbms_apply_adm.set_table_instantiation_scn@ORCL(
     source_object_name    => 'HR.COUNTRIES'
     ,source_database_name => 'TEST'
     ,instantiation_scn    => ISCN);
END;
/

Step 12: Start capture and apply process:

DISABLE_ON_ERROR parameter values:

‘N’ streaming process will be continued even when it encounters errors.
The default value is ‘Y’ which stops process automatically on the first error encountered.

———————————-ORCL———————————-

BEGIN
  dbms_apply_adm.set_parameter(
  apply_name => 'APPLY_STREAM'
  ,parameter => 'DISABLE_ON_ERROR'
  ,value     => 'N');

  dbms_apply_adm.start_apply(apply_name=> 'APPLY_STREAM');

  dbms_capture_adm.start_capture(capture_name=> 'CAPTURE_STREAM');
END;
/

———————————-TEST———————————-

BEGIN
  dbms_apply_adm.set_parameter(
  apply_name => 'APPLY_STREAM'
  ,parameter => 'DISABLE_ON_ERROR'
  ,value     => 'N');

  dbms_apply_adm.start_apply(apply_name=> 'APPLY_STREAM');

  dbms_capture_adm.start_capture(capture_name=> 'CAPTURE_STREAM');
END;
/

 

If any error happens the following query shows it:

select * from dba_apply_error;

 

Let’s test it…

———————————-ORCL———————————-

SQL> connect hr/hr@orcl

SQL> select * from countries;

COUNTRY_ID COUNTRY_NAME    REGION_ID
---------- --------------- ----------
AR         Argentina       2

SQL> insert into contries values('AA','Aaaa',1);
SQL> commit;

SQL> select * from countries;

COUNTRY_ID COUNTRY_NAME  REGION_ID
---------- ------------- ----------
AA         Aaaa          1
AR         Argentina     2

———————————-TEST———————————-

SQL> connect hr/hr@test

SQL> select * from countries;

COUNTRY_ID COUNTRY_NAME REGION_ID
---------- ------------- ----------
AA          Aaaa         1
AR          Argentina    2

Install Oracle 10g on Solaris

1. Logon as a root user:

> su
Password:

2. Create Oracle software owner’s home directory.

cd /u0
mkdir –p app/oracle

3. Create necessary groups and Oracle user.

groupadd oinstall
groupadd dba
useradd –s /bin/ksh –d /u0/app/oracle –g oinstall –G dba oracle

4 Change the owner of the app directory.

chown –R oracle:oinstall app

5 Reset oracle’s password.

passwd oracle

6 Add the following parameters to /etc/system

set shmsys:shminfo_shmmax = 4294967295
set shmsys:shminfo_shmmin = 1
set shmsys:shminfo_shmmni = 100
set shmsys:shminfo_shmseg = 10
set semsys:seminfo_semmni = 100
set semsys:seminfo_semmns = 1024
set semsys:seminfo_semmsl = 256
set md:mirrored_root_flag=1
set noexec_user_stack=1

7. reboot server

8. Download the installation file from here. Extract and run ./runInstaller as a oracle user.

9. create .profile file in Oracle’s home directory ‘/u0/app/oracle ’ and write the following lines:

umask 022

stty istrip
ORACLE_BASE=/u0/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
PATH=$ORACLE_HOME/bin:/usr/ccs/bin:/usr/bin:/etc:/usr/openwin/bin:/usr/local/bin:$ORACLE_BASE
export ORACLE_BASE ORACLE_HOME PATH