准备工作:

  1.安装OCA。运行Developer的安装盘,选择自定义安装,选择Oracle Open Client Adapter for ODBC安装。

  2.在数据源(ODBC)中添加DSN。控制面板->管理工具->数据源(ODBC),选择“用户DSN”,添加要进行操作的Access的文件。在“高级”选项里,填上“登录名称”和“密码”(很重要,在程序中会用到)。

  下面以实际例子来说明:

  假设在Oracle中和Access中都有一个student表,表中字段相同(name char(10) ,age number(2)),在准备工作2中的“数据源名”为test,“登录名称”和“密码”都为user。

  下面为从Oracle导出到Access的procedure:

以下是引用片段:
  PROCEDURE oracle_to_access IS
  connection_id EXEC_SQL.ConnType;
  action_cursor EXEC_SQL.CursType;
  ignore PLS_INTEGER;
  t_name student.name%type;
  t_age student.age%type;
  cursor temp_cursor is select * from student;
  BEGIN
  connection_id:= EXEC_SQL.OPEN_CONNECTION(‘user/user@odbc:test‘);
  action_cursor := EXEC_SQL.OPEN_CURSOR(connection_id);
  EXEC_SQL.PARSE(connection_id, action_cursor,‘delete * from student‘);
  ignore := EXEC_SQL.EXECUTE(connection_id, action_cursor);
  EXEC_SQL.CLOSE_CURSOR(connection_id,action_cursor);
  open temp_cursor;
  export_count := 0;
  action_cursor := EXEC_SQL.OPEN_CURSOR(connection_id);
  EXEC_SQL.PARSE(connection_id, action_cursor,‘INSERT INTO student(name,age) values(:1,:2)‘);
  loop
  fetch temp_cursor into t_name,t_age;
  exit when temp_cursor%notfound;
  EXEC_SQL.BIND_VARIABLE(connection_id,action_cursor, ‘:1‘, t_name);
  EXEC_SQL.BIND_VARIABLE(connection_id,action_cursor, ‘:2‘, t_age);
  ignore := EXEC_SQL.EXECUTE(connection_id, action_cursor);
  end loop;
  close temp_cursor;
  EXEC_SQL.PARSE(connection_id, action_cursor,‘commit‘);
  ignore := EXEC_SQL.EXECUTE(connection_id,action_cursor);
  EXEC_SQL.CLOSE_CURSOR(connection_id,action_cursor);
  EXEC_SQL.CLOSE_CONNECTION(connection_id);
  EXCEPTION
  WHEN EXEC_SQL.PACKAGE_ERROR THEN
  IF EXEC_SQL.LAST_ERROR_CODE(connection_id) != 0 THEN
  message(‘数据导出至ACCESS失败: ‘ || TO_CHAR(EXEC_SQL.LAST_ERROR_CODE(connection_id)) || ‘: ‘ || EXEC_SQL.LAST_ERROR_MESG(connection_id));
  END IF;
  IF EXEC_SQL.IS_CONNECTED(connection_id) THEN
  IF EXEC_SQL.IS_OPEN(connection_id,action_cursor) THEN
  EXEC_SQL.CLOSE_CURSOR(connection_id,action_cursor);
  END IF;
  EXEC_SQL.CLOSE_CONNECTION(connection_id);
  END IF;
  END;
  下面为从Access导出到Oracles的procedure:
  PROCEDURE Access_to_oracle IS
  connection_id EXEC_SQL.ConnType;
  action_cursor EXEC_SQL.CursType;
  ignore PLS_INTEGER;
  t_name student.name%type;
  t_age student.age%type;
  BEGIN
  connection_id := EXEC_SQL.OPEN_CONNECTION(‘user/user@odbc:test‘);
  action_cursor := EXEC_SQL.OPEN_CURSOR(connection_id);
  delete from student;
  EXEC_SQL.PARSE(connection_id, action_cursor,‘select name,age from student‘);
  ignore := EXEC_SQL.EXECUTE(connection_id, action_cursor);
  exec_sql.define_column(connection_id,action_cursor,1,t_name,10);
  exec_sql.define_column(connection_id,action_cursor,2,t_age);
  ignore := EXEC_SQL.EXECUTE(connection_id, action_cursor);
  while(exec_sql.fetch_rows(connection_id,action_cursor)>0)
  loop
  exec_sql.column_value(connection_id,action_cursor,1,t_name);
  exec_sql.column_value(connection_id,action_cursor,2,t_age);
  insert into test(name,age) values(t_name,t_age);
  end loop;
  commit;
  EXEC_SQL.CLOSE_CURSOR(connection_id,action_cursor);
  EXEC_SQL.CLOSE_CONNECTION(connection_id);
  EXCEPTION
  WHEN EXEC_SQL.PACKAGE_ERROR THEN
  IF EXEC_SQL.LAST_ERROR_CODE(connection_id) != 0 THEN
  message(‘数据导入至ORACLE失败: ‘ || TO_CHAR(EXEC_SQL.LAST_ERROR_CODE(connection_id)) || ‘: ‘ || EXEC_SQL.LAST_ERROR_MESG(connection_id));
  END IF;
  IF EXEC_SQL.IS_CONNECTED(connection_id) THEN
  IF EXEC_SQL.IS_OPEN(connection_id,action_cursor) THEN
  EXEC_SQL.CLOSE_CURSOR(connection_id,action_cursor);
  END IF;
  EXEC_SQL.CLOSE_CONNECTION(connection_id);
  END IF;
  END;

  注意:EXEC_SQL.BIND_VARIABLE中绑定的变量只能是以下三种类型:NUMBER,DATE,VARCHAR2。对于Access中的“是/否”的布尔型变量,可以用NUMBER类型的1和0来表示。如果Access中的表名或者字段名中有空格,在写SQL语句的时候可以用双引号把表名或者字段名包括起来,如:本例中如果Access中表名为student detail,字段名分别为student name和student age,那插入数据的SQL语句为:insert into “student detail”(“student name”,”student age”) values(:1,:2).

