lunedì 30 marzo 2009

Cartello sul ponte di Saint-Ludovic, Mentone




Il cartello raffigurato nella foto era esposto, fino a qualche mese fa, sul ponte Saint-Ludovic, situato tra la dogana francese e quella italiana, presso Mentone, Costa Azzurra. Diceva che proprio lì, sul confine, si era fermata – secondo le autorità francesi – «la nube radioattiva dell’incidente nucleare di Chernobyl». Proprio alla frontiera con la Francia nuclearista di Mitterand..

sabato 28 marzo 2009

Paolo e Francesca

Amor, ch'al cor gentil ratto s'apprende
prese costui de la bella persona
che mi fu tolta; e 'l modo ancor m'offende.

Amor, ch'a nullo amato amar perdona,
mi prese del costui piacer sì forte,
che, come vedi, ancor non m'abbandona.

Amor condusse noi ad una morte:
Caina attende chi a vita ci spense! ...

(Divina commedia, V canto dell’Inferno)

martedì 24 marzo 2009

Energia dalle alghe !


http://www.matternetwork.com/2008/3/solenas-plasma-powered-biomass-blaster.cfm

Ldapsearch (linux)


Query per cercare in un directory LDAP NDS i volumi su tutti i servers:


ad es:

bind (anonymous)

ldapsearch -x -h 10.1.0.50 "(objectClass=volume)" cn | grep "cn:" | grep USR2

bind (non anonimo)

ldapsearch -D "cn=user,ou=adm,o=rete" -w "pas\$word" -x -h 10.1.0.50 "(objectClass=volume)" cn | grep "cn:" | grep USR3

giovedì 19 marzo 2009

Energia nel mondo


Energia elettrica mondiale prodotta per fonte in TW:



2007
2004
1994







Hydraulic 3145,50 15,87 2853,8 16,41 2426,2 18,91
Nucleare 2735,4 13,8 2752,2 15,83 2241,8 17,47
Fossile 13442,4 67,81 11438,1 65,79 7998,4 62,33
Altre 501,5 2,53 342,6 1,97 166,4 1,3







Totale 19824,8 100 17386,7 100 12832,8 100


Ripartizione energia prodotta ed energia elettrica prototta per sorgente:



Percentuale di energia totale usata per i trasporti (95 % da petrolio):



Ripartizione dell'energia usata per i trasporti per sorgente:

(il 95% è appunto derivata da petrolio)


sabato 14 marzo 2009

Trote in carpione

Ingredienti:
- 5/6 trote
- farina bianca
- salvia
- rosmarino
- vino bianco
- aceto
- aceto balsamico
- cipolle q.b.
- olio d'oliva
- burro
- sale

Impanare le trote nella farina e passarle in padella con burro, un pò d'olio d'oliva, salvia e rosmarino. Togliere le trote e nel fondo di cottura aggiungere le cipolle e farle rosolare. Quando le cipolle saranno rosolate aggiungere circa 3 bicchieri di vino bianco,1 e 1/2 di aceto e opzionalmente un bicchierino (da liquore) di aceto balsamico. Portare a ebolizione. Versare il tutto sulle trote. Dopo una giornata le trote avranno preso piu' sapore.

martedì 10 marzo 2009

sostituisci stringa in più FILES (LINUX)

Comando utile x cambiare una stringa in più files, in una volta sola:


find . -name * -exec sed -i.bak s/pippo/"'"'pippo$pluto'"'"/g {} ';'

Pasta alla genovese

- Kg 2 cipolle
- 800 gr. Spezzatino di manzo
- una carota
- una costa di sedano
- due bicchieri vino bianco
- un bicchiere di olio extravergine di oliva
- sale
- pepe

