Techn4b’s Blog

April 14, 2010

How to convert FAT16/FAT32 to NTFS in Windows

Filed under: Linux — techn4b @ 17:26

c:\>convert driveletter: /fs:ntfs

a fast command to do it.

Advertisements

How to Flush DNS in Microsoft Windows

Filed under: Windows — Tags: , , — techn4b @ 11:12

c:\> ipconfig /flushdns

after playing with IP config of network adapter, clients could have old IP address of destination. use ipconfig /flushdns in windows shell.

March 19, 2010

OracleException: ORA-12705: Cannot access NLS data files or invalid environment specified

Filed under: Linux — Tags: , , — techn4b @ 18:18

Oracle Instant Client Error:

OracleException: ORA-12705: Cannot access NLS data files or invalid environment specified

Check Registry Key NLS_LANG in HKLM/Software/Oracle.

set it to valid language like GERMAN_GERMANY.WE8MSWIN1252

In some cases it helps to set above value to user environment variable NLS_LANG.

November 30, 2009

MySQL 5 – check and repair database

Filed under: Linux, SQL — Tags: , , , , — techn4b @ 10:55

Shell> mysqlcheck –all-databases -p –auto-repair

Default user root, with given password.

More Information: http://dev.mysql.com/doc/refman/5.0/en/mysqlcheck.html

Example Output:

mytable
warning  : Table is marked as crashed
error    : Size of datafile is: 593178624         Should be: 593179500
error    : Corrupt

Repairing tables
mytable
info     : Found block that points outside data file at 593176692
status   : OK

October 12, 2009

Domain Group Members

Filed under: Linux — Tags: , — techn4b @ 13:06

How to show group members of a domain group?

in Windows Command Prompt:
NET GROUP groupname /DOMAIN

July 27, 2009

Microsoft Products – End of Life

Filed under: Linux — Tags: , — techn4b @ 15:21

Microsoft has a good site to check their products lifecycle support. See it here:

http://support.microsoft.com/gp/lifeselect

July 2, 2009

How to install RPM?

Filed under: Linux — Tags: , , — techn4b @ 16:37

rpm -Uhv {name}.rpm

Parameter info:
U for Update or Install, better than option “i” as it also upgrads
v for verbose information
h for print hash marks, Install progress

f.ex.:

# rpm -Uhv oracle-instantclient11.1-basiclite-11.1.0.7.0-1.x86_64.rpm

May 22, 2009

how to upload CSV File to MySQL Database

Filed under: SQL — Tags: , , , , — techn4b @ 09:35
LOAD DATA LOCAL INFILE 'c:\\usr1.csv'
INTO TABLE addressen
FIELDS TERMINATED BY ','
ENCLOSED By '"'
LINES TERMINATED BY '\r\n'

* Load Data Local Infile @ mysql.org
* File saved in UTF8 (OpenOffice 3.0)
* Mysql Query in UTF8 (advanced parameter: default-character-set=UTF8)

mysql_advanced

* Mysql 5.0 show variables:

mysql> show variables like 'char%';
+--------------------------+----------------------------+
| Variable_name            | Value                      |
+--------------------------+----------------------------+
| character_set_client     | latin1                     |
| character_set_connection | latin1                     |
| character_set_database   | latin1                     |
| character_set_filesystem | binary                     |
| character_set_results    | latin1                     |
| character_set_server     | latin1                     |
| character_set_system     | utf8                       |
| character_sets_dir       | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.00 sec)

Comment:

23000 rows inserted in 3 seconds

May 20, 2009

Windows XP change IP from command prompt

Filed under: Windows — Tags: , , , , , , , , , , — techn4b @ 16:37

Of course you can change the IP from the command prompt.

The command is:
to change IP and default gateway:
netsh int ip set address “local area connection” static 192.168.0.101 255.255.255.0 192.168.0.254 1

to change DNS:
netsh int ip set dns “local area connection” static 192.168.0.254 primary

This is assuming 3 things.
1) The network adapter you’re trying to change the IP for is “local area connection”. It could also be “local area connection 2” or “wireless network connection”. Look in your control panel for the correct name
2) The IP you want to set is 192.168.0.101, change this to whatever IP to want to use.
3) The default gateway and dns are the same IP. If you are using some kind of router they usually are. Change this to match your network config found with the command ipconfig /all

You will need to run both commands to change the IP.

Posted by 2xod.com

Comment: worked great for me. thanks

April 24, 2009

Linux change route eth1

Filed under: Linux — Tags: , , , , , , — techn4b @ 12:30

Problem: default route needs to be changed from eth0 to eth1

Environment: SuSE Linux 10.3 with SuHosin

Route print:

server:/ # route

Kernel IP Routentabelle
Ziel            Router          Genmask         Flags Metric Ref    Use Iface
172.31.40.0     *               255.255.248.0   U     0      0        0 eth0
link-local      *               255.255.0.0     U     0      0        0 eth0
loopback        *               255.0.0.0       U     0      0        0 lo
default         172.31.40.1     0.0.0.0         UG    0      0        0 eth0

Solution:

add eth1 interface /etc/sysconfig/network/ifcfg-eth1, set defaultroute for eth1 in /etc/sysconfig/network/routes

server:/ # route add default gw 10.64.240.1 dev eth0

server:/ # route
Kernel IP Routentabelle
Ziel            Router          Genmask         Flags Metric Ref    Use Iface
172.31.40.0     *               255.255.248.0   U     0      0        0 eth0
172.31.40.0     *               255.255.248.0   U     0      0        0 eth1
link-local      *               255.255.0.0     U     0      0        0 eth0
loopback        *               255.0.0.0       U     0      0        0 lo
default         172.31.40.1     0.0.0.0         UG    0      0        0 eth1

restart network

server:/etc/rc.d # ./network restart
Shutting down network interfaces:
    eth0      device: Broadcom Corporation NetXtreme BCM5721 Gigabit Ethernet PCI Express (rev 21)
    eth0                                                              done
    eth1      device: Broadcom Corporation NetXtreme BCM5721 Gigabit Ethernet PCI Express (rev 21)
    eth1                                                              done
Shutting down service network  .  .  .  .  .  .  .  .  .  .  .  .  .  done
Hint: you may set mandatory devices in /etc/sysconfig/network/config
Setting up network interfaces:
    lo
    lo        IP address: 127.0.0.1/8
Checking for network time protocol daemon (NTPD):                     running
    lo                                                                done
    eth0      device: Broadcom Corporation NetXtreme BCM5721 Gigabit Ethernet PCI Express (rev 21)
    eth0      IP address: 172.31.40.4/21
    eth0:GLORIAGW2 IP address: 172.31.40.3/21
Checking for network time protocol daemon (NTPD):                     running
    eth0                                                              done
    eth1      device: Broadcom Corporation NetXtreme BCM5721 Gigabit Ethernet PCI Express (rev 21)
    eth1      IP address: 172.31.40.2/21
Checking for network time protocol daemon (NTPD):                     running
    eth1                                                              done
Setting up service network  .  .  .  .  .  .  .  .  .  .  .  .  .  .  done

Comment:

unfinished yet

Older Posts »

Create a free website or blog at WordPress.com.