UNIX tricks and treats

Aller au contenu | Aller au menu | Aller à la recherche

jeudi 23 mai 2013

Video of the new Jolla handset

Here is a nice and thorough video of the new Jolla device by Jolla's chief designer Martin Schüle.

There is a nice size comparison between Jolla, the Nokia N9, and an Iphone 4 among other things.

The Sailfish OS gets cooler and smoother, with full Facebook integration and lots of goodies.

Nothing revealed on the Other Half (the removable and hardware-customizable back of the device), though.

Courtesy of KickNetwork.

Happy computing

Nixman

lundi 20 mai 2013

First Jolla device preorders opened

Today, the 20th of May, Jolla unveiled its first, very reasonably-priced (under 400 €, VAT included!) and modular device.

Here are the specs:

- 4.5 '' display

- dual core,

- 4G,

- 16 GB expandable through micro SD,

- 8 MP camera,

- user replaceable battery,

- "the other half" which is an expansion module (maybe with QWERTY keyboad?),

- Saifish gesture-based  OS,

- android (TM) compatibility

You may preorder here and be part of the movement, like me!:

https://join.jolla.com/en

Happy computing

Nixman

jeudi 18 avril 2013

First Jolla Sailfish phone to be announced in May

According to finnish economic journal Taloussanomat Jolla will be announcing their first Sailfish smartphone in May.

It will be possible to preorder the phone startin in the second half of May.

The early birds will receive "some goodies the others won't get", promises Antti Saarnio from Jolla.

So get your credit card ready :-)

Happy computing,

Nixman

mardi 26 février 2013

Sailfish SDK is out!

The day has finally arrived!

The much-awaited Sailfish SDK is out in alpha release at https://sailfishos.org/

Currently available for Linux 32 and 64 bit only, but ports to other popular OS's will follow.

Happy computing

Nixman

dimanche 6 janvier 2013

First well filmed Sailfish OS demo

Hello, everyone,

The buzz around Sailfish and Jolla is growing...

Engadget has released a good quality demo of the sailfish OS here. It's the first well filmed demo (no shaking camera and chittering on the background) that I've been able to spot since the launch at Slush. Over 500 comments, so there is definitely interest in some truly open (OS AND ecosystem, unlike Android) multitasking player in the mobile scene.

And Forbes magazine has mentioned Jola as a major contender in the future of mobile over here.

Can't wait for the release of the first real Jolla handset!

Happy computing till then.

Nixman

jeudi 27 décembre 2012

Querying Oracle instance alertlog via SQL

As of Oracle 11g, the contents of Oracle alert log can be queried directly via a fixed table X$DBGALERTEXT.

desc X$DBGALERTEXT
 ADDR                                               RAW(8)
INDX NUMBER
INST_ID NUMBER
ORIGINATING_TIMESTAMP TIMESTAMP(3) WITH TIME ZONE
NORMALIZED_TIMESTAMP TIMESTAMP(3) WITH TIME ZONE
ORGANIZATION_ID VARCHAR2(64)
COMPONENT_ID VARCHAR2(64)
HOST_ID VARCHAR2(64)
HOST_ADDRESS VARCHAR2(46)
MESSAGE_TYPE NUMBER
MESSAGE_LEVEL NUMBER
MESSAGE_ID VARCHAR2(64)
MESSAGE_GROUP VARCHAR2(64)
CLIENT_ID VARCHAR2(64)
MODULE_ID VARCHAR2(64)
PROCESS_ID VARCHAR2(32)
THREAD_ID VARCHAR2(64)
USER_ID VARCHAR2(64)
INSTANCE_ID VARCHAR2(64)
DETAILED_LOCATION VARCHAR2(160)
PROBLEM_KEY VARCHAR2(64)
UPSTREAM_COMP_ID VARCHAR2(100)
DOWNSTREAM_COMP_ID VARCHAR2(100)
EXECUTION_CONTEXT_ID VARCHAR2(100)
EXECUTION_CONTEXT_SEQUENCE NUMBER
ERROR_INSTANCE_ID NUMBER
ERROR_INSTANCE_SEQUENCE NUMBER
VERSION NUMBER
MESSAGE_TEXT VARCHAR2(2048)
MESSAGE_ARGUMENTS VARCHAR2(128)
SUPPLEMENTAL_ATTRIBUTES VARCHAR2(128)
SUPPLEMENTAL_DETAILS VARCHAR2(128)
PARTITION NUMBER
RECORD_ID NUMBER


