Kaya 的个人资料花开花落,云卷云舒照片日志列表 工具 帮助

日志


10月26日

Open Source and Oracle - gqlplus improvment for scripts execution

These days, my gqlplus has some problems when started.
 
[oracle@rac1 gqlplus-1.11]$ ./gqlplus
*** glibc detected *** free(): invalid pointer: 0x082804bc ***
Aborted
[oracle@rac1 gqlplus-1.11]$
 
A bad news! 
After debugging, I found that this is just a minor bug in gqlplus source code, it free a array point of two dimension, but this point has increased itself before freed in order to free its string member. After modified the code, gqlplus become normal again. This bug is related to SQLPATH environment variable. when this variable is set, error happened.
Also, I found that gqlplus is lack of completion for sql script names, which is just like the  completion for executable in shell enviroment. So some modification are taken by me too. This new version will support completion scripts name, when you press 'tab',  in multiple paths which is specified by SQLPATH environment variable.
 If you are using gqlplus and think this feature is useful, please drop me a notification. I can provide the patch for the current gqlplus-1.11.
 
10月24日

Open Source and Oracle -- DBA Scripts from Jeff Hunter

As I have said, sqlplus is simple but powerful, just like bash in Linux.
But everyone don't like to type a lot, so the DBA scripts, which is written by someone and shared by them, are a great help for the lazy people. And keep in mind, a good programer is a lazy one.
In order to use this scripts, firstly set the SQLPATH, let it point to the directories which contain the DBA scripts. Then in the sqlplus session, you can just type @the script's name, not the absolute path of it. This will save you a lot of time.
Below is a list of DBA scripts from Jeff Hunter, great thanks to Jeff!
SQL> @help
========================================
Automatic Storage Management
========================================
asm_alias.sql
asm_clients.sql
asm_diskgroups.sql
asm_disks.sql
asm_disks_perf.sql
asm_drop_files.sql
asm_files.sql
asm_files2.sql
asm_templates.sql
========================================
Create Object Examples
========================================
cr_clob.sql
cr_clob_8.sql
cr_dimension.sql
cr_index.sql
cr_index_organized_table.sql
cr_materialized_view.sql
cr_not_null_constraints.sql
cr_primary_foreign_key.sql
cr_profile_password_parameters.sql
cr_profile_resource_parameters.sql
cr_resource_plan_multi_resource_plan_9i.sql
cr_sequence.sql
cr_table.sql
cr_table_buffer_pools.sql
cr_tablespace.sql
cr_temporary_tables.sql
create_emp_dept_custom.sql
create_emp_dept_original.sql
create_user_tables.sql
========================================
Database Administration
========================================
dba_blocks_used_by_table.sql
dba_column_constraints.sql
dba_compare_schemas.sql
dba_controlfile_records.sql
dba_controlfiles.sql
dba_cr_init.sql
dba_db_growth.sql
dba_errors.sql
dba_file_space_usage.sql
dba_file_space_usage_7.sql
dba_file_use.sql
dba_file_use_7.sql
dba_files.sql
dba_files_all.sql
dba_free_space_frag.sql
dba_highwater_mark.sql
dba_index_fragmentation.sql
dba_index_schema_fragmentation_report.sql
dba_index_stats.sql
dba_invalid_objects.sql
dba_invalid_objects_summary.sql
dba_jobs.sql
dba_object_cache.sql
dba_object_search.sql
dba_object_summary.sql
dba_options.sql
dba_owner_to_tablespace.sql
dba_plsql_package_size.sql
dba_query_hidden_parameters.sql
dba_random_number.sql
dba_rebuild_indexes.sql
dba_recompile_invalid_objects.sql
dba_registry.sql
dba_related_child_tables.sql
dba_row_size.sql
dba_segment_summary.sql
dba_snapshot_database_10g.sql
dba_snapshot_database_8i.sql
dba_snapshot_database_9i.sql
dba_table_info.sql
dba_tables.sql
dba_tables_all.sql
dba_tables_user.sql
dba_tablespace_mapper.sql
dba_tablespace_to_owner.sql
dba_tablespaces.sql
dba_tablespaces_7.sql
dba_tablespaces_8i.sql
help.sql
========================================
Database Resource Manager
========================================
rsrc_plan_status_detail_9i.sql
rsrc_plan_status_summary_9i.sql
========================================
Locks
========================================
locks_blocking.sql
locks_dml_ddl.sql
========================================
Multi Threaded Server
========================================
mts_dispatcher_status.sql
mts_dispatcher_utilization.sql
mts_queue_information.sql
mts_shared_server_statistics.sql
mts_shared_server_utilization.sql
mts_user_connections.sql
========================================
Oracle Applications
========================================
erp_conc_manager_user_query.sql
========================================
Oracle Wait Interface
========================================
owi_event_names.sql
========================================
RMAN
========================================
rman_backup_pieces.sql
rman_backup_sets.sql
rman_backup_sets_8i.sql
rman_configuration.sql
rman_controlfiles.sql
rman_spfiles.sql
========================================
Real Application Clusters
========================================
rac_instances.sql
rac_locks_blocking.sql
rac_rollback_segments.sql
rac_rollback_users.sql
rac_sess_users.sql
rac_waiting_sessions.sql
========================================
Rollback Segments
========================================
rollback_contention.sql
rollback_segments.sql
rollback_users.sql
========================================
Security
========================================
sec_default_passwords.sql
sec_roles.sql
sec_users.sql
========================================
Session Management
========================================
sess_current_user_transactions.sql
sess_query_sql.sql
sess_uncommited_transactions.sql
sess_user_sessions.sql
sess_user_stats.sql
sess_user_trace_file_location.sql
sess_users.sql
sess_users_active.sql
sess_users_active_sql.sql
sess_users_by_cpu.sql
sess_users_by_cursors.sql
sess_users_by_io.sql
sess_users_by_memory.sql
sess_users_by_transactions.sql
sess_users_sql.sql
========================================
Statspack
========================================
sp_auto.sql
sp_auto_15.sql
sp_auto_30.sql
sp_auto_5.sql
sp_last_report.sql
sp_list.sql
sp_parameters.sql
sp_purge.sql
sp_purge_30_days_10g.sql
sp_purge_30_days_9i.sql
sp_purge_n_days_10g.sql
sp_purge_n_days_9i.sql
sp_snap.sql
sp_statspack_custom_pkg_10g.sql
sp_statspack_custom_pkg_9i.sql
sp_trunc.sql
========================================
Temporary Tablespace
========================================
temp_sort_segment.sql
temp_sort_users.sql
temp_status.sql
========================================
Tuning
========================================
perf_db_block_buffer_usage.sql
perf_explain_plan.sql
perf_file_io.sql
perf_file_io_7.sql
perf_file_io_efficiency.sql
perf_file_waits.sql
perf_hit_ratio_by_session.sql
perf_hit_ratio_system.sql
perf_log_switch_history_daily.sql
perf_log_switch_history_daily_7.sql
perf_log_switch_history_daily_all.sql
perf_lru_latch_contention.sql
perf_objects_without_statistics.sql
perf_performance_snapshot.sql
perf_redo_log_contention.sql
perf_sga_free_pool.sql
perf_sga_usage.sql
perf_shared_pool_memory.sql
perf_top_10_procedures.sql
perf_top_10_tables.sql
perf_top_sql_by_buffer_gets.sql
perf_top_sql_by_disk_reads.sql
========================================
Workspace Manager
========================================
wm_create_workspace.sql
wm_disable_versioning.sql
wm_enable_versioning.sql
wm_freeze_workspace.sql
wm_get_workspace.sql
wm_goto_workspace.sql
wm_merge_workspace.sql
wm_refresh_workspace.sql
wm_remove_workspace.sql
wm_unfreeze_workspace.sql
wm_workspaces.sql
download them from http://www.idevelopment.info/ .
 
 
 