affettate a velo le cipolle, (piangerete per un pò ma ne varrà la pena), mettetele in una pentola con la carne, l'olio, la carota e il sedano tagliati a cubetti, coprite, e fate cuocere per un'oretta a fuoco vivace – le cipolle dovranno diventare trasparenti e dovrà evaporare tutto il liquido, solo quando la cipolle saranno abbastanza asciutte versate il primo bicchiere di vino bianco, questa volta a fuoco bassissimo, e fate cuocere per circa altri 40 minuti.
Versare l'altro bicchiere di vino, il sale e il pepe, e ripetere l'operazione precedente facendo ben attenzione a non far attaccare il sugo alla pentola!
Condire con questo sugo una pasta corta che tiene bene la cottura, tipo dei rigatoni e con una semplice insalatina e la carne è pronto anche un buon secondo!

-----------------------

(versione FEDE)

Mettere in un tegame:
- olio
- carne (involtini o carne a pezzi)
- 1 spicchio d'aglio
- 1 foglia di alloro
- un po di prezzemolo
- 5/6 cipolle tagliate sottilmente
- un po d'acqua

Fai cuocere COPERTO a fuoco dapprima vivace poi modesto finche tutta l'acqua non si consuma (le cipolle lasciano la loro). Piu o meno mezz'ora..
Quindi togliere il coperchio e aggiungere sale 1/2 bicchiere di vino bianco un altro po d'acqua.
Fai cuocere scoperto a fuoco vivace finche il vino non evapora. (le cipolle devono essere quasi disfatte).

Oracle in Single User Mode

You may use the RESTRICTED SESSION system privilege to switch the database in single user mode for migrations.

RESTRICTED SESSION - Specifies whether logon to Oracle is restricted

ENABLE - Allows only users with RESTRICTED SESSION system privilege to log on to Oracle. Existing sessions are not terminated.

DISABLE - Reverses the effect of the ENABLE RESTRICTED SESSION clause, allowing all users with CREATE SESSION system privilege to log on to Oracle. This is the default.

You can use this clause regardless of whether your instance has the database dismounted or mounted, open or closed.

In a first step (before the migration), you shutdown the database an start it again to be sure that all users are disconnected. Now revoke the RESTRICTED SESSION system privilege from most users, this system privilege is normally not used.

$ svrmgrl
svrmgr> CONNECT SYS AS sysdba;
svrmgr> SHUTDOWN IMMEDIATE;
svrmgr> STARTUP;
svrmgr> SPOOL revoke_restricted_session;
svrmgr> SELECT 'REVOKE restricted session FROM '
username ';' FROM dba_users
WHERE username NOT IN ('SYS','SYSTEM');
svrmgr> SPOOL OFF;
svrmgr> @revoke_restricted_session.log;
svrmgr> ALTER SYSTEM ENABLE RESTRICTED SESSION;

As user SYS you can now perform the migration. If an ordinary user tries to connect, he will get the following error messge:

sqlplus scott/tiger

ERROR: ORA-01035: ORACLE only available to users
with RESTRICTED SESSION privilege

After the migration to not to forget, to disable the RESTRICTED SESSION system privilege

svrmgr> ALTER SYSTEM DISABLE RESTRICTED SESSION;

IIS 6.0 (w2003) disabilitare il bind su tutti gli IP

When you start Internet Information Services (IIS) 6.0 on Microsoft Windows Server 2003, IIS binds to all IP addresses on the server, not just the IP addresses that are assigned to Web sites. This may be true even though you have set the metabase property DisableSocketPooling to True.

To successfully allow applications to use the same port on different IP addresses, you must use a new utility, Httpcfg.exe. Httpcfg.exe is located on the Windows Server 2003 CD in the Support\Tools directory as part of the Support.cab file.

To install Microsoft Windows support tools
1.        Insert the Windows Server 2003 CD in the CD-ROM or DVD-ROM drive.
2.        When the CD opens, click Perform Additional Tasks.
3.        Click Browse this CD.
4.        Double-click Support.
5.        Double-click Tools.
6.        Double-click SUPTOOLS.MSI.
7.        Click Next, type your information in the Name and Organization boxes, click Next, and then click Next on the following screen.
8.        Click Next again to start the installation.
9.        Click Finish.