The PROBLEM_KEY column gives the ORA- error code.

However, being a fixed table, it means that the table is only accessible by SYS, and not viewable in SYS's catalog.

A quick and dirty fix can be to create a V$ public synonym for the view, and grant SELECT to the view to whoever has to access it.

CREATE VIEW SYS.V_$ALERT_LOG
AS SELECT * FROM x$dbgalertext;

CREATE OR REPLACE PUBLIC SYNONYM V$ALERT_LOG FOR SYS.V_$ALERT_LOG;

GRANT SELECT ON SYS.V_$ALERT_LOG TO MYDBUSER;


You can then query the view for interesting details.

For example:

SELECT * FROM V$ALERT_LOG WHERE MESSAGE_LEVEL <> 16 ORDER BY ORIGINATING_TIMESTAMP DESC;


Happy computing

Drop me a line and hang out on the sidebar links if this note has been useful to you.

Nixman

dimanche 23 décembre 2012

Jolla Unlike ringtone available for download!

If you were like me and loved the theme tune, "Unlike", the first Jolla videos featured, here are some great news for you:

Jolla has made it available as a ringtone here. Rings nicely on my phone, too, now.

Now, all I hope for till the first Jolla smartphone comes out, is that they make some of their "Unlike the Ordinary" T-shirts available for sale, so that we can help spread the word around!

Happy computing till then,

Nixman

mercredi 19 décembre 2012

Making PostgreSQL logs more verbous

Default PostgreSQL logging is quite discreet.

Supposing you would want to log some SQL statements, and in the same time have a more frequent rotation of your logs, here are the lines to change in you postgresql. conf file:

# Changed from -%a to -%a%H%M
log_filename = 'postgresql-%a%H%M.log' # log file name pattern,

# Changed from 1d to 60min
log_rotation_age = 60 # Automatic rotation of logfiles will # happen after that time. 0 disables.

# Changed from 0 to 512k
log_rotation_size = 512 # Automatic rotation of logfiles will # happen after that much log output. # 0 disables.

# Changed from -1 to 0
log_min_duration_statement = 0 # -1 is disabled, 0 logs all statements # and their durations, > 0 logs only # statements running at least this number # of milliseconds

# Changed from none to mod
log_statement = 'mod' # none, ddl, mod, all

Beware of the log_statement parameter on overloaded systems, as your log files might experience some pretty heavy I/O.

Leave me a note if this post has been useful.

Happy computing,

Nixman

Trying out Sailfish Mer SDK

For all of those too impatient to wait for a full Sailfish OS binary SDK release (due for Q1 2013), the Mer project has released a good documentation on how to build your own environment under VirtualBox.

And it's here:

https://wiki.merproject.org/wiki/Platform_SDK_on_VirtualBox

You will need a Linux box and some extra RAM, and you're ready to write some Qt apps for Jolla.

Nixman

mercredi 5 décembre 2012

Jolla's Sailfish SDK available soon, and port on Nokia N9 too!

The guys at Jolla seem to be right on schedule!

This just came in from Jolla's sailfishos.org Q&A page:

When will Sailfish SDK be available?

The version presented at Slush is a technical preview. After presenting it we are applying updates based on the feedback received by the community and we will make the binaries available in early Q1 2013. In the meantime you can follow the steps on the merproject.org page and build most of the SDK yourself.

It will be available for Windows, Linux, and OSX.
Can't wait to test!

Almost simultaneously the MeeGo hackers were announcing the port of Sailfish OS on the Nokia N9 on their facebook account in a very near future.

The road is paved with gold!

Nixman

mardi 27 novembre 2012

DNA is proud to be a forerunner on future Jolla phones

Last week Jolla announced a list of partnerships, including finnish operator DNA.

It seems that the deal is confirmed, and DNA is very proud to be a forerunner.

http://www.netapps.fi/jolladna/

You can subscribe to be the first ones to get info on Jolla phones availability.

Nixman

dimanche 25 novembre 2012

New Sailfish demo videos out from Jolla

A few new Sailfish demos from Jolla are out

First the Sailfish SDK demo from Slush:

http://www.youtube.com/watch?feature=player_embedded&v=ZrwYyN-vNVo

Very fast development indeed with this new Qt SDK. Some whiners will of course complain about the lack of an efl SDK...

