lunedì 20 novembre 2006

Export di un database da MySql 5

Dalla dyrectory /bin di Mysql:
mysqldump --opt -u user --password="password" --compatible=name nome_database > nomedump.sql

Se il dump deve essere importato in un dbms diverso da MySql va aggiunta una opzione che riguarda la compatibilità (--compatible)
che può assumere il valore: ansi, mysql323, mysql40, postgresql, oracle, mssql, db2, maxdb, no_key_options, no_table_options, or no_field_options

L'opzione --opt incorpora varie opzioni per il lock della tabella durante la export ed altri accorgimenti sulla gestione errori e sull'integrità.

Il file di export può essere importato su un altro database molto comodamente eseguendo il comando

mysql -e "source nomedump.sql" nome_database 

Un saluto a fox

giovedì 16 novembre 2006

install.log non trovato quando si disistalla un programma

Una soluzione alproblema è qui:

http://www.thinkdigit.com/forum/archive/index.php/t-11563.html

che riporto.

You may have noticed a problem when uninstalling some programs, if you have Ntfs in XP, you are likely to face this problem. When you try to uninstall 'em from Add/Remove Programs List, they show a message "Could not Open Install.Log File!". This problem is generally seen with "Wise Installation Wizard". I have seen it only with "Wise Installation Wizard". I don't know if other installers give rise to same problem.

When you try to uninstall 'em from
Start Menu>>Programs>>%ProgramName%>>Uninstall
It again gives the same error.

This can be solved and the program can be uninstalled without having to remove the directory, shortcuts and registry entries manually, which is really difficult and tiresome. I have found a solution to this problem and sharing with you all.

Procedure:

1. Open the directory where the program is installed. (Eg. For System Mechanic 5, By default, it is C:\Program Files\iolo\System Mechanic 5, if you have installed XP on C:\)
2. You will see a file named "Install.log" in there.
3. Move (cut and paste somewhere else) the "install.log" to say desktop.
4. Now, double click the uninstaller (uninstall.exe or unwise.exe)
5. It will ask you to open the installation log. Locate to the "install.log" file on your desktop.
6. Now, uninstall will work fine and you can uninstall the program.

Statistiche Oracle 9i -->

BEGIN
dbms_stats.delete_schema_stats(OWNNAME=>'schemaname');
DBMS_STATS.GATHER_SCHEMA_STATS(OWNNAME=>'schemaname',estimate_percent=>5.5,cascade=>TRUE);
END;



Per grossi volumi di dati il valore di default di estimate_percent non è adatto!
Powered By Blogger