Thursday, August 27, 2009

Configure Static IP In Ubuntu Server

  1. open the /etc/network/interfaces file.
  2. auto eth0
    iface eth0 inet static
    address 192.168.1.100
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.255
    gateway 192.168.1.1
  3. sudo /etc/init.d/networking restart
  4. Add DNS in /etc/resource

Wednesday, August 19, 2009

Mount NTFS share folder on Ubuntu

$sudo mount -t smbfs -o username=myusername //192.168.0.10/sharename /media/test

Sunday, August 16, 2009

Solution untuk masalah duplicate data dalam table

  1. sort by tarikh atau lain
  2. select distinct table tersebut jadikan as A
  3. select top 1 table tersebut dan sortkan by tarikh, jadikan as B
  4. select A.*/B.* from A left outer join B on A.id=B.id*
JOIN boleh pilih ikut suka. LEFT ker RIGHT ker bergantung kepada kehendak.

Tuesday, August 4, 2009

Masalah Precision Dalam ETL untuk Oracle OLE

1) Cast column to NUMBER(precision, scale) in Oracle select (eg. select CAST(columnName as NUMBER(10, 3)) as columName from ..

2) Cast to string in Oracle select (eg. select TO_CHAR(columnName) as columName from ..

Monday, July 20, 2009

Set Variable Dlm SSIS Command Line

/SET "\Package.Variables[User::gvSourceId].Value";101

Thursday, July 16, 2009

String Convert Dlm SSIS

(DT_STR,4,1252) DATEPART(yyyy,date)

Tuesday, July 14, 2009

Login through ssh using no password

  1. a@A:~> ssh-keygen -t rsa local pc
  2. cat .ssh/id_rsa.pub | ssh b@B 'cat >> .ssh/authorized_keys' local pc

Sunday, July 12, 2009

ETL

  1. Table dari datasert asal

Friday, July 10, 2009

PHP + Oracle

  1. Uncomment the line: extension=php_oci8.dll
  2. $db = “(DESCRIPTION=(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.34)(PORT = 1521)))(CONNECT_DATA=(SID=orcl)))” ;

    if ($c=OCILogon(”system”, “your database password“, $db)) {

    echo “Successfully connected to Oracle.\n”;

    OCILogoff($c);

    } else {

    $err = OCIError();

    echo “Connection failed.” . $err[text];

    }

    ?>

Sunday, July 5, 2009

SCP then gzip file

  1. scp remote/dir /locadir | gzip -f
  2. tar cvf - . | gzip -c -1 | ssh user@host cat ">" remotefile.gz

Friday, July 3, 2009

Piping Dalam Linux

tar -cvf - /usr | ssh root@lnx_srv "cat > /dev/st1"

Monday, June 22, 2009

Data Source Untuk Excel 2007

  1. In Business Intelligence Development Studio, open the package.

  2. In the Connections Managers area, right-click anywhere in the area, and then select New OLE DB Connection.

  3. In the Configure OLE DB Connection Manager dialog box, click New.

  4. In the Connection Manager dialog box, for Provider, select Microsoft Office 12.0 Access Database Engine OLE DB.

    Cc280527.note(en-us,SQL.100).gifNote:
    To connect to a data source that uses Excel 2007, you cannot select Microsoft Jet 4.0 OLE DB Provider for the Data Source.

  5. On the Connection tab of the Connection Manager dialog box, for Server or file name, type or paste the complete path and file name.

  6. On the All tab of the Connection Manager dialog box, for Extended Properties, enter one of the following values based on the file format of the Excel 2007 file:

    • Enter Excel 12.0 Xml for the default file format that uses the .xslx file name extension.
      —or—
    • Enter Excel 12.0 for the non-default binary file format that uses the .xslb file name extension.
    Cc280527.note(en-us,SQL.100).gifNote:
    When you import from Excel 2007, you can specify either Excel 12.0 or Excel 12.0 Xml because the driver infers the correct format from the input file. However, when you export to Excel 2007, you have to specify the Excel file format that corresponds to the file name extension that you have given the output file.

Thursday, June 18, 2009

Script untuk update row guna OLE DB Command

  1. UPDATE Client SET AddressID = ? WHERE (ClientID = ?)
  2. hit the Refresh button, and then you can map the parameters to variables on the Column Mapping tab

Thursday, June 11, 2009

Error untuk remote desktop

  1. On the client, navigate to the following registry subkey: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSLicensing.
  2. Click MSLicensing.
  3. On the Registry menu, click Export Registry File.
  4. In the File name box, type mslicensingbackup, and then click Save.
  5. If you need to restore this registry key in the future, double-click mslicensingbackup.reg.
  6. On the Edit menu, click Delete, and then click Yes to confirm the deletion of the MSLicensing registry subkey.
  7. Close Registry Editor, and then restart the computer.

SQL untuk mark duplicate row

Sangat bagus untuk Condition Split dlm SSIS (ETL)

Select *,
rank() over (Partition by Code, description order by TieBreakerColumn desc, SurrogateKey) MyRank
from SourceWithDuplicates

Monday, June 8, 2009

Count Intake 20091

  1. Jun 1st 2009 : 48531
  2. Jun 2nd 2009 : 48589
  3. Jun 3rd 2009 : 48807
  4. Jun 8th 2009 : 50074
  5. jun 9th 2009 : 49402

To register MSXML 6.0.

  1. From the Start menu, click Run.
  2. Enter the following command:. regsvr32 %windir%\system32\msxml6.dll.

URLS untuk Application Windows yang peting

Walaupun guna Mac/Unix, tetap kena ada app. berikut untuk memudahkan when using pc kawan(Win)
  1. Foxit Reader
  2. Firefox
  3. 7-Zip
  4. µTorrent
  5. TeraCopy
  6. ImgBurn
  7. VLC

Condition Untuk Expression Dalam Derive Column

Untuk String :
[columnname] == "padanan"? "Benar":"Salah"

Untuk Integer
[colunmname] < 350.00 ? ListPrice * .2 : ListPrice * .1