The second one is in finnish only from Jolla's Senior designer:

http://www.youtube.com/watch?feature=player_embedded&v=NtEbOGuxuig

There are some interesting comments from Jaakko Roppola about the philosophy of the Sailfish UI, that I've tried to translate as accurately possible:

"The UI has been built around simplicity and ease of use"

"No need to into the application and back off. You can just slide the application icon on the side to execute commands"

"What are the limits? - Basically the physical size (of the screen), and in some cases there is no need for interaction. For example the People application doesn't have any interaction"

"What about the multitasking and its limits? - There's a human limit. We don't want to make a second page with icons. When you have a certain number of applications open, the least used one will not be visible. It will still be running, but won't be visible on the home screen" (From what I've heard, it should be 9 application maximum on the home screen currently)

"You can close the application like this (by pressing them a few seconds and tapping the cross)"

"Is there a context menu? - Yes, and we can demonstrate our Ambiance application at the same time. You get the context menu for the application by swiping from top to bottom from anywhere on the screen. When I release it, it executes the function it has been asigned"

"There have been many questions about the Ambiance: is it not just some eye candy? No, it was just one of the targets we wanted to show. You have to think much further than adapting the colours of the phone to some picture you just find in the gallery."

"There is one thing we have been quite clear about when we've been discussing the UI between ourselves: we don't want any buttons everywhere on the screen. Rather, the navigation is by gestures only."

"For example, here , I can go digging very far in the hierarchy, and just swipe my way back to top. But I still see the hierarchy and just by one gesture I can go back to my home screen to check whether I have network, how much battery I've got left..."

"What about notifications? - If you're not using the phone, the notification will be on the home screeen, but if you're using an app, the notification for a call for example will pop up ,but it won't be persistent in the application window. It will be directly on the screen, and you won't have to search for an SMS somewhere in another application. Basically, everything must be very close anywhere, but everything must NOT be everywhere."


Here's a shorter demo in english by Jaakko:

http://www.youtube.com/watch?v=_c_BqnR_vAM

And a second short demo of multitasking in english:

http://www.youtube.com/watch?v=KHn3qp_E3_A&feature=related


And a third one with the quick glance feature:

http://www.youtube.com/watch?v=bLKN7QdGzWU&feature=related

The bottom line is: cool user-friendly interface that you can use single-handedly blindfolded. THAT seems to be the idea behind Sailfish OS UI. Ans it's truly open, not like the  Android ecosystem where Google's basically bullying everyone around.

Nixman

jeudi 22 novembre 2012

Jolla's Sailfish OS is out!

Jolla's Sailfish OS was announced yesterday at the nordic Slush startup event.


As the organizers of the event humorously pointed out, Finland in November certainly isn't California, but the startups have never been better. 

Simultaneously, the jolla.com and sailfishos.org websites were finally opened to the public.
Until now, Jolla had been quite secretive about the project, having only a twitter and a facebook account, plus some haphazard interviews with executives like Jussi Hurmola.
Seeing the superb result, a true multitask OS that can be operated single-handedly (no politically incorrect pun at Marc Dillon intended) with just a few swiping gestures, I can understand why these guys were busyier coding and making their product work, rather than putting up communication hype.
You could sense the tension, emotion of the moment, and a bit of a lack of polished PR preparation in the keynote.
That's all right guys, you really rock, far away from usual hype of contentless startups!
Not a single single technical glitch during the presentation, except for the sound guys at slush ;-). The demos just worked fluidly.

Several new partnerships were announced, in addition to the existing chinese D-Phone deal, amongst which:
DNA: A finnish mobile operator,
Myriad: for the Android compatibility layer,
ST-Ericsson: that will ensure OS compatibility with Sony-Ericsson smartphone hardware like the powerful NovaThor system-on-chips.

etc...

The video for the keynote is here:
http://www.youtube.com/watch?v=bdLUJZR078k&feature=plcp

A shorter hands-on preview here:
http://www.youtube.com/watch?v=_c_BqnR_vAM&feature=plcp&list=PLQgR2jhO_J0y6zifH8KkevJoEYM9LOtkM

And a coverage of the Jolal part of the meeting, plus interview here:
http://bergie.iki.fi/blog/jolla-sailfish/

Basically, my next smartphone will be running Sailfish. Provided Angry Birds Star Wars and Bad Piggies will be available ;-).

Nixman

vendredi 31 août 2012

