Tag: all

How to list triggers on a database in SQLServer?

Using the following SQL statement, it will list triggers on database. It also prints trigger name, table the trigger is on, is it a insert, update and delete triggering event, after and instead of trigger, if the trigger is enabled or disabled SELECT trigger_name = name , trigger_owner = USER_NAME(uid) , table_name = OBJECT_NAME(parent_obj) , … Continue reading How to list triggers on a database in SQLServer?

whereiz – find all version of a command

Using the following script it will find all version of a command in $PATH (from Unix Power Tools) $ cat /tmp/whereiz #!/bin/sh testx="test -x" fixpath="`echo $PATH | sed \ -e 's/^:/.:/' \ -e 's/::/:.:/g' \ -e 's/:$/:./'`" # echo $fixpath IFS=": " for command do where="" for direc in $fixpath do $testx $direc/$command && where="$where … Continue reading whereiz – find all version of a command

Process Information

Process Information - Powershell has feature allows one to list process information, list process by name. Also one can terminate process using "Stop-Process" PS>Get-Process -Name <program name> Example: PS>Get-Process -Name gvim Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName ------- ------ ----- ----- ----- ------ -- ----------- 95 7 3208 9496 65 0.16 172 gvim … Continue reading Process Information

How to make trace files visible to all users?

To make trace files visible to all users, set the parameter _TRACE_FILES_PUBLIC=TRUE, this is undocumented parameter. This parameter requires a restart of instance to take into effect. SQL> alter system set "_TRACE_FILES_PUBLIC"=true scope=spfile; System altered. Shows the trace file is accessible by all users, you may have change permissions on the user_dump_dest folder -rw-r--r-- 1 … Continue reading How to make trace files visible to all users?

Setup PLAN_TABLE for all schema users

Each schema may require a PLAN_TABLE to debug performance so instead of creating the PLAN_TABLE within each schema, one can do the following and allow all schemas access to PLAN_TABLE: -- ? is the ORACLE_HOME SQL> connect system Password: SQL> @?/rdbms/admin/utlxplan.sql -- create public synonym SQL> CREATE PUBLIC SYNONYM PLAN_TABLE FOR PLAN_TABLE; -- Grant everyone … Continue reading Setup PLAN_TABLE for all schema users