10月10日

Open Source and Oracle -- gqlplus

The more I use sqlplus, the more I feel uncomfortable about the ugly interface of it. what I hope is an environment like bash shell, support history command, completion etc.
gqlplus, come into my eye then. A greate substitution tool for sqlplus,
 

gqlplus is a drop-in replacement for sqlplus, an Oracle SQL client, for UNIX and UNIX-like platforms. The difference between gqlplus and sqlplus is command-line editing and history, plus table-name and column-name completion. As you know if you have used sqlplus, it is notoriously difficult to correct typing errors and other mistakes in your SQL statements. sqlplus does give you ability to use external editor to edit a statement, but only the last statement you typed. gqlplus solves this problem by providing the familiar command-line editing and history as in tcsh or bash shells, and table/column-name completion, while otherwise retaining compatibility with sqlplus. Thus, no user training is needed - simply use gqlplus instead of sqlplus. In addition, configuration/installation is trivial: gqlplus is a single binary compiled executable (written in C), so all you need to do is download it and put it anywhere in your PATH. After that, you'll be ready to use it.

just from the http://gqlplus.sourceforge.net/

 

10月9日

假日

9.30晚踏上了开往南昌的火车,在连过道都挤满人的硬座车厢里挨到12点左右,终于忍不住阵阵困意,迷迷糊糊睡着了。清晨醒来,想去洗下脸,发现水龙头上面俨然坐了一位大侠,窝着头睡觉呢。。发誓以后不坐硬座了。。
南昌只是我的一个中转点而已,不过,做为一个革命圣地,却给我留下了深刻印象。在朋友家里呆了一晚,由于朋友是师大军乐团的负责人,10.1早晨也和他们一起到八一广场参加升旗仪式。各方代表聚集八一广场,学生,工人,农民,群众,部队,过客。五星红旗在国歌声中冉冉升起。师大军乐团出足了面子。最难以忘记的是八一广场的喷泉,那叫一个高啊,清晨的阵阵凉风,让远在10米以外的人都沐浴在阵阵水气之中。
10.3号参加了gf的姐姐的婚礼,终于深刻领会到穿婚纱的新娘是最漂亮的道理。婚礼在各个地方的习俗差别还真挺大,比较难以理解的是男方和女方是分开摆酒席的。嗯,闹洞房这一关,带着强烈的少儿不疑的色彩。
10.4号又在火车上度过,还好,买到了卧铺票。途径广州,逛了下商场,打的,横穿过我们可爱的华工校园,到天河客运站,在大巴上看完了两部老掉牙的电影,终于听到了熟悉的家乡话。
老爸老妈的情绪真是高涨,很大一部分原因我觉得不在于我,而在于我带回来的他们期待以久的新人。虽然我一再申明请以同学的礼遇相待,可惜老爸老妈还是一厢情愿的执行他们的行动。
回想一下,已经整整10个年头没在家里过中秋节了。变化虽然不大,还是让渐渐模糊的记忆猛地清晰了起来。而这边的风俗也让gf感觉到新鲜与好奇。所有人家把过中秋节的礼品集中摆过在一起,里面最漂亮的莫过于各式各样的花篮,对于食物来说,最主要的应该是水果,油甘,苹果,葡萄,柚子。。。而小孩大人们在旁边轻松自在着聊着天。这幅景象,对于生活在城市中的人们来说,也许是可望不可及了。
回家的另一收获在于大大慰劳了嘴巴,同时大大折磨了肠胃。中秋节当天还没感觉,10.7在回深圳的大巴上,已经是坐立不安,平常挺灵验的整肠丸既然一点效果都没有。我一度怀疑是否是食物中毒了,因为前一天刚吃过7成熟的蚌壳,前几天的新闻提到田螺中毒,怕怕。直到晚上从医院出来,呕吐,呕吐,才最终根治了肚子问题。发誓以后不能只爱嘴巴,不理肠胃了。
生活又将归于安静与忙碌当中。
Enjoy life!