Oracle Transparent Data Encryption

But:

Oracle Transparent Data Encryption permet de chiffrer et déchiffrer à la volée les données en base. Les données sont chiffrées au niveau des datafiles. Seuls les utilisateurs authentifiés en base ont accès aux données en clair. Principe:

Le chiffrage repose sur l'utilisation d'un portefeuille (wallet) de mot(s) de passe. Contrairement à l'utilisation de packages comme DBMS_CRYPTO, cette solution de cryptage est transparente pour l'utilisateur authentifié, et ne nécessite donc pas de modification du code client, ce qui constitue un avantage financier non négligeable. Il est possible de chiffrer des colonnes spécifiques d'une table, ou bien des tablespaces entiers.

Mise en place:

Création du wallet:

Le wallet est positionné par défaut dans le répertoire $ORA_ADM/$SID/wallet.

Il suffit alors de créer le répertoire:

mkdir $ORA_ADM/$SID/wallet

Il est également possible de spécifier le lieu de stockage du wallet dans le fichier sqlnet.ora, de la façon suivante:

ENCRYPTION_WALLET_LOCATION =
(SOURCE=
(METHOD=file)
(METHOD_DATA=
(DIRECTORY=/u01/app/oracle/MON_REPERTOIRE_A_WALLETS)))

Il faut ensuite créer le mot de passe de chiffrage:

ALTER SYSTEM SET ENCRYPTION KEY AUTHENTICATED BY "M0n#m0T$dE_Pa55E";

Puis ouvrir le wallet sur chacune des instances de la base:

ALTER SYSTEM SET ENCRYPTION WALLET OPEN IDENTIFIED BY "M0n#m0T$dE_Pa55E";

/! L'ouverture du wallet doit se faire à chaque redémarrage de la base, ainsi que sur l'ensemble des instances d'un RAC.

Cas particulier du wallet sur un RAC:

Le wallet doit être préférentiellement stocké sur un filesystem partagé comme ACFS (ce qui est notre cas). De plus, il faut initialiser les paramètres système et BDD ORACLE_UNQNAME.

ex:

export ORACLE_UNQNAME=MONINST
srvctl setenv database -d MONINST -T "ORACLE_UNQNAME=MONINST"

De même, il faut indiquer le lieu de stockage du wallet en utilisant la variable $ORACLE_UNQNAME dans sqlnet.ora du user oracle, puis redémarrer le listener (avec le user grid).

ENCRYPTION_WALLET_LOCATION =
(SOURCE=
(METHOD=file)
(METHOD_DATA=
(DIRECTORY=/u01/app/oracle/acfsmounts/orabase1/admin/$ORACLE_UNQNAME/wallet/)))

Sinon, le wallet ne peut être ouvert que sur une seule instance à la fois.

Vérification:

select * from gv$encryption_wallet;
INST_ID WRL_TYPE             WRL_PARAMETER                                                          STATUS
---------- -------------------- ---------------------------------------------------------------------- ------------------
1 file                 /u01/app/oracle/acfsmounts/orabase1/admin/$ORACLE_UNQNAME/wallet/      OPEN
2 file                 /u01/app/oracle/acfsmounts/orabase1/admin/$ORACLE_UNQNAME/wallet/      OPEN

Les deux wallets doivent être en état "OPEN"

Chiffrage d'un tablespace:

