How to trace a running process?

Using strace one can trace the system calls being executed by a running process. To stop the strace press control-C To display the system calls being executed $ strace -p <pid> or To display a summary of system calls being executed $ strace -cfo <logfile> -p <pid> Example: In this example smon process was being traced $ strace -p 1234 Process 1234 attached – interrupt … Continue reading How to trace a running process?

List of all system privileges

Using the view “system_privilege_map” one can list all the system privileges or search for a specific privilege. Example: List all privilege that have “TABLE” keyword in it. SQL> select * from system_privilege_map where NAME like ‘%TABLE%’; PRIVILEGE NAME PROPERTY ———- —————————————- ———- -10 CREATE TABLESPACE 0 -11 ALTER TABLESPACE 0 -12 MANAGE TABLESPACE 0 -13 DROP TABLESPACE 0 -15 UNLIMITED TABLESPACE 0 -40 CREATE TABLE … Continue reading List of all system privileges

Monitoring AIX

On AIX – nmon on AIX can be used to monitoring a machine (CPU, Memory, Network traffic, I/O, top processes, etc). Here is the link to download nmon http://www.ibm.com/developerworks/wikis/display/WikiPtype/nmon Example to collect nmon data and extract output to a file: $ nmon_aix53 -fTNWLA -I 0.001 -s 300 -c 288 -m /home/nmon_data This collects the data once a day in the directory /home/nmon_data at once every … Continue reading Monitoring AIX

Script to change date on a computer

' ' script to change computer date ' DIM objShell strComputer = "." ' current host ' get current time Set objWMIService = GetObject("winmgmts:{(Systemtime)}\\" & strComputer & "\root\cimv2") Set colOS = objWMIService.ExecQuery("SELECT * FROM Win32_OperatingSystem WHERE Primary=True") For Each objOS In colOS Exit For Next Wscript.Echo "Current Date: " & strDate strNow = objOS.LocalDateTime ' loop through to get last 5 date FOR counter=1 TO … Continue reading Script to change date on a computer

How to delete/reset a parameter in spfile using ALTER SYSTEM?

Using ALTER SYSTEM RESET one can delete parameter from spfile if the parameter is in the spfile. Example: — shows the parameter is in the spfile $ pwd /u01/oracle/product/10.2.0/db_1/dbs $ strings spfileTEST.ora | grep open *.open_cursors=100 — Login to SQL*Plus, scope has to spfile and sid has to be supplied. When '*' is specified it applies to all instances if it is a cluster SQL> … Continue reading How to delete/reset a parameter in spfile using ALTER SYSTEM?

How to tell if a parameter can be modified in a session/system?

By querying V$parameter one can find if the parameter can be modified in session and/or system. If isses_modifiable is true then value can be modified in session, if FALSE then it can’t be modified using ALTER SESSION SET.. If issys_modifiable = DEFERRED, the value can be changed with scope=spfile specified (if spfile is used) and the change will take into effect into subsequent sessions. If … Continue reading How to tell if a parameter can be modified in a session/system?