现在网上充斥了各种各样的信息,上网的时候随随便便就很容易被这些信息所吸引。从而开始了在网上闲逛,忘记了原来上网的目的~时间,就这样流逝了……

所以我决定Do things on purpose,有目的的做事,而不要被网上的各种信息吸引,免得宝贵的时间就这样流逝掉。

今天好不容易腾出时间来仔细看看Blog,发现这个月的Blog数量是有史以来最少的,呵呵。忙!就一个字!

这几天在准备公司年会,顺便透露一下公司年会的情况吧,呵呵。

我们的年会呢,感觉是一年不如一年了。感觉最好的,还是04年在戴安娜红酒坊举行的那一次。饭菜也好,节目也非常精彩,游戏也很到位,当然最重要的是奖品也非常吸引人,呵呵。印象最深的是因为ZH马上就要结婚了,大家就排队敬他酒,结果队伍排的转弯!而且最后他还是一点酒都没有喝。真是经典中的经典啊!

今年的年会呢,BOSS不在KM,所以我们就放开玩啦!哈哈!地点是定在2月2日在怡景园举行,地址就在滇池路西贡码头附近。用餐呢就是自助餐啦,免得吃不饱引起争执,呵呵。因为距离比较远,所以我们安排了两辆大巴进行接送。这几天我们已经把会场、舞台等等都已经搞定了。包括舞台帖字等等都搞定了,还搞定了奖品!我就来说一说今年的奖品吧!

一等奖 2名 奖品: 组合音响一套
二等奖 4名 奖品: 美的电磁炉崔具一套
三等奖 8名 奖品: 森海塞耳HD201监听耳机一副

表演奖 若干 奖品: 待定
纪念奖 若干 奖品: 待定