Le chiffrage d'un tablespace se fait à la création de celui-ci. Il n'est (pour l'instant?) pas possible de chiffrer un tablespace existant.

create tablespace ts_encrypted datafile size 10M autoextend on next 10M encryption using 'AES256' default storage(ENCRYPT);

Il suffit alors de déplacer les données vers ce nouveau tablespace chiffré. L'avantage d'un tablespace chiffré par rapoort au chiffrage de colonnes d'une table est essentiellement dans l'absence de limitations sur l'utilisation des eindexes dans le cas de l'opérateur LIKE, et dans le chiffrage simple des blobs. Le désavantage essentiel est l'impossibilité de l'effectuer en ligne.

Chiffrage d'une colonne d'une table:

On peut chiffrer les colonnes d'une table à l'aide d'une simple commande ALTER TABLE.

ex:

alter table SCOTT.EMPLOYEE modify (ID RAW(32) ENCRYPT);

Dans le cas où la colonne est indexée, il faut désactiver l'option SALT:

ex:

alter table SCOTT.EMPLOYEE modify (DATE_EMBAUCHE DATE ENCRYPT NO SALT);

L'encodage par défaut est AES192 sous Oracle 11gR2.

A noter que les tables ne contenant aucune colonne cryptée seront toujours accessibles, même si le wallet n'est pas ouvert.
Une table contenant une seule colonne chiffrée sera totalement inaccessible si le wallet n'est pas ouvert.

Retour arrière:

Le retour arrière se fait toujours à l'aide d'une simple commande ALTER TABLE.

ex:

alter table SCOTT.EMPLOYEE modify (DATE_EMBAUCHE DECRYPT);

Chiffrage des colonnes LOB d'une table:

Il faut chiffrer les lobsegments en utilisant l'option de stockage SECUREFILE lors de la création du LOB.

Il est possible de chiffrer une colonne LOB en ligne en utilisant le package DBMS_REDIFINITION.

Chiffrage des backups Datapump:

Il est possible d'exporter les données sous forme non chiffrée, avec les options standard de DataPump L'alerte suivante est alors levée dans les logs de l'export:

ORA-39173: Des données cryptées ont été stockées décryptées dans un ensemble de fichiers de vidage.

Dans ce cas, il est toujours possible de lire des données en clair dans le fichier de dump, à l'aide de l'utilitaire strings par exemple.

Afin d'exporter des données chiffrées, il faut ajouter l'option encryption_password à la commande DataPump

ex:

expdp TOTO/TATA directory=EXP_DIR schemas=TITI encryption_password=M0n#m0T$dE_Pa55E dumpfile=dump_titi.dmp logfile=dump_titi.log

De même, il faut spécifier le mot de passe de chiffrage lors de l'import.

ex:

impdp TOTO/TATA directory=EXP_DIR encryption_password=M0n#m0T$dE_Pa55E dumpfile=dump_titi.dmp logfile=impdp_titi.log

Références:

http://docs.oracle.com/cd/E11882_01/server.112/e10575/tdpsg_securing_data.htm#CHDCGGBH
http://www.oracle.com/technetwork/database/focus-areas/security/twp-transparent-data-encryption-bes-130696.pdf
http://docs.oracle.com/cd/B28359_01/network.111/b28530/asotrans.htm
http://docs.oracle.com/cd/B19306_01/network.102/b14268/asotrans.htm
http://docs.oracle.com/cd/B28359_01/appdev.111/b28393/adlob_smart.htm#BABDIEGE
http://oracleflash.com/26/Oracle-10g-Transparent-Data-Encryption-examples.html

lundi 22 août 2011

SYSAUX tablespace grows because of statistics retention

I've noticed that on some of my databases, the SYSAUX tablespace kept on growing to unreasonable proportions.

The following objects would grow to several gigabytes in size .
   
SYS    WRI$_OPTSTAT_HISTGRM_HISTORY    TABLE
SYS    WRI$_OPTSTAT_HISTHEAD_HISTORY    TABLE
SYS    WRI$_OPTSTAT_IND_HISTORY    TABLE
SYS    I_WRI$_OPTSTAT_H_OBJ#_ICOL#_ST    INDEX
SYS    I_WRI$_OPTSTAT_H_ST        INDEX



This is due to the retention of system statistics by Oracle (default 1 month).


SQL> select dbms_stats.get_stats_history_retention present_retention from dual;

PRESENT_RETENTION
-----------------
               31


It is possible to modify the retention period through the dbms_stats package.

SQL> exec DBMS_STATS.ALTER_STATS_HISTORY_RETENTION(7);

PL/SQL procedure successfully completed.


SQL>  select dbms_stats.get_stats_history_retention present_retention from dual;

PRESENT_RETENTION
-----------------
                7


It is also possible to purge the statistics history, through the use of the same package.


exec DBMS_STATS.PURGE_STATS(SYSDATE-7);


Beware, the process can be quite long (several hours), and undo tablespace-consuming.
Be sure you dispose of enough diskspace to accomodate the resulting rollback segment and archivelog creation, and be prepared to delete archivelogs through RMAN.

Leave me a note if this post has been useful to you.

Happy computing

Nixman.

mercredi 16 février 2011

Cabinet architecte paysagiste

Urbicus est un cabinet d'architectes paysagistes basé à Versailles.

mardi 21 septembre 2010

Purge des logs sous adrci

La nouvelle interface de gestion des logs Oracle permet de faciliter la gestion des logs.

Par contre, au vu de la quantité de logs générées par Oracle 11gR2, il est important de mettre en place une politique de purge efficace.

Purge automatique des logs sous adrci:

/!\ L'âge des logs est exprimée en heures
Par défaut, les logs sont purgés tous les mois pour les logs à vie courte (720 heures) et tous les ans pour les logs à vie longue (8760 heures).
Nous allons baisser ces valeurs à 7 et 30 jours (168 et 720 heures).

adrci> show home
ADR Homes:
diag/tnslsnr/srv_1/listener
diag/tnslsnr/srv_1/listener_scan1
diag/asm/+asm/+ASM1

adrci> set home diag/tnslsnr/srv_1/listener
adrci> show control

ADR Home = /u01/app/grid/diag/tnslsnr/srv_1/listener:
*************************************************************************
ADRID SHORTP_POLICY LONGP_POLICY LAST_MOD_TIME LAST_AUTOPRG_TIME LAST_MANUPRG_TIME ADRDIR_VERSION ADRSCHM_VERSION ADRSCHMV_SUMMARY ADRALERT_VERSION CREATE_TIME
-------------------- -------------------- -------------------- ---------------------------------------- ---------------------------------------- ---------------------------------------- -------------------- -------------------- -------------------- -------------------- ----------------------------------------
3936991633 720 8760 2010-01-18 18:23:33.022104 +01:00 2010-09-21 11:59:19.401387 +02:00 1 2 76 1 2010-01-18 18:23:33.022104 +01:00
1 rows fetched


adrci> set control (SHORTP_POLICY=168)
adrci> set control (LONGP_POLICY=720)
adrci> show control

ADR Home = /u01/app/grid/diag/tnslsnr/srv_1/listener:
*************************************************************************
ADRID SHORTP_POLICY LONGP_POLICY LAST_MOD_TIME LAST_AUTOPRG_TIME LAST_MANUPRG_TIME ADRDIR_VERSION ADRSCHM_VERSION ADRSCHMV_SUMMARY ADRALERT_VERSION CREATE_TIME
-------------------- -------------------- -------------------- ---------------------------------------- ---------------------------------------- ---------------------------------------- -------------------- -------------------- -------------------- -------------------- ----------------------------------------
3936991633 168 720 2010-09-21 12:05:06.248617 +02:00 2010-09-21 11:59:19.401387 +02:00 1 2 76 1 2010-01-18 18:23:33.022104 +01:00
1 rows fetched

Réaliser la même modification pour les autres homes

adrci> set home diag/tnslsnr/srv_1/listener_scan1
adrci> set control (SHORTP_POLICY=168)
adrci> set control (LONGP_POLICY=720)

adrci> set home diag/asm/+asm/+ASM1
adrci> set control (SHORTP_POLICY=168)
adrci> set control (LONGP_POLICY=720)

Purge manuelle des logs sous adrci:

/!\ Cette fois-ci, l'âge des logs est exprimée en minutes

adrci> show home
ADR Homes:
diag/tnslsnr/srv_1/listener
diag/tnslsnr/srv_1/listener_scan1
diag/asm/+asm/+ASM1

adrci> set home diag/tnslsnr/srv_1/listener
adrci> purge -age 5400

mercredi 25 août 2010

A handy command to monitor Linux multipath

Works on: Red Hat 5.3 with Qlogic fiber channel cards

Monitoring failing paths on a fibre channel card connected to a SAN on Linux isn't very straightforward

A handy command to check it in real time would be this one:

watch -n 1 "echo show paths | multipathd -k "

The output would look something like this:

multipathd> hcil    dev  dev_t  pri dm_st   chk_st   next_check

[...]
1:0:3:3 sdam 66:96  50  [failed][faulty] XX........ 4/20
1:0:3:4 sdan 66:112 50  [failed][faulty] XX........ 4/20
0:0:0:0 sda  8:0    50  [active][ready]  XXXXXXXX.. 17/20
0:0:0:1 sdb  8:16   10  [active][ready]  XXXXXXXX.. 17/20
0:0:0:2 sdc  8:32   50  [active][ready]  XXXXXXXX.. 17/20

[...]

Here, controller 1 is failing, resulting in 4 failed paths out of 8.

"4/20" and "17/20" being the number of secons left till the next check

Leave me a note if this post has been useful to you

Happy computing

Nixman

jeudi 8 avril 2010

Multiplexer les redo logs Oracle sous ASM

SQL> select group#, member from v$logfile;

    GROUP# MEMBER
---------- --------------------------------------------------
         1 +FRA/MYDB/onlinelog/group_1.257.715620719
         2 +FRA/MYDB/onlinelog/group_2.258.715620719
         3 +FRA/MYDB/onlinelog/group_3.259.715620719

SQL>  select group#, status, bytes/1024  from v$log;

    GROUP# STATUS           BYTES/1024
---------- ---------------- ----------
         1 ACTIVE                51200
         2 CURRENT               51200
         3 ACTIVE                51200


SQL> alter system switch logfile;
SQL> alter system switch logfile;
SQL> alter system switch logfile;


SQL> alter system checkpoint global;


SQL>  select group#, status from v$log;

    GROUP# STATUS
---------- ----------------
         1 CURRENT
         2 INACTIVE
         3 INACTIVE


Prendre un des groupes en état INACTIVE et le supprimer, puis le recréer avec deux membres.

Dans cet exemple, on suppose que l'instance est en mode OMF.

SQL> alter database drop logfile group 3;
(si le groupe 3 est en état INACTIVE)

SQL> select group#, status, bytes/1024  from v$log;

    GROUP# STATUS           BYTES/1024
---------- ---------------- ----------
         1 CURRENT               51200
         2 INACTIVE              51200

SQL> alter database add logfile group 3 ('+DATA','+FRA') size 51200K;

SQL> alter system switch logfile;

On vérifie que le groupe 3 possède désormais deux membres

SQL> select group#, status, members, bytes/1024  from v$log;

    GROUP# STATUS              MEMBERS BYTES/1024
---------- ---------------- ---------- ----------
         1 ACTIVE                    1      51200
         2 INACTIVE                  1      51200
         3 CURRENT                   2      51200


SQL> select group#, member from v$logfile order by 1

    GROUP# MEMBER
---------- --------------------------------------------------
         1 +FRA/MYDB/onlinelog/group_1.257.715710709
         1 +DATA/MYDB/onlinelog/group_1.285.715710709
         2 +FRA/MYDB/onlinelog/group_2.258.715710073
         2 +DATA/MYDB/onlinelog/group_2.284.715710073
         3 +FRA/MYDB/onlinelog/group_3.259.715709881
         3 +DATA/MYDB/onlinelog/group_3.282.715709881

Et faire ainsi de suite pour les trois groupes... Ici, on peut dropper et recréer le groupe 2 car il est inactif

Attention à ne pas dropper les trois groupes de logs en même temps ou de dropper un logfile group actif!


N'hésitez pas à un message si cet article vous a été utile.

Nixman

mercredi 7 avril 2010

Multiplexing an Oracle controlfile in ASM


1) Check current controlfile's name and restart the database NOMOUNT