To add an IP address to the IP inclusion list
1.        Click Start, and then click Run.
2.        Type cmd, and then click OK to open a command prompt.
3.        Type the following, where xxx.xxx.x.x is the IP address you want to add:
httpcfg set iplisten -i xxx.xxx.x.x
When this succeeds, Httpcfg returns the following:
HttpSetServiceConfiguration completed with 0

To view additional status codes, see the Httpcfg help.

4.        After the IP address is added, use the following command to list it:
httpcfg query iplisten
Httpcfg returns the following:
IP :xxx.xxx.x.x


5.        From the command prompt, stop the HTTP service and its dependent services. To do this, type the following string at the command prompt:
net stop http /y
6.        From the command prompt, restart the HTTP service and it dependent services. To do this, type the following string at the command prompt:
net start w3svc


oppure:

net stop http
net start http
iisreset

OTTIMIZZARE I FILE HIVE (REGISTRY) e ripartire dal blocco del BOOT (W2000)

ERRORE WINDOWS AL BOOT: Windows could not start because the following file is missing or corrupt: \WINDOWS\SYSTEM32\CONFIG\SYSTEM


windows 2000 ha un bug, per cui dopo numerose connessioni RDP, riempie il registry fino a farlo scoppiare. E il server non parte più !

Io ho agito così. Tramite un CD di Linux (System Rescue CD) ho copiato la hive incriminata, su un'altro pc funzionante.

Con REGEDIT ho caricato la HIVE sotto un nuovo ramo del registry (nome a caso).

usando NTREGOPTIMIZER (http://www.larshederer.homepage.t-online.de/erunt/) ho ricompresso e ottimizzato la HIVE

Ho rimesso la HIVE al posto giusto è ho fatto ripartire il server.

Il registro si riempie all'inverosimile e dopo un pò il bug si ripresenta, quindi c'è da cancellare il ramo pesante del registry.

Per trovare qual'era il ramo così pesante ho usato il seguente programma: DUREG.EXE di Microsoft (Disk usage registry Estimator).


lunedì 9 marzo 2009

cambiare hostname e IP a ORACLE

e vivere felici .....

Come cambiare nome host e indirizzo IP a ORACLE e vivere felici (testato con Oracle 10ir2).

1) Per cambiare l'indirizzo IP, di solito basta modificare i files del LISTNER:

Listener.ora e TnsNames.ora

può essere un'idea anche modificare il file host, in modo che il LISTENER non dipenda della risoluzione DNS.

2) Per cambiare il nome host, bisogna disinstallare la Enterprise Management Console prima di cambiare nome host

emca -deconfig dbcontrol db -repos drop

cancellare il servizio, se esiste ancora (ad esempio con regedit)

cambiare nome host,

fare reboot

e poi reinstallare la console:

in modo testo:

emca -config dbcontrol db -repos create


oppure (meglio)

usando la console grafica:

Assistente alla configurazione del database

Con la release R2 di Oracle 10i la Enterprise Management Console passa in HTTPS sulla porta: 5500, prima era in HTTP sulla porta 1158.


vedere anche questo link:

http://weblogs.asp.net/skillet/archive/2007/04/03/how-to-change-windows-hostname-and-keep-oracle-10g-running.aspx

ps (Linux)

Bel commandino per Linux:

Lista dei processi attivi stampando solo il pid, l'uso della cpu, il nome del processo e la virtual memory size, ordinati per uso del processore e vsize il tutto limitato a 6 righe !

ps arxo pid,pcpu,comm,vsize --sort -pcpu,-vsize | head -n 6 -

snapshot della partizione C: con windows attivo !!!

Ecco un bel programmino, praticamente GRATIS, che permette di fare un backup della partizione di windows con windows avviato.

Drive SnapShot 1.3


http://www.drivesnapshot.de/en/

Brasato al Barolo

(di Marco Bassino)

Ingredienti
1 Kg sottofiletto di manzo
50 grammi pancetta
50 grammi burro
2 foglie alloro
2 spicchi aglio
Farina – brodo – sale

Ingredienti per la marinata
1 Bottiglia vino Barolo
2 cipolle
2 carote
2 coste sedano
2 chiodi garofano
noce moscata

