How to change oracle user password?  

Tuesday, June 9, 2009

Question: How to change oracle user password?

Answer:

The syntax is:

alter user [user_name] identified by [new_password];

user_name is the user whose password you wish to change.

new_password is the new password to assign.

For eg:
I wanted to update system user password to helloworld

SQL> alter user system identified by helloworld;

User altered.

AddThis Social Bookmark Button
Email this post


How to find out the IP or machine full name in your network  

Tuesday, May 26, 2009

How to find out the machine IP or full address name that reside in your network?

Answer: Use 'traceroute' command in unix

For eg: You wanted to find a machine call "walrus" in your network

: /home/LX>traceroute walrus
traceroute to walrus.kl.lxcorp.com (10.101.110.74), 30 hops max, 40 byte packets
1 walrus.kl.lxcorp.com (10.101.110.74) 1.168 ms 0.373 ms 0.230 ms

machine IP: 10.101.110.74
machine name: walrus.kl.lxcorp.com

AddThis Social Bookmark Button
Email this post


How to find out machine specification in Unix?  

Sunday, April 12, 2009

Use 'uname -a' command

: /etc>uname -a
SunOS shark 5.8 Generic_117350-59 sun4u sparc SUNW,Sun-Fire-V440

SunOS - machine's OS

shark - machine hostname

5.8 - SunOS version (Solaris 5.8 means Solaris 8)

sparc - machine type

AddThis Social Bookmark Button
Email this post


How to check machine IP in Unix?  

Use the command 'ifconfig -a'

: /etc>ifconfig -a
lo0: flags=1000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
ce0: flags=1000843 mtu 1500 index 2
inet 9.100.90.140 netmask fffffe00 broadcast 9.100.90.255


The highlighted IP (9.100.90.140) above is the IP of the machine.

AddThis Social Bookmark Button
Email this post


CTAGS Tips and Command  

Wednesday, March 18, 2009

Run vim (full path /usr/misc/bin/vim)
Type :tj (Example: :tj api_Timer::clear, choose a number)
You are there!
Tips

:tj[ump] (or move your cursor to it and press "g Cltr+]"*)
Jump to the tag directly when there is only one match

:tn[ext]
Jump to next matching tag

:tp[revious]
Jump to previous matching tag

:tf[irst]
Jump to first matching tag

:tl[ast]
Jump to last matching tag

:po[p] (or Ctrl+T)
Jump to older entry in tag stack

:ta[g]
Jump to newer entry in tag stack

:tags
Show the contents of the tag stack. The active entry is marked with a '>'

:tj /^get
Lists all the tags that starts with "get"

:tj /norm
Lists all the tags that contain "norm", including "id_norm"

:ts

List all of the definitions of the last tag

Notes
*By default, Cltr+] is escape character for telnet. You can disable it through
Windows DOS: telnet -e '' (two single quote ')
Unix: telnet -E
You should use dtterm (/usr/dt/bin/dtterm) to enable vim to support color mode

AddThis Social Bookmark Button
Email this post


How To Generate CTAGS and Configure It To Use With VIM?  

Many of you wondering how to generate ctags and configure it to use with Vim? Here, you at the right place.

What is ctags?

According to ctags sourceforge.

Ctags generates an index (or tag) file of language objects found in source files that allows these items to be quickly and easily located by a text editor or other utility. A tag signifies a language object for which an index entry is available (or, alternatively, the index entry created for that object).
Tag generation is supported for the following languages:
Assembler, AWK, ASP, BETA, Bourne/Korn/Zsh Shell, C, C++, COBOL, Eiffel, Fortran, Java, Lisp, Lua, Make, Pascal, Perl, PHP, Python, REXX, Ruby, S-Lang, Scheme, Tcl, Vim, and YACC.
Below is 6 (six) simple steps to generate the ctags and use it with your vim.

Precondition:
- you need to have unix
- you need to have vim

Notes: you can generate ctags to use in windows but I haven't tried that before.

1. Download the ctags source from

http://www.sunfreeware.com/
http://ctags.sourceforge.net/

I'm using ftp://ftp.sunfreeware.com/pub/freeware/SOURCES/ctags-5.7.tar.gz

2. gunzip and untar it.

3. run ./configure

4. run make

if 'make' does not exist in global environment. Search for it by
find / -name make 2>/dev/null

[/gateways/yapywa/ctags/ctags-5.7]
12:37:35 > /usr/ccs/bin/make

--> after make you will see .C get compile and with .o output file.

5. cd to $HOME directory

6. Generate the tags

ctags -f --recurse --langmap= --languages= --verbose

[/gateways/yapywa]
12:37:35 >
/gateways/yapywa/ctags/ctags-5.7/ctags -f tags --recurse --langmap=C++:.C.h.c.cpp.hpp --languages=C++ --extra=+q --fields=+i --verbose /gateways/yapywa/ALU_CORE

7. SET CTAGS in VIM under .vimrc

se tags=/home/yapywa/tags

AddThis Social Bookmark Button
Email this post


How to capture Unix console screen output?  

Many of you might want to capture the screen output of the unix console for references later or wanted to show the output to another counterpart.

This command is particularly useful in 2 scenarios:

1. During a training, where instructor do a demo using the endless list of command that you have difficulty to remember and jotting down.

At many instances, even you can jot down the command you might not even able to remember what is the output of the command.

Put it this way, many of us, learn from example. Hence being able to capture the screen output is very important.

2. If you are a student and you need to show your program output to your lecturer. Use this command.

THE COMMAND IS:

script [filename]

CTRL+D to exit the script command

=========== For Instance =========
$ script script.out
Script started, file is script.out
$ date
Tue Mar 17 17:04:07 SGT 2009
$ time

real 0m0.00s
user 0m0.00s
sys 0m0.00s
$ ^D
Script done, file is script.out


$ cat script.out
Script started on Tue Mar 17 17:04:03 2009
$ date
Tue Mar 17 17:04:07 SGT 2009
$ time

real 0m0.00s
user 0m0.00s
sys 0m0.00s
$ ^D

script done on Tue Mar 17 17:04:11 2009
$

So simple, right ......

AddThis Social Bookmark Button
Email this post


Design by Amanda @ Blogger Buster