SQL> show parameter control_files

NAME                                 TYPE        VALUE
------------------------------------ ----------- -----------------------------------------------
control_files                        string      +FRA/MYDB/controlfile/current.256.715620719


SQL> shutdown immediate

SQL> startup nomount


2) Copy/restore current controlfile through RMAN

$ rman target /

RMAN> restore controlfile to '+DATA' from '+FRA/MYDB/controlfile/current.256.715620719';

Starting restore at 07-APR-10
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=272 device type=DISK

channel ORA_DISK_1: copied control file copy
Finished restore at 07-APR-10

3) Find out the name of the new controlfile through asmcmd

ASMCMD> ls -lsa +DATA/MYDB/controlfile

Type         Redund  Striped  Time             Sys  Block_Size  Blocks    Bytes     Space  Name
CONTROLFILE  UNPROT  FINE     APR 07 14:00:00  Y         16384     595  9748480  16777216  none => current.283.715704921


4) Modify your spfile to take into account the new controlfile

SQL> alter system set control_files='+DATA/MYDB/controlfiles/current.283.715704921','+FRA/MYDB/controlfile/current.256.715620719' scope=spfile;


5) Restart the database and check

SQL> shutdown immediate

SQL> startup

SQL> show parameter control_files;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_files                        string      +DATA/MYDB/controlfiles/cu
                                                 rrent.283.715704921, +FRA/mmtw
                                                 ebdv/controlfile/current.256.7
                                                 15620719



Leave me a line if this note has been useful to you.

Happy computing


Nixman

- page 1 de 3