> git checkout -- .
Monday, September 24, 2012
Wednesday, September 12, 2012
Friday, August 31, 2012
Oracle views vs. materialized views
- Materialized views are disk based and updated periodically base upon the query definition.
- Views are virtual only and run the query definition each time they are accessed.
Thursday, August 23, 2012
Count rows in partition
SELECT table_name,
partition_name,
high_value,
num_rows
FROM all_tab_partitions
ORDER BY table_name, partition_name;
Monday, July 2, 2012
VirtualBox Guest additions upgrade: install_x11_startup_app: no script given
Here's what we get after trying to upgrade the Guest Additions from 4.1.12 to 4.1.14:
Installing the Window System drivers
Installing X.Org Server 1.11 modules ...done.
Setting up the Window System to use the Guest Additions ...done.
You may need to restart the hal service and the Window System (or just restart
the guest system) to enable the Guest Additions.
Installing graphics libraries and desktop services components ...fail!
(See the log file /var/log/vboxadd-install-x11.log for more information.)
Press Return to close this window...
install_x11_startup_app: no script given
Before installing the new guest additions version, you need to remove manually 2 symlinks:
rm /usr/lib64/VBoxGuestAdditions
rm /usr/share/VBoxGuestAdditions
Labels:
virtualbox
Monday, June 18, 2012
Have ALC887 work on Lion 10.7.4
Follow the instructions on https://tonymacx86.com/viewtopic.php?f=16&t=59061 for installing 887_v100302
Tuesday, June 12, 2012
Wednesday, June 6, 2012
NO DATA FOUND error
Trap the NO_DATA_FOUND exception, and handle it.
BEGIN
SELECT ... INTO x_data
FROM ...
WHERE ...;
EXCEPTION
WHEN NO_DATA_FOUND THEN
x_data := NULL;
END;
Monday, June 4, 2012
Wednesday, May 30, 2012
Monday, May 14, 2012
Oracle select N latest entries
select * from (select * from monitor.at_process_log order by log_id desc)
where ROWNUM <=10;
To accomplish the equivalent to MySql:
select * from sometable order by name limit 20,10
AskTom proposes:
select * from (select a.*, ROWNUM rnum from
(select * from monitor.at_process_log order by log_id desc) a where rownum <= 20)
where rnum >= 10;
Wednesday, May 9, 2012
Thursday, May 3, 2012
Install Cisco VPN 4.8.02 on Fedora 14 (2.6.35)
- tar xvfz vpnclient-linux-x86_64-4.8.02.0030-k9.tar.gz
- cd vpnclient
- sudo ./vpn_install
- You will probably get failures. If you get failures:
- wget http://projects.tuxx-home.at/ciscovpn/patches/vpnclient-linux-2.6.24-final.diff
- patch < ./vpnclient-linux-2.6.24-final.diff
- This step shows failures, but I don't care (*)
- wget http://lamnk.com/download/vpnclient-linux-4.8.02-64bit.patch
- patch < ./vpnclient-linux-4.8.02-64bit.patch
- sed -i 's/^CFLAGS/EXTRA_CFLAGS/' Makefile
- wget http://lamnk.com/download/vpnclient-linux-2.6.31-final.diff
- patch < ./vpnclient-linux-2.6.31-final.diff
- sudo sed -i 's/const\ struct\ net_device_ops\ \*netdev_ops;/struct\ net_device_ops\ \*netdev_ops;/' `find /usr/src -name netdevice.h`
- Update interceptor.c like explained in (**)
- sudo ./vpn_install
- sudo /sbin/service vpnclient_init start
- Create a profile like in (***) and substitute values
- cp *.pcf /etc/opt/cisco-vpnclient/Profiles directory
- vpnclient connect site-name (site-name is the same as site-name.pcf)
[jerome@monster] > patch < ./vpnclient-linux-2.6.24-final.diff
patching file GenDefs.h
Hunk #1 succeeded at 105 with fuzz 2.
Hunk #2 succeeded at 122 (offset 2 lines).
patching file interceptor.c
Hunk #3 FAILED at 111.
Hunk #4 succeeded at 142 (offset 5 lines).
Hunk #5 FAILED at 364.
Hunk #6 FAILED at 921.
Hunk #7 FAILED at 949.
4 out of 7 hunks FAILED -- saving rejects to file interceptor.c.rej
(**)
Replace
static void interceptor_init(struct net_device *);
with
static
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
int
#else
int __init
#endif
interceptor_init(struct net_device *);
(***)
[main] Description=sample user profile Host=<x.x.x.x> AuthType=1 GroupName=<GroupName> GroupPwd=<GroupPwd> EnableISPConnect=0 ISPConnectType=0 ISPConnect= ISPCommand= Username=<Username> UserPassword=<UserPassword> SaveUserPassword=1 EnableBackup=0 BackupServer= EnableNat=1 CertStore=0 CertName= CertPath= CertSubjectName= CertSerialHash=00000000000000000000000000000000 DHGroup=2 ForceKeepAlives=1
Friday, April 27, 2012
PL/SQL: loop on array
In package:
TYPE varchar2_array_type IS TABLE OF VARCHAR2(100) INDEX BY PLS_INTEGER;
In package body:
ze_or_keys varchar2_array_type;
BEGIN
FOR i in 1 .. ze_or_keys.count
LOOP
IF i != 1 THEN
my_string := my_string || ' OR ';
END IF;
my_string := my_string || ze_or_keys(i) || '=''' || ze_or_values(i) || '''';
END LOOP;
END;
PL/SQL: loop on associative array
In package:
TYPE hash_type IS TABLE OF VARCHAR2(100) INDEX BY VARCHAR2(100);In package body:
ze_assoc hash_type;
BEGIN
my_col_name := ze_assoc.first;
LOOP
EXIT WHEN my_col_name is null;
my_string := my_string || ' OR ' || my_col_name || '=' || ze_assoc(my_col_name);
my_col_name := ze_assoc.next(my_col_name);
END LOOP;
END;
Thursday, April 26, 2012
Force resync of VirtualBox guest
E.g. To force time sync every 10 sec.:
VBoxService --timesync-set-threshold 10000
Labels:
linux,
virtualbox
Wednesday, April 25, 2012
Subscribe to:
Posts (Atom)