Incidete la carne con la punta di un coltello e introducete dei pezzetti di pancetta e aglio, sfregate la carne con il sale, mettetela in una casseruola insieme al trito delle cipolle, carote, sedano, spezie ed aggiungete il Barolo, lasciate il tutto in infusione 12/24 ore.Trascorso il tempo della marinatura, togliete la carne, infarinatela e fatela dorare in un’altra casseruola.Una volta che la carne sarà ben dorata, aggiungete la marinata,coprite e cuocete a fuoco basso per circa tre ore.Per servire,cospargete le fette di carne con il sugo di cottura passato al setaccio.

windows share alias

Come sbloccare Windows (2003) in modo che le share possano rispondere anche a nomi DNS diversi dal "nome computer" (hostname):

Adding these registry entries on server01 should get you one step closer to
having DNS aliases working. The step I'm currently at.


[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters]
"DisableStrictNameChecking"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa]
"DisableLoopbackCheck"=dword:00000001

ORACLE import,export, tablespaces e gestione utenti

Sblocco di un utente looked:

da sqlplus /nolog
connect sys as sysdba
password: ....

alter user xxxx account unlock;

export da prompt dos:

exp system/xxxx file=protocollo.dmp log=protocollo.log owner=PROTOCOLLO, PROTOCOLLO0, DOCNOPROTO statistics=none consistent=Y buffer=4000000

cancellazione users come utente system o sys di db:

drop user protocollo cascade;
drop user protocollo0 cascade;
drop user prototest cascade;
drop user docnoproto cascade;

resize dei datafiles come utente system o sys di db:

alter database datafile 'D:\ORADATA\ORCL\DOCNOPROTO.DBF' resize 2000M;
alter database datafile 'D:\ORADATA\ORCL\PROTO_I_01.DBF' resize 1M;
alter database datafile 'D:\ORADATA\ORCL\PROTO0_D_01.DBF' resize 10M;
alter database datafile 'D:\ORADATA\ORCL\PROTO0_D_02.DBF' resize 10M;
alter database datafile 'D:\ORADATA\ORCL\PROTO0_D_03.DBF' resize 10M;
alter database datafile 'D:\ORADATA\ORCL\PROTO0_D_04.DBF' resize 10M;
alter database datafile 'D:\ORADATA\ORCL\PROTO0_D_05.DBF' resize 10M;
alter database datafile 'D:\ORADATA\ORCL\PROTO0_D_06.DBF' resize 10M;
alter database datafile 'D:\ORADATA\ORCL\PROTO0_D_07.DBF' resize 10M;
alter database datafile 'D:\ORADATA\ORCL\PROTO0_D_08.DBF' resize 10M;
alter database datafile 'D:\ORADATA\ORCL\PROTO0_D_09.DBF' resize 10M;
alter database datafile 'D:\ORADATA\ORCL\PROTO0_D_10.DBF' resize 10M;
alter database datafile 'D:\ORADATA\ORCL\PROTO0_D_11.DBF' resize 10M;
alter database datafile 'D:\ORADATA\ORCL\PROTO0_D_12.DBF' resize 10M;
alter database datafile 'D:\ORADATA\ORCL\PROTO0_D_13.DBF' resize 10M;
alter database datafile 'D:\ORADATA\ORCL\PROTO0_D_14.DBF' resize 10M;
alter database datafile 'D:\ORADATA\ORCL\PROTO0_D_15.DBF' resize 10M;
alter database datafile 'D:\ORADATA\ORCL\PROTO0_D_16.DBF' resize 10M;
alter database datafile 'D:\ORADATA\ORCL\PROTO_D_01.DBF' resize 2000M;
alter database datafile 'D:\ORADATA\ORCL\PROTO_D_02.DBF' resize 2000M;
alter database datafile 'D:\ORADATA\ORCL\PROTO_D_03.DBF' resize 2000M;
alter database datafile 'D:\ORADATA\ORCL\PROTO_D_04.DBF' resize 2000M;
alter database datafile 'D:\ORADATA\ORCL\PROTO_D_05.DBF' resize 2000M;
alter database datafile 'D:\ORADATA\ORCL\PROTO_D_06.DBF' resize 2000M;
alter database datafile 'D:\ORADATA\ORCL\PROTO_D_07.DBF' resize 2000M;
alter database datafile 'D:\ORADATA\ORCL\PROTO_D_08.DBF' resize 2000M;
alter database datafile 'D:\ORADATA\ORCL\PROTO_D_09.DBF' resize 2000M;
alter database datafile 'D:\ORADATA\ORCL\PROTO_D_10.DBF' resize 3000M;

