Monday, December 17, 2007

Solaris Explorer

當你Solaris OS發生問題要怎麼辦
首先,你必須將系統的狀況回報給維護廠商

1. 執行 Explorer 程式:
# cd /opt/SUNWexplo/bin
# ./explorer

如果要針對Storage問題,執行指令如下
# ./explorer -w default,storage,fru

當程式執行完畢你會看到
explorer: Explorer finished 的訊息

2. 當程式執行完後,
# cd /opt/SUNWexplo/output
# ls
explorer.XX-2007.12.16.07.43.XXXX
explorer.XXXXXXXXX-2007.12.16.07.43.tar.gz
把 explorer*.tar.gz 寄出給維護廠商

Wednesday, December 05, 2007

Sybase's Login

Sometimes, we would like to know where a sybase's user come from? (e.g. IP)
1.) Find out the login's suid by using sp_displaylogin
1> sp_displaylogin person1
2> go
Suid: 2608
Loginame: person1
Fullname:
Default Database: mydb
Default Language:
Auto Login Script:
Configured Authorization:
Locked: NO
Date of Last Password Change: Nov 27 2007 11:03AM
Password expiration interval: 0
Password expired: NO
Minimum password length: 6
Maximum failed logins: 0
Current failed login attempts:
(return status = 0)
2.)Then select from sysprocesses by using the "suid"
1> select * from sysprocesses where suid=2608
2> go
spid kpid enginenum status suid hostname
program_name hostprocess cmd cpu physical_io
memusage blocked dbid uid gid
tran_name
time_blocked network_pktsz fid execlass
priority affinity id stmtnum
linenum origsuid block_xloid clientname
clienthostname clientapplname sys_id
ses_id loggedindatetime ipaddr
------ ----------- ----------- ------------ ----------- ----------
---------------- ----------- ---------------- ----------- -----------
----------- ------- ------ ----------- -----------
----------------------------------------------------------------
------------ ------------- ------ ------------------------------
---------- ------------------------------ ----------- -----------
----------- ----------- ----------- ------------------------------
------------------------------ ------------------------------ ------
----------- -------------------------- ---------------
53 163185511 0 recv sleep 2608 ssksdev1
AWAITING COMMAND 0 0
2 0 4 2609 0
NULL
NULL 512 0 EC2
MEDIUM ANYENGINE 0 1
1 NULL 0
0
0 Dec 5 2007 3:56PM 10.47.1.215

(1 rows affected)

3.) Now we know person1 is connected by using 10.47.1.215 machine =)