Thursday, June 19, 2014

VirtualBox Windows XP guest boot in safe mode


In this case, F8 won't work. fn+F8 won't work too since here it's a special function such as open itune. The method is:

With the XP guest running.
Go to Start, click on Run. In the box type msconfig and hit enter.
Click on the BOOT.INI tab, Check /SAFEBOOT save and restart.

Once GA are installed, reverse the above and reboot.

See here.

Mac memory management

Mac memory:

Total = free + wired + active + inactive
Used = wired + active + inactive

Wired memory are those that cannot be swapped to the hard drive.

Inactive memory are those no longer used and can be released using the "purge" command.

[1] Free Up Inactive Memory in Mac OS X with Purge Command
[2] What is "wired memory" in Activity Monitor?

Wednesday, June 18, 2014

Oracle Linux in VirtualBox

To install Oracle database via VirtualBox: How to install Oracle Database on Mac OS, or Evaluating Oracle Linux From Inside Oracle VM VirtualBox.

After get the Oracle Linux running, choose Network Adapter setting as "Host-only", then you can download Oracle SQL Developer - a free Oracle client IDE (like phpMyAdmin for MySQL), on your host machine and install it. You can then connect to the Oracle database running in the virtual machine. Note there is also an Oracle SQL Developer running inside the guest, you can copy its connection settings to the one on the host.

Then if on windows you may want to setup ODBC driver for Oracle. Download relevant installation package from here or here. Check this installation guide. The 3 steps are:

1) download and setup Install the ODAC or Oracle Client
2) Setup the SQLNET and TNSNAMES files. Usually SQLNET.ora file does not need change. Change TNSNAMES.ora, mostly this need to change the tnsname, host ip/name, port, and service_name.
3) Create the ODBC Data Source. Note here the "TNS Servie Name" is the same as in TNSNAMES.ora. When test the connection, the username and password are the same as in the property of connection in Oracle SQL Developer.

For Oracle/OL-SQL, see here for a manual.

To find out the version of your Oracle, use this command:
select * from v$version where banner like 'Oracle%';

Share files between OS: FAT, NTFS and exFAT file systems

I want to transfer large files on a USB drive and share on different OS.

Mac OS uses HFS file system. Windows uses FAT and NTFS, and server filesystems like XFS and ZFS. Linux uses Ext2/3/4.

FAT32 files system can share between Windows, Linux and Mac, but does not allow files larger than 4GB.

NTFS can share between Windows and Linux. Mac can read but not write to NTFS. But here is an article on How to manually enable NTFS read and write in OS X [6], or Enable writing to NTFS hard drives on Mac OS X [7] (use NTFS-3G, NTFS-3G patch, and OSXFuse).

The proprietary exFAT file system is designed for Flash drive from Microsoft since Vista SP1, can read/write for Windows and Mac, but not work well for linux [5]. exFAT is supported in Mac OS 10.6.x and later, and Windows Vista/7 and later, for XP there is driver available.

No silver bullet. Let me use exFAT for now to share between windows and mac, and if use linux, install driver [5]. I don't want to worry too much about Linux, since Linux users are supposed to be savvy, and Linux support for exFAT is coming in the open source community.

[1] Can Microsoft’s exFAT file system bridge the gap between OSes?
[2] exFAT Versus FAT32 Versus NTFS
[3] Understanding File-Size Limits on NTFS and FAT
[4] The best ways to format an external drive for Windows and Mac
[5] How to enable exFAT in Ubuntu
[6] How to manually enable NTFS read and write in OS X
[7] Enable writing to NTFS hard drives on Mac OS X
[8] wiki: ExFAT

Tuesday, June 17, 2014

The URL Lister extension of Firefox

What if you open too many tabs in firefox? It's necessary since these are all needed for fast reference. But Firefox memory usage is too high and slows down the machine.

A better way is to use a page to keep all these links. So instead of opening all these tabs, just keep the one page open, kind of like a bookmark feature.

This can be easily done by installing the URL lister extension of Firefox. Afterwards it's available in the Tools submenu.

MSSQL table row and column limit

The max number of columns allowed in MSSQL database is 1024. Wide table can contain up to 30000 columns, but it applies only to sparse columns, meaning most columns should be null and regular/calculated columns number is still 1024, and there is performance issue. This is from this article in MSDN.

Also bytes per row is limited to max 8060 (also from the link above, or here). varchar types can be longer but still will decrease performance. Since max length for any field is 8 bytes, this is 1024*8 = 8192, a little higher than 8060.


Blog Archive

Followers