怎样?奖品吸引人吧?呵呵。我呢……抽奖是绝对抽不到我的,这一点我是很有信心的。好东西都是从我手上经过,然后就到了别人手上了。:( 这可是有证据的!年会开到现在,已经开了三次了,这次是第四次了。三次当中,奖品无数,但是我都是什么都没有!唉…… 所以这次在买奖品的时候我就自己帮自己买了一个HD201,哈哈!

 

指定特定用户登录VNC:


The VNC server can be automatically started when the system boots via the vncserver service. However, before this service will work, some preparatory set up needs to be done.

First, edit the /etc/sysconfig/vncservers file to include the users you want to run VNC servers for. Add a line to that file as follows:

VNCSERVERS="N:user"

Where N is the number of the display you want the VNC server to run on and user is the username you want the server to run as. Multiple displays and users can be specified by placing a space between them, as follows:

VNCSERVERS="N:user1 Y:user2"

Note that if you are using the X Window System, display 0 cannot be used for VNC as it is already being used by X.

For each user you specify, a VNC password needs to be set. VNC passwords are completely separate from the normal system password for that account. A user can set their VNC password by executing the vncpasswd command. For example:

$ vncpasswd
Password:
Verify:

By default, VNC starts up only a simple window manager and a terminal window. If you would like to have the full Red Hat environment, create ~username/.vnc/xstartup and include the following lines:

#!/bin/bash
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc

Lastly, ensure that the resulting file has the execute bit set:

# chmod 755 ~username/.vnc/xstartup

In order to start the vncserver service immediately, run the following command:

# service vncserver start

For exmaple:

# service vncserver start
Starting VNC server: 1:user1 

In order for the vncserver service to start during the boot sequence, run the following command:

# chkconfig vncserver on

Note this command will simply return a command prompt. For example:

# chkconfig vncserver on
# chkconfig --list vncserver
vncserver       0:off   1:off   2:on    3:on    4:on    5:on    6:off

启动VNC Server控制Native X Server:

If you configure VNC to control the native X server of a system, you can interact with the console while sitting at the system or from any other system that can run a VNC viewer program. Be sure to do this initial VNC implementation during a maintenance window for your server in case VNC does not work correctly with your video card.

Warning: The following solution is not graceful and should be tested throughly before utilizing it on a production system.

To set up VNC to control the native X server, follow these steps:

  1. On the system you want to control with VNC, run the program vncpasswd as root to set a VNC password. You will use this password when connecting with vncviewer or another VNC remote control program.
  2. Edit the file /etc/X11/XF86Config to include the following commands. The XF86Config file is divided into parts that begin with the word Section and end with the word EndSection. You will need to add the following lines to the indicated section, making sure they come before the EndSection tag for that particular section.

    Red Hat Enterprise Linux 4 and above uses the XOrg implementation instead of XFree86. Edit the file /etc/X11/xorg.conf instead of XF86Config

    In the section called Module, add this line:

    Load "vnc"

    Make sure this is on a new line before EndSection.

    In section called Screen, add this line:

    Option "passwordFile" "/root/.vnc/passwd"

    Make sure this is on a new line before EndSection.

After you have rebooted your machine, VNC will load automatically each time you enter runlevel 5 (graphical mode). If you do not want to reboot now, you can make the changes active by logging out of graphical mode and pressing Ctrl+Alt+Backspace to restart the X server.

Because you are connecting to the root console, you do not have to type a number after the machine name or IP address when connecting to this computer with a VNC viewer.


让VNC走SSH:

To tunnel VNC connections over SSH, you must have a real system account on the machine running the VNC server. You must also know what display the VNC server is running on (which can be found in the /etc/sysconfig/vncservers file). Once you have these pieces of information, connect to the VNC server with the following SSH command:

ssh -L 590X:127.0.0.1:590X -N -f -l username servername

Replace the X‘s with the display number the VNC server is running on. For example, if the VNC server was running on display 1, you would specify 5901.

In your VNC client, instead of connecting directly to the VNC server, connect to "127.0.0.1:590X", again replacing X with the appropriate display number. This will tunnel the connection over SSH, providing greatly enhanced security.

超强网语十条,汗。。。
1.我身在江湖,江湖却没有关于我的传说……
2.千万别等到人人都说你丑时才发现自己真的丑;
3.走别人的路,让别人无路可走;
4.人,生在床上,死在床上,欲生欲死,也在床上;
5.树不要皮,必死无疑;人不要脸,天下无敌;
6.无所为而无所谓,无所谓而无所不为;
7.骚归骚,骚有骚的贞操;贱归贱,贱有贱的尊严。
8.人生的成功不在于拿到一副好牌,而是怎样将坏牌打好;
9.自从我变成了狗屎,就再也没有人踩在我头上了;
10、天使之所以会飞,是因为她们把自己看得很轻……

猫扑 http://www.mop.com
和讯 http://www.hexun.com
豆瓣网 http://www.douban.com
奇虎 http://www.qihoo.com
网易博客 http://blog.163.com
噢噢中国 http://www.oo.cn
百度贴吧 http://post.baidu.com
新浪博客 http://blog.sina.com.cn
网络秀 http://www.m149.com/
客齐集 http://www.kijiji.com.cn
VeryCD http://www.verycd.com/
Donews http://www.donews.com
天涯社区 http://www.tianya.cn
土豆网 http://www.toodou.com
大旗网(原ChinaBBS) http://www.daqi.com/
58同城分类 http://www.58.com/
周博通 http://www.potu.com
大众点评网 http://www.dianping.com
BlogCN http://www.blogcn.com
博客网 http://www.bokee.com
Zcom智通 http://www.zcom.com
fotoal http://www.fotoal.com/
fotolog http://www.fotolog.com.cn/
优友地带 http://www.uuzone.com
赛我网 http://www.cyworld.com.cn
YOK优客搜索 http://www.yok.com
My See http://www.mysee.com/
CSDN http://www.csdn.net
楚现会 http://www.appiir.com
feedsky http://www.feedsky.com
365Key http://www.365key.com/
摩网 http://www.moabc.com
菠萝网 http://www.podlook.com
影立驰 http://www.tvix.cn/
E都市 http://www.edushi.com/
银河台 http://www.radio.cn
邦邦网 http://www.81088.com
口碑网 http://www.koubei.com
Blogbus http://www.blogbus.com/
网库黄页 http://www.99114.com
xplus http://www.xplus.com.cn
看天下 http://www.kantianxia.com?
POCO http://www.poco.cn
CNCN城市平台 http://www.cncn.com/
聚网 http://www.365ju.com/
爆米花网 http://www.pomoho.com
快乐米 http://www.colorme.com.cn
qzone http://qzone.qq.com/
磊客中国 http://www.rox.com.cn/
职友集 http://www.jobui.com
亿友 http://www.yeeyoo.com/
联络家 http://www.linkist.com/
PPlive http://www2.pplive.com/
波普播客 http://www.imboke.com
天际网 http://www.tianji.com
拍客地带 http://www.fzone.cn
搜狐博客 http://blog.sohu.com/
Mapbar http://www.mapbar.com/
赶集 http://www.ganji.com/
又拍网 http://www.yupoo.com/
乐视网 http://www.le-tv.com
万蝶移动博客 http://www.pdx.cn
狗狗 http://www.gougou.com/
乐乐互动 http://www.lele.com/web/
3G门户网 http://www.3g.net.cn
Cblinkx TV www.cblinkx.tv
滚石音乐网 http://irock.cn/
粉丝网 http://www.ifensi.com
我要(51) http://www.51.com
易登网 http://www.edeng.cn
K68 http://www.k68.cn
中国播客网 http://www.vvlogger.com
那里网 http://www.naalee.com
Teein帖易中文聚合门户 http://www.teein.com
众评 http://report.7234.com/
酷客音乐网 http://www.koook.com
淘职网 www.go2work.com.cn??
鱼网 http://www.joyes.com
新聚网 http://www.tagriver.com
We@link http://www.wealink.com
网眼 http://www.webeye.net.cn
中国交友中心 http://www.96333.com?
博易 http://www.anyp.cn/
中国114黄页 http://www.114chn.com
TOM博客 http://blog.tom.com
圈网你我他 http://www.niwota.com
94pop流沙歌秀 http://www.94pop.com
本地通 http://www.bodoto.com
爬狗 http://www.pagou.com
歪酷博客 http://www.yculblog.com
天方有声图书 http://www.tingbook.com
中国博乐网 http://www.boloo.com
小蜜蜂 http://www.com.tv
播客宝典 http://www.hopesome.com
爱米网 http://www.aimi.cn
嘻哈哈 http://www.seehaha.com
人脉招聘网 http://www.rmzp.com
分类哥哥 http://www.fenleiGG.com
Komoo http://www.komoo.com
碰碰网 http://www.pengpeng.com

来源:http://report.internetdigital.org/

著名的HD DVD已被破解,据称Blue Ray DVD(蓝光DVD)使用的也是同样的算法,不久也会被破解出来。

这下可以把HD DVD拷贝到硬盘上看了,这是不是意味着HD/BlueRay DVD要开始流行了?呵呵

附件是好不容易找到的HD DVD的破解程序

 


 

Muslix64的俄罗斯黑客组织公开宣布,已经成功破译了高清晰DVD的保护代码,从而也为大规模盗版奠定了基础。

Muslix64破解程序发布原网页:http://forum.doom9.org/showthread.php?t=119871

 

附件:backuphddvd.zip(17964 Byte)

这几天,N多报刊都在做年终总结。我呢?也就在他们总结的里面再总结一下吧~ 😀

软件:

共享神盾 - 一个据说可以让电信端检测不到你在共享上网的软件
Vidalia
PowerShadow  - 影子系统,等同于还原卡的功能,只不过是全软的
GreenBrowser  - 从名字就可以得知,绿色浏览器。别看是绿色的,丝毫不迅速于IE、Firefox。另推荐:K-Meleon,开源的浏览器
AVG Anti-Virus Free - 免费的杀毒软件
IZArc - 压缩文件通吃,ZIP、RAR、ACE、7z、不在话下,包括Tar.gz都可以打开
FastStone Image Viewer  - 极速图片浏览器,有点当年ACDSEE 3.1的风范
WisMencoder - 视频编码转换器,RM – MPEG4 – QVGA – ………….
PC INSPECTOR File Recovery 文件恢复利器,不知道和Final Data比哪个厉害
foxit pdf reader – PDF Reader,比Acrobat Reader快许多
ProcessExplorer  - 进程管理器,比Windows的Task Manager强悍许多
IceSword - 检测木马的利器
TrueCrypt  - 文件夹加密工具(好像谁问过我)
System Repair Engineer  -  系统诊断工具

从这个网址可以探测到诸如Youtube的flv视频文件的地址:
www.kej.tw/flvretriever

硬件:

耳机:
三诺T-650 ¥75.00
OVC T25 ¥150.00

显卡:
华硕EN7600GS silent/HTD/256M ¥699.00

主板:
华硕K8N-VM ¥599.00
昂达N61GT ¥499.00

音箱:
漫步者R1200T ¥249.00

待续……

作为一个Linux管理员,防御病毒,间谍程序, rootkit等非常重要.
下面为你列举了10款Linux安全工具.