creazione degli users come utente system o sys di db:

create user PROTOCOLLO identified by PASSWORD default tablespace PROTO_D quota unlimited on PROTO_d quota unlimited on PROTO_I;
create user PROTOCOLLO0 identified by PASSWORD0 default tablespace PROTO0_D quota unlimited on PROTO0_d;
create user DOCNOPROTO identified by PASSWORD default tablespace DOCNOPROTO quota unlimited on DOCNOPROTO;

import da prompt dos:

imp system/xxxx file=protocollo.dmp log=protocollo.implog fromuser=PROTOCOLLO, PROTOCOLLO0, DOCNOPROTO touser=PROTOCOLLO, PROTOCOLLO0, DOCNOPROTO ignore=Y buffer=4000000

import di solo alcune tabelle:

imp system/xxxx file=protocollo.dmp log=protocollo.implog fromuser=PROTOCOLLO0 touser=PROTOCOLLO0 tables=up0_blob0 ignore=Y buffer=4000000


vedere tutti gli utenti importati:

select * from all_users;

ricompilare un vista che ha dato errore imp-00041 durante l'import (per problemi di dipendenze):

alter view "PROTOCOLLO"."UP0_VIEW_STATISTICHE_TIF" compile;

per provare la vista, ad es.:

select count(*) from "PROTOCOLLO"."UP0_VIEW_STATISTICHE_TIF";


Per cambiare la password di un user occorre utilizzare il comando:


alter user segretario identified by newpassword;


Come rinominare un datafile di una tablespace temporanea:

shutdown; (aspetta che nessun utente sia loggato)
o meglio:

shutdown immediate;

linux> mv 'OLDFILE.DBF ' 'NEWFILE.DBF'

sqlplus: startup mount;

sqlplus: ALTER DATABASE

RENAME file
'/u01/app/oracle/mysid/oldname.dbf'
TO
'/u01/app/oracle/mysid/newname.dbf'

shutdown immediate;

startup;

vedi anche: http://www.dba-oracle.com/t_rename_data_file.htm


vedere tutte le tabelle dell'utente con cui si è collegati:

select table_name from user_tables where rownum<=10; (x limitare la ricerca)


vedere lo spazio utilizzato su disco in tutte le tabelle di uno user:


select table_name, avg_row_len*num_rows/1024/1024 as Mbytes
from user_tables;

vedere lo spazio utilizzato su disco delle tabelle più grosse di uno user:

select table_name, avg_row_len*num_rows/1024/1024 as Mbytes
from user_tables where
avg_row_len*num_rows/1024/1024>=10 ;

Dare i privilegi di CONNECT a uno user:

GRANT "CONNECT" TO "PROTOCOLLO0";



-------------------------------------------

Bel sito, con vari script per ORACLE:

http://www.orafaq.com/wiki/Scripts#Space_Management_Scripts

Altro Link utile:

http://www.harmanresearch.com/oracle/#ShowAllDatafilesForTablespaceAndOracleStuff

-------------------------------------------------------------------------------------------

PROCEDURA PER SBLOCCO LOGIN CLIENT

UPDATE UP0_U
SET PASSWORD = ''; /* vedi mail */
WHERE UTENTE = ‘PROTOCOLLO’;
UPDATE UP0_U
SET PASSWORD = ''; /* vedi mail */
WHERE UTENTE = ‘PROTOCOLLO0’;

COMMIT;